IMP Reference Guide  develop.94629e1a1f,2022/05/26 The Integrative Modeling Platform
IMP.pmi.topology.Molecule Class Reference

Stores a named protein chain. More...

Inherits _SystemBase.

## Detailed Description

Stores a named protein chain.

This class is constructed from within the State class. It wraps an IMP.atom.Molecule and IMP.atom.Copy. Structure is read using this class. Resolutions and copies can be registered, but are only created when build() is called.

A Molecule acts like a simple Python list of residues, and can be indexed by integer (starting at zero) or by string (starting at 1).

Note
This class is only available in Python.

Definition at line 371 of file pmi/topology/__init__.py.

## Public Member Functions

def __init__
The user should not call this directly; instead call State.create_molecule() More...

Set the representation for some residues. More...

Read a structure and store the coordinates. More...

def build
Create all parts of the IMP hierarchy including Atoms, Residues, and Fragments/Representations and, finally, Copies. More...

def create_clone
Create a Molecule clone (automatically builds same structure and representation) More...

def create_copy
Create a new Molecule with the same name and sequence but a higher copy number. More...

def get_atomic_residues
Return a set of TempResidues that have associated structure coordinates. More...

def get_hierarchy
Return the IMP Hierarchy corresponding to this Molecule. More...

def get_ideal_helices
Returns list of OrderedSets with requested ideal helices. More...

def get_name
Return this Molecule name. More...

def get_non_atomic_residues
Return a set of TempResidues that don't have associated structure coordinates. More...

def get_particles_at_all_resolutions
Helpful utility for getting particles at all resolutions from this molecule. More...

def get_represented
Return set of TempResidues that have representation. More...

def get_residues
Return all modeled TempResidues as a set. More...

def get_state
Return the State containing this Molecule. More...

def residue_range
Get residue range from a to b, inclusive. More...

## Constructor & Destructor Documentation

 def IMP.pmi.topology.Molecule.__init__ ( self, state, name, sequence, chain_id, copy_num, mol_to_clone = None, alphabet = IMP.pmi.alphabets.amino_acid )

The user should not call this directly; instead call State.create_molecule()

Parameters
 state The parent PMI State name The name of the molecule (string) sequence Sequence (string) chain_id The chain of this molecule copy_num Store the copy number mol_to_clone The original molecule (for cloning ONLY)
Note
It's expected that you will not use this constructor directly, but rather create a Molecule with State.create_molecule()

Definition at line 383 of file pmi/topology/__init__.py.

## Member Function Documentation

 def IMP.pmi.topology.Molecule.add_representation ( self, residues = None, resolutions = [], bead_extra_breaks = [], bead_ca_centers = True, bead_default_coord = [0, density_residues_per_component = None, density_prefix = None, density_force_compute = False, density_voxel_size = 1.0, setup_particles_as_densities = False, ideal_helix = False, color = None )

Set the representation for some residues.

Some options (beads, ideal helix) operate along the backbone. Others (density options) are volumetric. Some of these you can combine e.g., beads+densities or helix+densities See Resolution in PMI

Parameters
Note
You cannot call add_representation multiple times for the same residues.

Definition at line 594 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.add_structure ( self, pdb_fn, chain_id, res_range = [], offset = 0, model_num = None, ca_only = False, soft_check = False )

Read a structure and store the coordinates.

Returns
the atomic residues (as a set)
Parameters
 pdb_fn The file to read chain_id Chain ID to read res_range Add only a specific set of residues from the PDB file. res_range[0] is the starting and res_range[1] is the ending residue index. offset Apply an offset to the residue indexes of the PDB file. This number is added to the PDB sequence. model_num Read multi-model PDB and return that model ca_only Only read the CA positions from the PDB file soft_check If True, it only warns if there are sequence mismatches between the PDB and the Molecule (FASTA) sequence, and uses the sequence from the PDB. If False (Default), it raises an error when there are sequence mismatches.
Note
If you are adding structure without a FASTA file, set soft_check to True.

Definition at line 531 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.build ( self )

Create all parts of the IMP hierarchy including Atoms, Residues, and Fragments/Representations and, finally, Copies.

Will only build requested representations.

Note
Any residues assigned a resolution must have an IMP.atom.Residue hierarchy containing at least a CAlpha. For missing residues, these can be constructed from the PDB file.

Definition at line 769 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.create_clone ( self, chain_id )

Create a Molecule clone (automatically builds same structure and representation)

Parameters
 chain_id If you want to set the chain ID of the copy to something
Note
You cannot add structure or representations to a clone!

Definition at line 511 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.create_copy ( self, chain_id )

Create a new Molecule with the same name and sequence but a higher copy number.

Returns the Molecule. No structure or representation will be copied!

Parameters
 chain_id Chain ID of the new molecule

Definition at line 498 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_atomic_residues ( self )

Return a set of TempResidues that have associated structure coordinates.

Definition at line 480 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_hierarchy ( self )

Return the IMP Hierarchy corresponding to this Molecule.

Definition at line 441 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_ideal_helices ( self )

Returns list of OrderedSets with requested ideal helices.

Definition at line 453 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_name ( self )

Return this Molecule name.

Definition at line 445 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_non_atomic_residues ( self )

Return a set of TempResidues that don't have associated structure coordinates.

Definition at line 489 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_particles_at_all_resolutions ( self, residue_indexes = None )

Helpful utility for getting particles at all resolutions from this molecule.

Can optionally pass a set of residue indexes

Definition at line 871 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_represented ( self )

Return set of TempResidues that have representation.

Definition at line 476 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_residues ( self )

Return all modeled TempResidues as a set.

Definition at line 471 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.get_state ( self )

Return the State containing this Molecule.

Definition at line 449 of file pmi/topology/__init__.py.

 def IMP.pmi.topology.Molecule.residue_range ( self, a, b, stride = 1 )

Get residue range from a to b, inclusive.

Use integers to get 0-indexing, or strings to get PDB-indexing

Definition at line 457 of file pmi/topology/__init__.py.

The documentation for this class was generated from the following file: