143 def create_representation():
146 all.set_name(
"the universe")
158 def create_protein_from_pdbs(name, files):
159 def create_from_pdb(file):
165 c =
IMP.atom.Chain(IMP.atom.get_by_type(t, IMP.atom.CHAIN_TYPE)[0])
166 if c.get_number_of_children() == 0:
175 rb.set_coordinates_are_optimized(
True)
181 for i, f
in enumerate(files):
182 c = create_from_pdb(f)
184 c.set_name(name +
" chain " + str(i))
190 h = create_from_pdb(files[0])
198 create_protein_from_pdbs(
"Seh1", [
"seh1.pdb"])
199 create_protein_from_pdbs(
"Sec13", [
"sec13.pdb"])
204 def add_connectivity_restraint(s):
208 def add_distance_restraint(s0, s1):
214 residue_indexes=range(0, 423))
217 add_connectivity_restraint([s0, s1, s2])
218 add_distance_restraint(
220 residue_indexes=range(0, 423)),
222 add_distance_restraint(
224 residue_indexes=range(0, 423)),
226 residue_indexes=range(500, 762)))
229 hierarchy=all, molecule=
"Nup133",
230 residue_indexes=range(778, 1160)))
233 add_distance_restraint(
235 residue_indexes=range(0, 423)),
240 (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.
Create a scoring function on a list of restraints.
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 particles of a Model object.
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.
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.