This defines all of the segments (chains) in the model as CHARMMSegmentTopology objects, which in turn define the list of residues, the atoms in each residue, and their types and the connectivity between them.
A CHARMMTopology object can be created manually, in which case add_segment() can be called to add individual CHARMMSegmentTopology objects. In this way a new topology can be created, e.g. from protein primary sequence.
Alternatively, given an existing Hierarchy, e.g. as returned from read_pdb(), CHARMMParameters::create_topology() can be called to generate a new topology that corresponds to the primary sequence of the Hierarchy.
A new topology can be patched (apply_default_patches() or CHARMMPatch::apply()) to modify the simple chain of residues to account for modified residues, C- or N-termini special cases, disulfide bridges, etc.
Once a topology is created, it can be used to generate new particles which conform to that topology (create_hierarchy()), or to add topology information to an existing Hierarchy (e.g. add_atom_types(), add_bonds(), add_charges()).
Public Member Functions | |
void | add_atom_types (Hierarchy hierarchy) const |
Add CHARMM atom types to the given Hierarchy using this topology. | |
Particles | add_bonds (Hierarchy hierarchy, const CHARMMParameters *ff) const |
Add bonds to the given Hierarchy using this topology, and return them. | |
void | add_charges (Hierarchy hierarchy) const |
Add CHARMM charges to the given Hierarchy using this topology. | |
Particles | add_impropers (Hierarchy hierarchy, const CHARMMParameters *ff) const |
Add impropers to the given Hierarchy using this topology, and return them. | |
unsigned int | add_segment (CHARMMSegmentTopology *obj) |
void | add_segments (const CHARMMSegmentTopologys &obj) |
void | apply_default_patches (const CHARMMParameters *ff) |
Call CHARMMSegmentTopology::apply_default_patches() for all segments. | |
void | clear_segments () |
Hierarchy | create_hierarchy (Model *model) const |
Create a new Hierarchy in the given model using this topology. | |
bool | get_has_segments () const |
return true if there are any objects in the container | |
unsigned int | get_number_of_segments () const |
CHARMMSegmentTopology * | get_segment (unsigned int i) const |
virtual std::string | get_type_name () const |
virtual ::IMP::VersionInfo | get_version_info () const |
void | remove_segment (CHARMMSegmentTopology *d) |
Remove any occurences of d from the container. | |
void | remove_segments (const CHARMMSegmentTopologys &d) |
Remove any occurences of each item in d. | |
template<class F > | |
void | remove_segments_if (const F &f) |
Remove any occurrences for which f is true. | |
void | reserve_segments (unsigned int sz) |
CHARMMSegmentTopologyConstIterator | segments_begin () const |
CHARMMSegmentTopologyIterator | segments_begin () |
CHARMMSegmentTopologyConstIterator | segments_end () const |
CHARMMSegmentTopologyIterator | segments_end () |
void | set_segments (const CHARMMSegmentTopologys &ps) |
Friends | |
template<class T > | |
void | IMP::internal::unref (T *) |
void IMP::atom::CHARMMTopology::add_atom_types | ( | Hierarchy | hierarchy | ) | const |
Add CHARMM atom types to the given Hierarchy using this topology.
The primary sequence of the Hierarchy must match that of the topology.
Particles IMP::atom::CHARMMTopology::add_bonds | ( | Hierarchy | hierarchy, | |
const CHARMMParameters * | ff | |||
) | const |
Add bonds to the given Hierarchy using this topology, and return them.
The primary sequence of the Hierarchy must match that of the topology. Parameters for the bonds (ideal bond length, force constant) are extracted from the CHARMM parameter file, using the types of each atom (add_atom_types() must be called first, or the particles otherwise manually typed using CHARMMAtom::set_charmm_type()).
If no parameters are defined for a given bond, the bond is created with zero stiffness, such that the bond can still be excluded from nonbonded interactions but BondSingletonScore will not score it.
Note that typically CHARMM defines bonds and impropers (see add_impropers()) but angles and dihedrals are auto-generated from the existing bond graph (see CHARMMParameters::generate_angles() and CHARMMParameters::generate_dihedrals()).
The list of newly-created Bond particles can be passed to a StereochemistryPairFilter to exclude bonded particles from nonbonded interactions, or to a BondSingletonScore to score each bond.
void IMP::atom::CHARMMTopology::add_charges | ( | Hierarchy | hierarchy | ) | const |
Particles IMP::atom::CHARMMTopology::add_impropers | ( | Hierarchy | hierarchy, | |
const CHARMMParameters * | ff | |||
) | const |
Add impropers to the given Hierarchy using this topology, and return them.
The primary sequence of the Hierarchy must match that of the topology.
The list of newly-created Dihedral particles can be passed to a ImproperSingletonScore to score each improper dihedral.
unsigned int IMP::atom::CHARMMTopology::add_segment | ( | CHARMMSegmentTopology * | obj | ) |
void IMP::atom::CHARMMTopology::add_segments | ( | const CHARMMSegmentTopologys & | obj | ) |
Add several objects to the container. They are not necessarily added at the end.
Create a new Hierarchy in the given model using this topology.
The hierarchy contains chains, residues and atoms as defined in the topology. Note, however, that none of the generated atoms is given coordinates.
CHARMMSegmentTopology* IMP::atom::CHARMMTopology::get_segment | ( | unsigned int | i | ) | const |
Get the object refered to by the index
IndexException | in Python if the index is out of range |
void IMP::atom::CHARMMTopology::set_segments | ( | const CHARMMSegmentTopologys & | ps | ) |
Set the contents of the container to ps removing all its current contents.