2 """This script shows how to create a system with multiple copies of the same molecule.
3 We also create some crosslinks which take into account the ambiguity.
4 The key to ambiguity is using the same molecule name for ambiguous copies.
5 That way when you perform Selection it automatically finds all relevant molecules.
26 st1 = s.create_state()
27 st2 = s.create_state()
32 m1A = st1.create_molecule(
'ProtA',sequence,chain_id=
'A')
33 m1A.add_representation(m1A,resolutions=[1])
34 m1B = m1A.create_clone(chain_id=
'B')
38 m1C = st1.create_molecule(
'ProtC',sequence,chain_id=
'C')
39 m1C.add_representation(m1C,resolutions=[1])
42 m2A = st2.create_molecule(
'ProtA',sequence,chain_id=
'A')
43 m2A.add_representation(m2A,resolutions=[1])
44 m2C = st2.create_molecule(
'ProtC',sequence,chain_id=
'C')
45 m2C.add_representation(m2C,resolutions=[1])
54 for mol
in (m1A,m1B,m1C,m2A,m2C):
55 dof.create_flexible_beads(mol,
57 dof.create_super_rigid_body(mol)
66 lines =
'''id,mol1,res1,mol2,res2,score
69 fd, filename = tempfile.mkstemp()
72 tf = tempfile.NamedTemporaryFile
76 kw.set_unique_id_key(
"id")
77 kw.set_protein1_key(
"mol1")
78 kw.set_protein2_key(
"mol2")
79 kw.set_residue1_key(
"res1")
80 kw.set_residue2_key(
"res2")
81 kw.set_id_score_key(
"score")
82 xldb = IMP.pmi.io.crosslink.CrossLinkDataBase(kw)
83 xldb.create_set_from_file(filename)
89 CrossLinkDataBase=xldb,
95 output_objects.append(xlr)
96 rmf_restraints.append(xlr)
97 dof.get_nuisances_from_restraint(xlr)
101 for mol
in (m1A,m1B,m1C,m2A,m2C):
104 output_objects.append(cr)
105 rmf_restraints.append(cr)
110 output_objects.append(evr1)
113 output_objects.append(evr2)
130 crosslink_restraints=rmf_restraints,
131 monte_carlo_sample_objects=dof.get_movers(),
132 global_output_directory=
'ambiguity_output/',
133 output_objects=output_objects,
134 monte_carlo_steps=10,
A class to simplify create of constraints and movers for an IMP Hierarchy.
Setup cross-link distance restraints from mass spectrometry data.
Restraints for keeping correct stereochemistry.
void show_with_representations(Hierarchy h, std::ostream &out=std::cout)
Traverse through the tree and show atom info, including representations.
Set of python classes to create a multi-state, multi-resolution IMP hierarchy.
GenericHierarchies get_leaves(Hierarchy mhd)
Get all the leaves of the bit of hierarchy.
Protocols for sampling structures and analyzing them.
This class initializes the root node of the global IMP.atom.Hierarchy.
This class is needed to convert the keywords from a generic database to the standard ones...
Class for storing model, its restraints, constraints, and particles.
void transform(XYZ a, const algebra::Transformation3D &tr)
Apply a transformation to the particle.
A decorator for a particle with x,y,z coordinates.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
This class creates a restraint between consecutive TempResidue objects OR an entire PMI MOlecule obje...
Create movers and setup constraints for PMI objects.
A class to create an excluded volume restraint for a set of particles at a given resolution.
Restraints for handling crosslinking data.
Python classes to represent, score, sample and analyze models.
A macro to help setup and run replica exchange.
Functionality for loading, creating, manipulating and scoring atomic structures.
Support for the RMF file format for storing hierarchical molecular data and markup.