IMP logo
IMP Reference Guide  2.7.0
The Integrative Modeling Platform
load_protein_restrain_bonds.py
1 ## \example atom/load_protein_restrain_bonds.py
2 # Load a protein from a PDB file and then restrain all the bonds to have their
3 # current length.
4 #
5 
6 from __future__ import print_function
7 import IMP.atom
8 import IMP.container
9 import sys
10 
11 IMP.setup_from_argv(sys.argv, "load protein restrain bonds")
12 
13 m = IMP.Model()
14 prot = IMP.atom.read_pdb(IMP.atom.get_example_path("example_protein.pdb"), m)
16 bds = IMP.atom.get_internal_bonds(prot)
18 h = IMP.core.Harmonic(0, 1)
21 print(br.evaluate(False))
Applies a SingletonScore to each Singleton in a list.
Strings setup_from_argv(const Strings &argv, std::string description, std::string positional_description, int num_positional)
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 read_pdb(TextInput input, int model, Hierarchy h)
Class for storing model, its restraints, constraints, and particles.
Definition: Model.h:72
Store a list of ParticleIndexes.
Score the bond based on a UnaryFunction,.
Functionality for loading, creating, manipulating and scoring atomic structures.
void add_bonds(Hierarchy d, const ForceFieldParameters *ffp=get_all_atom_CHARMM_parameters())
Harmonic function (symmetric about the mean)
Definition: core/Harmonic.h:24