134 def create_representation():
137 all.set_name(
"the universe")
144 for c
in h.get_children()],
149 def create_protein_from_pdbs(name, files):
150 def create_from_pdb(file):
157 if c.get_number_of_children() == 0:
158 IMP.atom.show_molecular_hierarchy(t)
166 rb.set_coordinates_are_optimized(
True)
172 for i, f
in enumerate(files):
173 c = create_from_pdb(f)
175 c.set_name(name +
" chain " + str(i))
177 for c
in h.get_children(
183 h = create_from_pdb(files[0])
191 create_protein_from_pdbs(
"Seh1", [
"seh1.pdb"])
192 create_protein_from_pdbs(
"Sec13", [
"sec13.pdb"])
197 def add_connectivity_restraint(s):
201 def add_distance_restraint(s0, s1):
207 residue_indexes=range(0, 423))
210 add_connectivity_restraint([s0, s1, s2])
211 add_distance_restraint(
213 residue_indexes=range(0, 423)),
215 add_distance_restraint(
217 residue_indexes=range(0, 423)),
219 residue_indexes=range(500, 762)))
222 residue_indexes=range(778, 1160)))
225 add_distance_restraint(
227 residue_indexes=range(0, 423)),
231 (m, all) = create_representation()
236 dg = IMP.get_dependency_graph(m)
237 IMP.show_graphviz(dg)
240 pdg = IMP.get_pruned_dependency_graph(m)
242 IMP.show_graphviz(pdg)
Hierarchy create_protein(kernel::Model *m, std::string name, double resolution, const Ints domain_boundaries)
See IMP.container for more information.
kernel::Restraints create_restraints(RMF::FileConstHandle fh, kernel::Model *m)
kernel::Restraint * create_distance_restraint(const Selection &n0, const Selection &n1, double x0, double k, std::string name="Distance%1%")
A class to change and restore log state.
kernel::Restraint * create_excluded_volume_restraint(const Selections &s)
Select all non-alternative ATOM records.
static Hierarchy setup_particle(kernel::Model *m, kernel::ParticleIndex pi, kernel::ParticleIndexesAdaptor children=kernel::ParticleIndexesAdaptor())
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
kernel::Restraint * create_connectivity_restraint(const Selections &s, double x0, double k, std::string name="Connectivity%1%")
Class to handle individual model particles.
void destroy(Hierarchy d)
Delete the Hierarchy.
Hierarchy create_simplified_along_backbone(Chain input, const IntRanges &residue_segments, bool keep_detailed=false)
IMP::core::RigidBody create_rigid_body(Hierarchy h)
Store info for a chain of a protein.
See IMP.atom for more information.
void read_pdb(base::TextInput input, int model, Hierarchy h)
Hierarchies get_leaves(const Selection &h)
Hierarchy create_protein(kernel::Model *m, std::string name, double resolution, int number_of_residues, int first_residue_index=0, double volume=-1)
Create a coarse grained molecule.
Class for storing model, its restraints, constraints, and particles.