LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
|
Class for reading in AMBER parmtop/coord files... More...
#include <amber.hpp>
Public Member Functions | |
Amber (const std::string &fname) | |
Read in a parmtop file. | |
Amber (std::istream &ifs) | |
virtual Amber * | clone (void) const |
Clones an object for polymorphism... | |
Amber | copy (void) const |
Deep copy. | |
void | read (std::istream &ifs) |
Parse the parmtop file. | |
std::string | title () const |
Return the title. | |
Public Member Functions inherited from loos::AtomicGroup | |
AtomicGroup (const int n) | |
Creates a new AtomicGroup with n un-initialized atoms. | |
AtomicGroup (const AtomicGroup &g) | |
Copy constructor (atoms and box shared) | |
AtomicGroup | copy (void) const |
Creates a deep copy of this group. | |
uint | length (void) const |
uint | size (void) const |
bool | empty (void) const |
pAtom | getAtom (const int i) const |
Get the ith atom from this group. | |
pAtom & | operator[] (const int i) |
Same as getAtom(i) | |
const pAtom & | operator[] (const int i) const |
AtomicGroup & | append (pAtom pa) |
Append the atom onto the group. | |
AtomicGroup & | append (std::vector< pAtom > pas) |
Append a vector of atoms. | |
AtomicGroup & | append (const AtomicGroup &grp) |
Append an entire AtomicGroup onto this one (concatenation) | |
AtomicGroup & | remove (pAtom pa) |
Delete a single atom. | |
AtomicGroup & | remove (std::vector< pAtom > pas) |
Deletes a set of atoms. | |
AtomicGroup & | remove (const AtomicGroup &grp) |
Deletes all atoms in the passed grp that are also in the current group. | |
AtomicGroup & | operator+= (const AtomicGroup &rhs) |
AtomicGroup & | operator+= (const pAtom &rhs) |
AtomicGroup | operator+ (const AtomicGroup &rhs) |
AtomicGroup | operator+ (const pAtom &rhs) |
bool | operator== (AtomicGroup &rhs) |
Equality test for two groups. | |
bool | operator!= (AtomicGroup &rhs) |
Inequality test for two groups. | |
bool | operator== (const AtomicGroup &rhs) const |
Equality test for const groups. | |
bool | operator!= (const AtomicGroup &rhs) const |
Inequality test for two groups. | |
AtomicGroup | subset (const int offset, const int len=0) |
subset() and excise() args are patterned after perl's substr... | |
AtomicGroup | excise (const int offset, const int len=0) |
excise returns the excised atoms as a group... | |
template<class EqualsOp > | |
bool | contains (const pAtom &p, const EqualsOp &op) const |
Determines if a pAtom is contained in this group using the EqualsOp atom-equality policy. | |
bool | contains (const pAtom &p) const |
Determines if a pAtom is contained in this group using the AtomEquals policy (ie the default comparison policy) | |
template<class EqualsOp > | |
bool | contains (const AtomicGroup &g, const EqualsOp &op) const |
Determines if the passed group is a subset of the current group using the EqualsOp atom-equality policy. | |
bool | contains (const AtomicGroup &g) const |
Determines if a group is a subset of the current group using the default AtomEquals policy. | |
template<class EqualsOp > | |
bool | containsAny (const AtomicGroup &g, const EqualsOp &op) const |
Determines if a group contains any atom. | |
bool | containsAny (const AtomicGroup &g) const |
Determines if a group contains any atom using the default AtomEquals policy. | |
template<class EqualsOp > | |
AtomicGroup | intersect (const AtomicGroup &g, const EqualsOp &op) |
Computes the intersection of two groups using the EqualsOp atom-equality policy. | |
AtomicGroup | intersect (const AtomicGroup &g) |
Intersection of two groups. | |
template<class EqualsOp > | |
AtomicGroup | merge (const AtomicGroup &g, const EqualsOp &op) |
Union of two groups using the specified atom-equality policy. | |
AtomicGroup | merge (const AtomicGroup &g) |
Union of two groups using the default AtomEquals atom-equality policy. | |
AtomicGroup | select (const AtomSelector &sel) const |
Return a group consisting of atoms for which sel predicate returns true... | |
std::vector< AtomicGroup > | splitByUniqueSegid (void) const |
Returns a vector of AtomicGroups split from the current group based on segid. | |
std::vector< AtomicGroup > | splitByMolecule (void) const |
Returns a vector of AtomicGroups split based on bond connectivity. | |
std::vector< AtomicGroup > | splitByMolecule (const std::string &selection) const |
std::vector< AtomicGroup > | splitByResidue (void) const |
Returns a vector of AtomicGroups, each comprising a single residue. | |
std::map< std::string, AtomicGroup > | splitByName (void) const |
Returns a vector of AtomicGroups, each containing atoms with the same name. | |
AtomicGroup | centrifyByMolecule () const |
Replace a group with the center of masses of contained molecules. | |
AtomicGroup | centrifyByResidue () const |
Replace a group with the cente of masses of contained residues (see centrifyByMolecule()) | |
pAtom | findById (const int id) const |
Find a contained atom by its atomid. | |
AtomicGroup | groupFromID (const std::vector< int > &id_list) const |
Create a new group from a vector of atomids. | |
AtomicGroup | groupFromID (const std::pair< int, int > &id_pair) const |
Create a new group from a pair of atomids. | |
AtomicGroup | getResidue (pAtom res) |
std::string | asString () const |
void | renumber (const int start=1, const int stride=1) |
Renumber the atomid's of the contained atoms... | |
int | minId (void) const |
int | maxId (void) const |
int | minResid (void) const |
int | maxResid (void) const |
int | numberOfResidues (void) const |
int | numberOfSegids (void) const |
bool | allHaveProperty (const Atom::bits &property) const |
True if all atoms in the group have the passed property(ies) | |
bool | anyHaveProperty (const Atom::bits &property) const |
True if any atom in the group have the passed property(ies) | |
bool | hasBonds (void) const |
Does any atom in the group have bond information??? | |
bool | hasCoords (void) const |
Do all the atoms in the group have coordinates? | |
void | clearBonds (void) |
Remove any bonding information present in contained atoms. | |
void | pruneBonds () |
Attempt to prune connectivity (only retain bonds to atoms within this AtomicGroup) | |
void | resetAtomIndices () |
Reset the atom indices (used for interfacing with trajectories) | |
uint | deduceAtomicNumberFromMass (const double tol=0.1) |
Deduce atomic number from mass (if present), returning number of atoms assigned. | |
double | deduceMassFromAtomicNumber () |
Deduce mass from atomic number (if present), returning the number of atoms assigned. | |
bool | sorted (void) const |
Is the array of atoms already sorted??? | |
void | sort (void) |
Sort based on atomid. | |
bool | isPeriodic (void) const |
Test whether or not periodic boundary conditions are set. | |
GCoord | periodicBox (void) const |
Fetch the periodic boundary conditions. | |
void | periodicBox (const GCoord &c) |
Set the periodic boundary conditions. | |
void | periodicBox (const greal x, const greal y, const greal z) |
Set the periodic boundary conditions. | |
const greal | ocf (uint offset) |
compute OCF for all atom-pairs in AG of distance offset from one another | |
loos::SharedPeriodicBox | sharedPeriodicBox () const |
Provide access to the underlying shared periodic box... | |
void | removePeriodicBox () |
Remove periodicity. | |
void | reimage () |
void | reimageByAtom () |
Reimage atoms individually into the primary cell. | |
void | mergeImage (pAtom &p) |
Takes a group that's split across a periodic boundary and reimages it so it's all together. | |
void | mergeImage () |
Takes a group that's split across a periodic boundary and reimages it so it's all together, using the first atom in the AtomicGroup as the reference. | |
AtomicGroup | within (const double dist, AtomicGroup &grp) const |
Find atoms in the current group that are within dist angstroms of any atom in grp. | |
AtomicGroup | within (const double dist, AtomicGroup &grp, const GCoord &box) const |
Find atoms in grp that are within dist angstroms of atoms in the current group, considering periodicity. | |
bool | contactWith (const double dist, const AtomicGroup &grp, const uint min=1) const |
Returns true if any atom of current group is within dist angstroms of grp. | |
bool | contactWith (const double dist, const AtomicGroup &grp, const GCoord &box, const uint min=1) const |
Returns true if any atom of current group is within dist angstroms of grp. | |
std::vector< std::pair< int, int > > | getBondsIDs () const |
return a list of atom ID pairs that correspond to all unique bonds. | |
std::vector< AtomicGroup > | getBondsAGs () const |
return a list of atom index pairs corresponding to all unique bonds. | |
void | findBonds (const double dist, const GCoord &box) |
Distance-based search for bonds. | |
void | findBonds (const double dist) |
void | findBonds (const GCoord &box) |
void | findBonds () |
template<class T > | |
T | apply (T func) |
Apply a functor or a function to each atom in the group. | |
iterator | begin (void) |
iterator | end (void) |
const_iterator | begin (void) const |
const_iterator | end (void) const |
std::vector< GCoord > | boundingBox (void) const |
Bounding box for the group... | |
GCoord | centerAtOrigin (void) |
Translates the group so that the centroid is at the origin. | |
GCoord | centroid (void) const |
Centroid of atoms (ignores mass, operates in group coordinates) | |
greal | radius (const bool use_atom_as_reference=false) const |
Maximum radius from centroid of all atoms (not gyration) | |
GCoord | centerOfMass (void) const |
Center of mass of the group (in group coordinates) | |
GCoord | centerOfElectrons (void) const |
Analogous to center of mass. | |
GCoord | dipoleMoment (void) const |
Dipole moment, relative to group's centroid. | |
greal | totalCharge (void) const |
greal | totalMass (void) const |
greal | radiusOfGyration (void) const |
greal | sphericalVariance (const pAtom) const |
Spherical variance of group with respect to target atom. | |
greal | sphericalVariance (const GCoord) const |
greal | stacking (const AtomicGroup &, const GCoord &box, const double threshold) const |
Estimate stacking, as between two nucleobases. | |
greal | rmsd (const AtomicGroup &) |
Compute the RMSD between two groups. | |
greal | kineticEnergy () |
Compute kinetic energy of group. | |
std::vector< GCoord > | getTransformedCoords (const XForm &) const |
Returns a vector of coordinates transformed by the passed XForm. | |
std::vector< GCoord > | differenceVectors (const AtomicGroup &other) |
Compute difference vectors between two AtomicGroups. | |
void | translate (const GCoord &v) |
Translate an atomic group by vector v. | |
void | rotate (const GCoord &axis, const greal angle_in_degrees) |
Rotate group's coordinates (right-handed, about centroid) | |
void | applyTransform (const XForm &) |
Apply the given transform to the group's coordinates... | |
void | copyCoordinatesWithIndex (const std::vector< GCoord > &coords) |
Copy coordinates from a vector of GCoords using the atom index as an index into the vector. | |
void | copyVelocitiesWithIndex (const std::vector< GCoord > &velocities) |
Copy velocities from a vector of GCoords using the atom index as an index into the vector. | |
void | copyCoordinatesFrom (const AtomicGroup &g, const uint offset=0, const uint length=0) |
Copy coordinates from g into current group. | |
std::vector< uint > | atomOrderMapFrom (const AtomicGroup &g) |
Map the order of atoms in AtomicGroup g into the current group. | |
void | copyMappedCoordinatesFrom (const AtomicGroup &g, const std::vector< uint > &order) |
Given a mapping of atom order, copy the coordinates into the current group. | |
void | copyMappedCoordinatesFrom (const AtomicGroup &g) |
Copy the coordinates from the group mapping the atom order. | |
void | perturbCoords (const greal) |
Each atom is moved in a random direction by a vector of the passed size. | |
std::vector< GCoord > | principalAxes (void) const |
Compute the principal axes of a group. | |
double | principalAxesOrder (void) const |
Computes order parameter based on principalAxes. | |
std::vector< GCoord > | momentsOfInertia (void) const |
Computes the moments of inertia for a group. | |
GMatrix | superposition (const AtomicGroup &) |
Calculates the transformation matrix for superposition of groups. | |
GMatrix | alignOnto (const AtomicGroup &) |
Superimposes the current group onto the passed group. | |
void | orientAlong (const GCoord &) |
Orient the principal axis of this group along the supplied vector. | |
void | setCoords (double *seq, int m, int n) |
void | getCoords (double **outseq, int *m, int *n) |
std::vector< double > | coordsAsVector () const |
double | packingScore (const AtomicGroup &other, const GCoord &box, bool norm) const |
double | logisticContact (const AtomicGroup &group, double radius, int sigma, const GCoord &box) const |
double | logisticContact2D (const AtomicGroup &group, double radius, int sigma, const GCoord &box) const |
double | hardContact (const AtomicGroup &group, double radius, const GCoord &box) const |
double | hardContact2D (const AtomicGroup &group, double radius, const GCoord &box) const |
std::vector< double > | scattering (const double qmin, const double max, const uint numValues, loos::FormFactorSet &formFactors) |
Static Public Member Functions | |
static pAtomicGroup | create (const std::string &fname) |
Additional Inherited Members | |
Public Types inherited from loos::AtomicGroup | |
typedef std::vector< pAtom >::iterator | iterator |
typedef std::vector< pAtom >::const_iterator | const_iterator |
typedef pAtom | value_type |
Static Public Attributes inherited from loos::AtomicGroup | |
static const double | superposition_zero_singular_value = 1e-10 |
Protected Member Functions inherited from loos::AtomicGroup | |
void | setGroupConnectivity () |
Protected Attributes inherited from loos::AtomicGroup | |
std::vector< pAtom > | atoms |
loos::SharedPeriodicBox | box |
Class for reading in AMBER parmtop/coord files...
This class is largely geared towards reading parmtop files. It only parses a subset of the spec and follows more the format as defined from example files and VMD than from the Amber website.
Atomic numbers will be deduced from the masses. No error is generated if an atomic mass is unknown to LOOS. In order to verify that all atoms have an assigned mass, use the following,
|
inlinevirtual |
Clones an object for polymorphism...
Reimplemented from loos::AtomicGroup.