138 def create_representation():
141 all.set_name(
"the universe")
148 for c
in h.get_children()],
153 def create_protein_from_pdbs(name, files):
154 def create_from_pdb(file):
162 if c.get_number_of_children() == 0:
163 IMP.atom.show_molecular_hierarchy(t)
171 rb.set_coordinates_are_optimized(
True)
177 for i, f
in enumerate(files):
178 c = create_from_pdb(f)
180 c.set_name(name +
" chain " + str(i))
182 for c
in h.get_children(
188 h = create_from_pdb(files[0])
196 create_protein_from_pdbs(
"Seh1", [
"seh1.pdb"])
197 create_protein_from_pdbs(
"Sec13", [
"sec13.pdb"])
202 def add_connectivity_restraint(s):
206 def add_distance_restraint(s0, s1):
212 residue_indexes=range(0, 423))
215 add_connectivity_restraint([s0, s1, s2])
216 add_distance_restraint(
218 residue_indexes=range(0, 423)),
220 add_distance_restraint(
222 residue_indexes=range(0, 423)),
224 residue_indexes=range(500, 762)))
227 residue_indexes=range(778, 1160)))
230 add_distance_restraint(
232 residue_indexes=range(0, 423)),
236 (m, all) = create_representation()
242 IMP.base.show_graphviz(dg)
247 IMP.base.show_graphviz(pdg)
See IMP.container for more information.
kernel::Restraints create_restraints(RMF::FileConstHandle fh, kernel::Model *m)
See IMP.base for more information.
DependencyGraph get_pruned_dependency_graph(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.
DependencyGraph get_dependency_graph(kernel::Model *m)
kernel::Restraint * create_excluded_volume_restraint(const Selections &s)
Select all non-alternative ATOM records.
Hierarchy create_protein(kernel::Model *m, std::string name, double target_radius, const Ints domain_boundaries)
static Hierarchy setup_particle(kernel::Model *m, kernel::ParticleIndex pi, kernel::ParticleIndexesAdaptor children=kernel::ParticleIndexesAdaptor())
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
See IMP.kernel for more information.
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.
std::string get_example_path(std::string file_name)
Return the path to installed example data for this module.
Hierarchy create_simplified_along_backbone(Chain input, const IntRanges &residue_segments, bool keep_detailed=false)
IMP::core::RigidBody create_rigid_body(Hierarchy h)
Hierarchy create_protein(kernel::Model *m, std::string name, double target_radius, int number_of_residues, int first_residue_index=0, double volume=-1)
Create a coarse grained molecule.
Store info for a chain of a protein.
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
See IMP.atom for more information.
void read_pdb(base::TextInput input, int model, Hierarchy h)
Hierarchies get_leaves(const Selection &h)
Class for storing model, its restraints, constraints, and particles.