136 def create_representation():
139 all.set_name(
"the universe")
147 for c
in h.get_children()],
152 def create_protein_from_pdbs(name, files):
153 def create_from_pdb(file):
159 c =
IMP.atom.Chain(IMP.atom.get_by_type(t, IMP.atom.CHAIN_TYPE)[0])
160 if c.get_number_of_children() == 0:
169 rb.set_coordinates_are_optimized(
True)
175 for i, f
in enumerate(files):
176 c = create_from_pdb(f)
178 c.set_name(name +
" chain " + str(i))
180 for c
in h.get_children(
186 h = create_from_pdb(files[0])
194 create_protein_from_pdbs(
"Seh1", [
"seh1.pdb"])
195 create_protein_from_pdbs(
"Sec13", [
"sec13.pdb"])
200 def add_connectivity_restraint(s):
204 def add_distance_restraint(s0, s1):
210 residue_indexes=range(0, 423))
213 add_connectivity_restraint([s0, s1, s2])
214 add_distance_restraint(
216 residue_indexes=range(0, 423)),
218 add_distance_restraint(
220 residue_indexes=range(0, 423)),
222 residue_indexes=range(500, 762)))
225 residue_indexes=range(778, 1160)))
228 add_distance_restraint(
230 residue_indexes=range(0, 423)),
234 (m, rs, all) = create_representation()
void show_molecular_hierarchy(Hierarchy h)
Print out the molecular hierarchy.
DependencyGraph get_dependency_graph(Model *m)
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
Various classes to hold sets of particles.
void read_pdb(TextInput input, int model, Hierarchy h)
Class for storing model, its restraints, constraints, and particles.
Hierarchy create_protein(Model *m, std::string name, double target_radius, const Ints domain_boundaries)
Select all non-alternative ATOM records.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
Hierarchy create_protein(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.
A class to change and restore log state.
DependencyGraph get_pruned_dependency_graph(Model *m)
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
Hierarchy create_simplified_along_backbone(Chain input, const IntRanges &residue_segments, bool keep_detailed=false)
Restraints create_restraints(RMF::FileConstHandle fh, Model *m)
IMP::core::RigidBody create_rigid_body(Hierarchy h)
Class to handle individual model particles.
std::string show_graphviz(Graph g)
Restraint * create_distance_restraint(const Selection &n0, const Selection &n1, double x0, double k, std::string name="Distance%1%")
Store info for a chain of a protein.
Restraint * create_connectivity_restraint(const Selections &s, double x0, double k, std::string name="Connectivity%1%")
Create a restraint connecting the selections.
Functionality for loading, creating, manipulating and scoring atomic structures.
Hierarchies get_leaves(const Selection &h)
Restraint * create_excluded_volume_restraint(const Selections &s)
Create an excluded volume restraint for a list of selections.
Select hierarchy particles identified by the biological name.