IMP logo
IMP Reference Guide  develop.5d113ecbfd,2023/06/06
The Integrative Modeling Platform
IMP.pmi.dof.DegreesOfFreedom Class Reference

Simplify creation of constraints and movers for an IMP Hierarchy. More...

Inherits object.

Detailed Description

Simplify creation of constraints and movers for an IMP Hierarchy.

Note
This class is only available in Python.

Definition at line 39 of file pmi/dof/__init__.py.

Public Member Functions

def constrain_symmetry
 Create a symmetry constraint. More...
 
def create_flexible_beads
 Create a chain of flexible beads. More...
 
def create_main_chain_mover
 Create crankshaft moves from a set of SUPER rigid body mover from one molecule. More...
 
def create_nuisance_mover
 Create MC normal mover for nuisance particles. More...
 
def create_rigid_body
 Create rigid body constraint and mover. More...
 
def create_super_rigid_body
 Create SUPER rigid body mover from one or more hierarchies. More...
 
def disable_movers
 Fix the position of the particles by disabling the corresponding movers. More...
 
def enable_all_movers
 Reenable all movers: previously fixed particles will be released. More...
 
def get_flexible_beads
 Return all flexible beads, including nonrigid members of rigid bodies. More...
 
def get_floppy_body_movers
 Return all movers corresponding to individual beads. More...
 
def get_movers
 Returns Enabled movers. More...
 
def get_nuisances_from_restraint
 Extract the nuisances from get_particles_to_sample() More...
 
def get_rigid_bodies
 Return list of rigid body objects. More...
 
def optimize_flexible_beads
 Set up MC run with just flexible beads. More...
 
def setup_md
 Setup particles for MD simulation. More...
 

Member Function Documentation

def IMP.pmi.dof.DegreesOfFreedom.constrain_symmetry (   self,
  references,
  clones,
  transform,
  resolution = 'all',
  type = 'AXIAL' 
)

Create a symmetry constraint.

Checks: same number of particles disable ANY movers involving symmetry copies (later may support moving them WITH references, but requires code to propagate constraint)

Parameters
referencesCan be one of the following inputs: IMP Hierarchy, PMI System/State/Molecule/TempResidue, or a list/set (of list/set) of them
clonesSame format as references
transformThe transform that moves a clone onto a reference IMP.algebra.Transformation3D
resolutionOnly used if you pass PMI objects. If you have a multires system, assuming each are rigid bodies you probably only need one resolution.
typeof symmetry. Implemented = AXIAL, RIGID_BODY

Definition at line 404 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.create_flexible_beads (   self,
  flex_parts,
  max_trans = 3.0,
  resolution = 'all' 
)

Create a chain of flexible beads.

Parameters
flex_partsCan be one of the following inputs: IMP Hierarchy, PMI System/State/Molecule/TempResidue, or a list/set (of list/set) of them. Must be uniform input, however. No mixing object types.
max_transMaximum flexible bead translation
resolutionOnly used if you pass PMI objects. Probably you want 'all'.

Definition at line 328 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.create_main_chain_mover (   self,
  molecule,
  resolution = 10,
  lengths = [5 
)

Create crankshaft moves from a set of SUPER rigid body mover from one molecule.

See http://scfbm.biomedcentral.com/articles/10.1186/1751-0473-3-12

Definition at line 208 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.create_nuisance_mover (   self,
  nuisance_p,
  step_size,
  name = None 
)

Create MC normal mover for nuisance particles.

We will add an easier interface to add all of them from a PMI restraint

Parameters
nuisance_pThe Nuisance particle (an ISD::Scale)
step_sizeThe maximum step size for Monte Carlo
nameThe name of the mover, useful for better output reading.

Definition at line 367 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.create_rigid_body (   self,
  rigid_parts,
  nonrigid_parts = None,
  max_trans = 4.0,
  max_rot = 0.5,
  nonrigid_max_trans = 4.0,
  resolution = 'all',
  name = None 
)

Create rigid body constraint and mover.

Parameters
rigid_partsCan be one of the following inputs: IMP Hierarchy, PMI System/State/Molecule/TempResidue, a list/set (of list/set) of them or a RigidBody object. Must be uniform input, however. No mixing object types.
nonrigid_partsSame input format as rigid_parts. Must be a subset of rigid_parts particles.
max_transMaximum rigid body translation
max_rotMaximum rigid body rotation
nonrigid_max_transMaximum step for the nonrigid (bead) particles
resolutionOnly used if you pass PMI objects. Probably you want 'all'.
nameRigid body name (if None, use IMP default)
Returns
(rb_movers,rb_object)
Note
If you want all resolutions, pass PMI objects because this function will get them all. Alternatively you can do your selection elsewhere and just pass hierarchies.

Definition at line 93 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.create_super_rigid_body (   self,
  srb_parts,
  max_trans = 1.0,
  max_rot = 0.1,
  chain_min_length = None,
  chain_max_length = None,
  resolution = 'all',
  name = None,
  axis = None 
)

Create SUPER rigid body mover from one or more hierarchies.

Can also create chain of SRBs. If you don't pass chain min/max, it'll treat everything you pass as ONE rigid body. If you DO pass chain min/max, it'll expect srb_parts is a list and break it into bits.

Parameters
srb_partsCan be one of the following inputs: IMP Hierarchy, PMI System/State/Molecule/TempResidue, or a list/set (of list/set) of them. Must be uniform input, however. No mixing object types.
max_transMaximum super rigid body translation
max_rotMaximum super rigid body rotation
chain_min_lengthCreate a CHAIN of super rigid bodies - must provide list; this parameter is the minimum chain length.
chain_max_lengthMaximum chain length
resolutionOnly used if you pass PMI objects. Probably you want 'all'.
nameThe name of the SRB (hard to assign a good one automatically)
axisA tuple containing two particles which are used to compute the rotation axis of the SRB. The default is None, meaning that the rotation axis is random.
Note
If you set the chain parameters, will NOT create an SRB from all of them together, but rather in groups made from the outermost list.

Definition at line 237 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.disable_movers (   self,
  objects,
  mover_types = None 
)

Fix the position of the particles by disabling the corresponding movers.

Parameters
objectsCan be one of the following inputs: IMP Hierarchy, PMI System/State/Molecule/TempResidue, or a list/set (of list/set) of them. Must be uniform input, however. No mixing object types.
mover_typesfurther filter the mover type that will be disabled; it can be a list of IMP.core.RigidBodyMover, IMP.core.BallMover etc etc if one wants to fix the corresponding rigid body, or the floppy bodies. An empty mover_types list is interpreted as all possible movers. It returns the list of fixed xyz particles (ie, floppy bodies/beads) and rigid bodies whose movers were disabled

Definition at line 543 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.enable_all_movers (   self)

Reenable all movers: previously fixed particles will be released.

Definition at line 577 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.get_flexible_beads (   self)

Return all flexible beads, including nonrigid members of rigid bodies.

Definition at line 528 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.get_floppy_body_movers (   self)

Return all movers corresponding to individual beads.

Definition at line 520 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.get_movers (   self)

Returns Enabled movers.

Definition at line 509 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.get_nuisances_from_restraint (   self,
  r 
)

Extract the nuisances from get_particles_to_sample()

Definition at line 581 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.get_rigid_bodies (   self)

Return list of rigid body objects.

Definition at line 524 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.optimize_flexible_beads (   self,
  nsteps,
  temperature = 1.0 
)

Set up MC run with just flexible beads.

Optimization works much better when restraints are already set up.

Definition at line 496 of file pmi/dof/__init__.py.

def IMP.pmi.dof.DegreesOfFreedom.setup_md (   self,
  hspec 
)

Setup particles for MD simulation.

Returns all particles, just pass this to molecular_dynamics_sample_objects in ReplicaExchange.

Parameters
hspecCan be one of the following inputs: IMP Hierarchy, PMI System/State/Molecule/TempResidue, or a list/set (of list/set) of them. Must be uniform input, however. No mixing object types.

Definition at line 384 of file pmi/dof/__init__.py.


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