IMP logo
IMP Reference Guide  2.6.1
The Integrative Modeling Platform
IMP.pmi.macros.BuildSystem Class Reference

A macro to build a IMP::pmi::topology::System based on a TopologyReader object. More...

Inherits object.

Detailed Description

A macro to build a IMP::pmi::topology::System based on a TopologyReader object.

Easily create multi-state systems by calling this macro repeatedly with different TopologyReader objects! A useful function is get_molecules() which returns the PMI Molecules grouped by state as a dictionary with key = (molecule name), value = IMP.pmi.topology.Molecule

Quick multi-state system:

mdl = IMP.Model()
reader1 = IMP.pmi.topology.TopologyReader(tfile1)
reader2 = IMP.pmi.topology.TopologyReader(tfile2)
bs = IMP.pmi.macros.BuildSystem(mdl)
bs.add_state(reader1)
bs.add_state(reader2)
bs.execute_macro() # build everything including degrees of freedom
IMP.atom.show_molecular_hierarchy(bs.get_hierarchy())
### now you have a two state system, you add restraints etc

ote The "domain name" entry of the topology reader is not used. All molecules are set up by the component name, but split into rigid bodies as requested.

Note
This class is only available in Python.

Definition at line 413 of file macros.py.

Public Member Functions

def __init__
 Constructor. More...
 
def add_state
 Add a state using the topology info in a IMP::pmi::topology::TopologyReader object. More...
 
def execute_macro
 Builds representations and sets up degrees of freedom. More...
 
def get_molecules
 Return list of all molecules grouped by state. More...
 

Constructor & Destructor Documentation

def IMP.pmi.macros.BuildSystem.__init__ (   self,
  mdl,
  sequence_connectivity_scale = 4.0,
  force_create_gmm_files = False 
)

Constructor.

Parameters
mdlAn IMP Model
sequence_connectivity_scaleFor scaling the connectivity restraint
force_create_gmm_filesIf True, will sample and create GMMs no matter what. If False, will only only sample if the files don't exist. If number of Gaussians is zero, won't do anything.

Definition at line 439 of file macros.py.

Member Function Documentation

def IMP.pmi.macros.BuildSystem.add_state (   self,
  reader 
)

Add a state using the topology info in a IMP::pmi::topology::TopologyReader object.

When you are done adding states, call execute_macro()

Parameters
readerThe TopologyReader object

Definition at line 456 of file macros.py.

def IMP.pmi.macros.BuildSystem.execute_macro (   self)

Builds representations and sets up degrees of freedom.

Definition at line 528 of file macros.py.

def IMP.pmi.macros.BuildSystem.get_molecules (   self)

Return list of all molecules grouped by state.

For each state, it's a dictionary of Molecules where key is the molecule name

Definition at line 522 of file macros.py.


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