IMP logo
IMP Reference Guide  2.18.0
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...
 
def add_representation
 Set the representation for some residues. More...
 
def add_structure
 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
stateThe parent PMI State
nameThe name of the molecule (string)
sequenceSequence (string)
chain_idThe chain of this molecule
copy_numStore the copy number
mol_to_cloneThe 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
residuesSet of PMI TempResidues for adding the representation. Can use Molecule slicing to get these, e.g. mol[a:b]+mol[c:d] If None, will select all residues for this Molecule.
resolutionsResolutions for beads representations. If structured, will average along backbone, breaking at sequence breaks. If unstructured, will just create beads. Pass an integer or list of integers
bead_extra_breaksAdditional breakpoints for splitting beads. The value can be the 0-ordered position, after which it'll insert the break. Alternatively pass PDB-style (1-ordered) indices as a string. I.e., bead_extra_breaks=[5,25] is the same as ['6','26']
bead_ca_centersSet to True if you want the resolution=1 beads to be at CA centers (otherwise will average atoms to get center). Defaults to True.
bead_default_coordAdvanced feature. Normally beads are placed at the nearest structure. If no structure provided (like an all bead molecule), the beads go here.
density_residues_per_componentCreate density (Gaussian Mixture Model) for these residues. Must also supply density_prefix
density_prefixPrefix (assuming '.txt') to read components from or write to. If exists, will read unless you set density_force_compute=True. Will also write map (prefix+'.mrc'). Must also supply density_residues_per_component.
density_force_computeSet true to force overwrite density file.
density_voxel_sizeAdvanced feature. Set larger if densities taking too long to rasterize. Set to 0 if you don't want to create the MRC file
setup_particles_as_densitiesSet to True if you want each particle to be its own density. Useful for all-atom models or flexible beads. Mutually exclusive with density_ options
ideal_helixCreate idealized helix structures for these residues at resolution 1. Any other resolutions passed will be coarsened from there. Resolution 0 will not work; you may have to use MODELLER to do that (for now).
colorthe color applied to the hierarchies generated. Format options: tuple (r,g,b) with values 0 to 1; float (from 0 to 1, a map from Blue to Green to Red); a Chimera name; a hex RGB string (e.g. "#ff0000"); an IMP.display.Color object
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_fnThe file to read
chain_idChain ID to read
res_rangeAdd 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.
offsetApply an offset to the residue indexes of the PDB file. This number is added to the PDB sequence.
model_numRead multi-model PDB and return that model
ca_onlyOnly read the CA positions from the PDB file
soft_checkIf 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_idIf 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_idChain 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: