This script shows how to represent a system at multiple scales and do basic sampling.
"""This script shows how to represent a system at multiple scales and do
basic sampling.
"""
import IMP
import sys
print("This example is too slow to test in debug mode - run without")
print("internal tests enabled")
sys.exit(0)
components = ["Rpb1", "Rpb2", "Rpb3", "Rpb4"]
colors = ['medium purple', 'goldenrod', 'orchid', 'olive drab']
chains = "ABCD"
beadsize = 10
st = s.create_state()
mols = []
for n in range(len(components)):
print('PMI: setting up', components[n], '1WCM:'+chains[n])
mol = st.create_molecule(
components[n],
sequence=seqs['1WCM:'+chains[n]],
chain_id=chains[n])
atomic = mol.add_structure(
chain_id=chains[n], offset=0)
mol.add_representation(atomic,
resolutions=[1, 10],
color=colors[n])
mol.add_representation(mol[:]-atomic,
resolutions=[beadsize],
color=colors[n])
mols.append(mol)
root_hier = s.build()
for mol in mols:
dof.create_rigid_body(mol,
nonrigid_parts=mol.get_non_atomic_residues(),
max_trans=0.1,
max_rot=0.78,
nonrigid_max_trans=0.1)
output_objects = []
crs = []
for mol in mols:
cr.add_to_model()
output_objects.append(cr)
crs.append(cr)
included_objects=mols)
evr.add_to_model()
output_objects.append(evr)
dof.optimize_flexible_beads(100)
mdl,
root_hier=root_hier,
monte_carlo_sample_objects=dof.get_movers(),
global_output_directory='multiscale_output/',
output_objects=output_objects,
monte_carlo_steps=10,
number_of_best_scoring_models=0,
number_of_frames=1)
rex.execute_macro()
Class for storing model, its restraints, constraints, and particles.
Simplify creation of constraints and movers for an IMP Hierarchy.
A macro to help setup and run replica exchange.
Create a restraint between consecutive TempResidue objects or an entire PMI Molecule object.
A class to create an excluded volume restraint for a set of particles at a given resolution.
A dictionary-like wrapper for reading and storing sequence data.
Represent the root node of the global IMP.atom.Hierarchy.
Functionality for loading, creating, manipulating and scoring atomic structures.
Create movers and set up constraints for PMI objects.
Protocols for sampling structures and analyzing them.
Restraints for keeping correct stereochemistry.
Classes to handle different kinds of restraints.
Set of Python classes to create a multi-state, multi-resolution IMP hierarchy.
Python classes to represent, score, sample and analyze models.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Support for the RMF file format for storing hierarchical molecular data and markup.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.
CheckLevel get_check_level()
Get the current audit mode.