143def create_representation():
146 all.set_name(
"the universe")
149 def create_protein(name, ds):
158 def create_protein_from_pdbs(name, files):
159 def create_from_pdb(file):
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])
193 create_protein(
"Nup85", 570)
194 create_protein(
"Nup84", 460)
195 create_protein(
"Nup145C", 442)
196 create_protein(
"Nup120", [0, 500, 761])
197 create_protein(
"Nup133", [0, 450, 778, 1160])
198 create_protein_from_pdbs(
"Seh1", [
"seh1.pdb"])
199 create_protein_from_pdbs(
"Sec13", [
"sec13.pdb"])
203def create_restraints(m, rs, all):
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()
241create_restraints(m, rs, all)
Class for storing model, its restraints, constraints, and particles.
Class to handle individual particles of a Model object.
A class to change and restore log state.
Select all non-alternative ATOM records.
Store info for a chain of a protein.
static Hierarchy setup_particle(Model *m, ParticleIndex pi, ParticleIndexesAdaptor children=ParticleIndexesAdaptor())
Create a Hierarchy of level t by adding the needed attributes.
void destroy(Hierarchy d)
Delete the Hierarchy.
Hierarchies get_by_type(Hierarchy mhd, GetByType t)
Gather all the molecular particles of a certain level in the hierarchy.
Select hierarchy particles identified by the biological name.
Create a scoring function on a list of restraints.
Functionality for loading, creating, manipulating and scoring atomic structures.
IMP::core::RigidBody create_rigid_body(const Hierarchies &h, std::string name=std::string("created rigid body"))
Rigidify a molecule or collection of molecules.
Restraint * create_connectivity_restraint(const Selections &s, double k, std::string name="Connectivity%1%")
Create a restraint connecting the selections.
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.
Restraint * create_distance_restraint(const Selection &n0, const Selection &n1, double x0, double k, std::string name="Distance%1%")
Hierarchy read_pdb(TextInput input, Model *model, PDBSelector *selector=get_default_pdb_selector(), bool select_first_model=true)
Read all the molecules in the first model of the PDB file.
void show_molecular_hierarchy(Hierarchy h)
Print out the molecular hierarchy.
Restraint * create_excluded_volume_restraint(const Hierarchies &hs, double resolution=-1)
Hierarchy create_simplified_along_backbone(Hierarchy input, int num_res, bool keep_detailed=false, Model *m=nullptr)
Various classes to hold sets of particles.
std::string get_example_path(std::string file_name)
Return the full path to one of this module's example files.
void setup_from_argv(int argc, char **argv, std::string description)
Parse the command line flags and return the positional arguments.
std::string show_graphviz(Graph g)
DependencyGraph get_pruned_dependency_graph(Model *m)
DependencyGraph get_dependency_graph(Model *m)