Open Babel
3.0
|
#include <openbabel/residue.h>
Public Member Functions | |
OBResidue (void) | |
OBResidue (const OBResidue &) | |
virtual | ~OBResidue (void) |
OBResidue & | operator= (const OBResidue &) |
void | AddAtom (OBAtom *atom) |
void | InsertAtom (OBAtom *atom) |
void | RemoveAtom (OBAtom *atom) |
bool | Clear () |
void | SetName (const std::string &resname) |
void | SetNum (const unsigned int resnum) |
void | SetNum (const std::string resnum) |
void | SetChain (const char chain) |
void | SetChainNum (const unsigned int chainnum) |
void | SetIdx (const unsigned int idx) |
void | SetInsertionCode (const char insertioncode) |
void | SetAtomID (OBAtom *atom, const std::string &id) |
void | SetHetAtom (OBAtom *atom, bool hetatm) |
void | SetSerialNum (OBAtom *atom, unsigned int sernum) |
std::string | GetName (void) const |
int | GetNum (void) |
std::string | GetNumString (void) |
unsigned int | GetNumAtoms () const |
char | GetChain (void) const |
unsigned int | GetChainNum (void) const |
unsigned int | GetIdx (void) const |
unsigned int | GetResKey (void) const |
std::vector< OBAtom * > | GetAtoms (void) const |
std::vector< OBBond * > | GetBonds (bool exterior=true) const |
std::string | GetAtomID (OBAtom *atom) const |
unsigned | GetSerialNum (OBAtom *atom) const |
char | GetInsertionCode (void) const |
bool | GetAminoAcidProperty (int) const |
bool | GetAtomProperty (OBAtom *a, int) const |
bool | GetResidueProperty (int) const |
bool | IsHetAtom (OBAtom *atom) const |
bool | IsResidueType (int) const |
virtual OBBase * | DoTransformations (const std::map< std::string, std::string > *, OBConversion *) |
template<class T > | |
T * | CastAndClear (bool clear=true) |
virtual const char * | GetTitle (bool replaceNewlines=true) const |
virtual void | SetTitle (const char *) |
Iterator methods | |
OBAtomIterator | BeginAtoms () |
OBAtomIterator | EndAtoms () |
OBAtom * | BeginAtom (std::vector< OBAtom *>::iterator &i) |
OBAtom * | NextAtom (std::vector< OBAtom *>::iterator &i) |
Generic data handling methods (via OBGenericData) | |
bool | HasData (const std::string &) |
bool | HasData (const char *) |
bool | HasData (const unsigned int type) |
void | DeleteData (unsigned int type) |
void | DeleteData (OBGenericData *) |
void | DeleteData (std::vector< OBGenericData *> &) |
bool | DeleteData (const std::string &s) |
void | SetData (OBGenericData *d) |
void | CloneData (OBGenericData *d) |
size_t | DataSize () const |
OBGenericData * | GetData (const unsigned int type) |
OBGenericData * | GetData (const std::string &) |
OBGenericData * | GetData (const char *) |
std::vector< OBGenericData * > & | GetData () |
std::vector< OBGenericData * > | GetData (DataOrigin source) |
std::vector< OBGenericData * > | GetAllData (const unsigned int type) |
OBDataIterator | BeginData () |
OBDataIterator | EndData () |
Static Public Member Functions | |
static const char * | ClassDescription () |
Protected Attributes | |
unsigned int | _idx |
char | _chain |
unsigned int | _aakey |
unsigned int | _reskey |
std::string | _resnum |
std::string | _resname |
char | _insertioncode |
std::vector< bool > | _hetatm |
std::vector< std::string > | _atomid |
std::vector< OBAtom * > | _atoms |
std::vector< unsigned int > | _sernum |
std::vector< OBGenericData * > | _vdata |
Residue information.
The residue information is drawn from PDB or MOL2 files (or similar), which track biomolecule information, and are stored in the OBResidue class. OBResidues are stored inside the OBAtom class and OBMol classes. The residue information for an atom can be requested in the following way:
The residue information for a molecule can be manipulated too:
OBResidue | ( | void | ) |
Constructor.
|
virtual |
Destructor.
void AddAtom | ( | OBAtom * | atom | ) |
Add atom
to this residue. Updates the atom via OBAtom::SetResidue()
Referenced by OBMol::AddNewHydrogens(), OBMol::CopySubstructure(), OBResidue::InsertAtom(), OBMol::operator=(), and OBChainsParser::~OBChainsParser().
void InsertAtom | ( | OBAtom * | atom | ) |
Add atom
to this residue. Updates the atom via OBAtom::SetResidue()
void RemoveAtom | ( | OBAtom * | atom | ) |
Remove atom
from this residue and update the atom.
|
virtual |
Clear any and all data associated with this residue. Updates all atoms included in the residue, as well as calling OBBase::Clear() for any generic data.
Reimplemented from OBBase.
void SetName | ( | const std::string & | resname | ) |
Set the name of this residue (e.g., "ALA"). Use 3-char PDB standard names. http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/part_79.html MODRES records for modified residues: http://www.rcsb.org/pdb/file_formats/pdb/pdbguide2.2/part_36.html.
Referenced by OBChainsParser::~OBChainsParser().
void SetNum | ( | const unsigned int | resnum | ) |
Set the residue number (in the sequence)
Referenced by OBChainsParser::~OBChainsParser().
void SetNum | ( | const std::string | resnum | ) |
void SetChain | ( | const char | chain | ) |
Set the chain ID for this residue.
Referenced by OBChainsParser::~OBChainsParser().
void SetChainNum | ( | const unsigned int | chainnum | ) |
Set the chain number for this residue.
void SetIdx | ( | const unsigned int | idx | ) |
Set the internal index of this residue in the parent OBMol. Intended mostly for internal use
Referenced by OBMol::AddResidue(), and OBMol::NewResidue().
void SetInsertionCode | ( | const char | insertioncode | ) |
Set PDB insertion code information for this residue. This allows consecutive residues to have the same number. Some communities that work in a well-conserved structural world use this, e.g. for immunoglobulins.
void SetAtomID | ( | OBAtom * | atom, |
const std::string & | id | ||
) |
Set the character code ID for an ATOM record for the supplied atom This does nothing if the supplied atom is not found in the residue
Referenced by OBMol::AddNewHydrogens(), OBMol::CopySubstructure(), OBMol::operator=(), and OBChainsParser::~OBChainsParser().
void SetHetAtom | ( | OBAtom * | atom, |
bool | hetatm | ||
) |
Referenced by OBMol::AddNewHydrogens(), OBMol::CopySubstructure(), OBMol::operator=(), and OBChainsParser::~OBChainsParser().
void SetSerialNum | ( | OBAtom * | atom, |
unsigned int | sernum | ||
) |
Set the atomic serial number for a given atom (see OBSerialNums)
Referenced by OBMol::CopySubstructure(), OBMol::operator=(), and OBChainsParser::~OBChainsParser().
string GetName | ( | void | ) | const |
Referenced by OBResidueData::AssignBonds().
int GetNum | ( | void | ) |
std::string GetNumString | ( | void | ) |
Referenced by OBResidueData::AssignBonds().
unsigned int GetNumAtoms | ( | void | ) | const |
char GetChain | ( | void | ) | const |
Referenced by OBResidueData::AssignBonds().
unsigned int GetChainNum | ( | void | ) | const |
unsigned int GetIdx | ( | void | ) | const |
Referenced by OBMol::DeleteResidue().
unsigned int GetResKey | ( | void | ) | const |
vector< OBAtom * > GetAtoms | ( | void | ) | const |
vector< OBBond * > GetBonds | ( | bool | exterior = true | ) | const |
exterior
includes bonds to atoms outside this residue (default is true) string GetAtomID | ( | OBAtom * | atom | ) | const |
Referenced by OBResidueData::AssignBonds(), OBMol::CopySubstructure(), OBResidue::GetAtomProperty(), and OBMol::operator=().
unsigned int GetSerialNum | ( | OBAtom * | atom | ) | const |
Referenced by OBMol::CopySubstructure(), and OBMol::operator=().
char GetInsertionCode | ( | void | ) | const |
bool GetAminoAcidProperty | ( | int | property | ) | const |
bool GetAtomProperty | ( | OBAtom * | a, |
int | property | ||
) | const |
a
has the supplied residue atom property defined from the OBResidueAtomProperty namespace bool GetResidueProperty | ( | int | property | ) | const |
Referenced by OBResidue::GetAtomProperty().
bool IsHetAtom | ( | OBAtom * | atom | ) | const |
Referenced by OBMol::AddNewHydrogens(), OBMol::CopySubstructure(), OBResidue::GetAtomProperty(), OBAtom::IsHetAtom(), and OBMol::operator=().
bool IsResidueType | ( | int | restype | ) | const |
restype
Set by SetResidueKeys()
|
inline |
|
inline |
Set the iterator i
to the beginning of the atom list in this residue
Referenced by OBMol::operator=().
Increment the iterator i
Referenced by OBResidueAtomIter::operator++(), and OBMol::operator=().
|
inlinevirtualinherited |
Perform a set of transformations specified by the user
Typically these are program options to filter or modify an object For example, see OBMol::DoTransformations() and OBMol::ClassDescription() Base type does nothing
Reimplemented in OBMol.
|
inlinestaticinherited |
|
inlineinherited |
By default clears the object. Called from ReadMolecule of most format classes.
|
inlinevirtualinherited |
Base type does nothing Made virtual around r3535 to simplify code which passes around OBBase*.
Reimplemented in OBMol.
Referenced by OBMoleculeFormat::DoOutputOptions().
|
inlinevirtualinherited |
Reimplemented in OBMol.
Referenced by OBMoleculeFormat::DoOutputOptions().
|
inherited |
Referenced by OBDepict::AddAtomLabels(), OBDepict::DrawMolecule(), AliasData::Expand(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBForceField::GetPartialCharges(), OBDescriptor::MatchPairData(), OBMoleculeFormat::ReadChemObjectImpl(), and OBMol::SetEnergies().
|
inherited |
|
inherited |
|
inherited |
Delete any data matching the given OBGenericDataType.
Referenced by OpenBabel::CanonicalLabels(), OBDescriptor::DeleteProperties(), OpenBabel::DeleteStereoOnAtom(), and OBMol::RenumberAtoms().
|
inherited |
Delete the given generic data from this object.
|
inherited |
Delete all of the given generic data from this object.
|
inherited |
Deletes the generic data with the specified attribute, returning false if not found.
|
inlineinherited |
Adds a data object; does nothing if d==NULL.
Referenced by OBGastChrg::AssignPartialCharges(), OBMol::CopySubstructure(), AliasData::Expand(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBMol::GetEnergies(), OBMol::GetEnergy(), OBForceField::GetPartialCharges(), OBMoleculeFormat::MakeCombinedMolecule(), OBDescriptor::PredictAndSave(), AliasData::RevertToAliasForm(), and OBMol::SetEnergies().
|
inherited |
Adds a copy of a data object; does nothing if d == NULL
Referenced by AliasData::Expand().
|
inlineinherited |
|
inherited |
Referenced by OBDepict::AddAtomLabels(), OBDepict::DrawMolecule(), OpenBabel::extract_thermochemistry(), OBDescriptor::FilterCompare(), OpenBabel::GetAtomSymClass(), OBForceField::GetAtomTypes(), OBForceField::GetConformers(), OBForceField::GetCoordinates(), OBForceField::GetPartialCharges(), OBDescriptor::GetValues(), OpenBabel::IsSuppressibleHydrogen(), OBMoleculeFormat::MakeCombinedMolecule(), OBMolAngleIter::OBMolAngleIter(), OBMolRingIter::OBMolRingIter(), OBMolTorsionIter::OBMolTorsionIter(), and OBDescriptor::PredictAndSave().
|
inherited |
|
inherited |
|
inlineinherited |
Referenced by OBMol::GetEnergies(), OBMol::GetEnergy(), and OBMol::SetEnergies().
|
inherited |
|
inherited |
Referenced by OpenBabel::CanonicalLabels(), OBMol::CopySubstructure(), OBBuilder::CorrectStereoAtoms(), OBBuilder::CorrectStereoBonds(), OpenBabel::DeleteStereoOnAtom(), and OBMol::operator+=().
|
inlineinherited |
Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().
|
inlineinherited |
Referenced by OBMol::AddBond(), OBAtom::Duplicate(), OBMoleculeFormat::MakeCombinedMolecule(), and OBMol::operator=().
|
protected |
Residue index (i.e., internal index in an OBMol)
Referenced by OBResidue::Clear(), OBResidue::GetIdx(), and OBResidue::SetIdx().
|
protected |
Chain ID.
Referenced by OBResidue::Clear(), OBResidue::GetChain(), OBResidue::GetChainNum(), OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::SetChain(), and OBResidue::SetChainNum().
|
protected |
Amino Acid key ID – see SetResidueKeys()
Referenced by OBResidue::Clear(), OBResidue::GetAminoAcidProperty(), OBResidue::OBResidue(), OBResidue::operator=(), and OBResidue::SetName().
|
protected |
Residue key ID – see SetResidueKeys()
Referenced by OBResidue::Clear(), OBResidue::GetResidueProperty(), OBResidue::GetResKey(), OBResidue::IsResidueType(), OBResidue::OBResidue(), OBResidue::operator=(), and OBResidue::SetName().
|
protected |
Residue number (i.e., in file) 23, 1B, etc.
Referenced by OBResidue::Clear(), OBResidue::GetNum(), OBResidue::GetNumString(), OBResidue::OBResidue(), OBResidue::operator=(), and OBResidue::SetNum().
|
protected |
Residue text name.
Referenced by OBResidue::Clear(), OBResidue::GetName(), OBResidue::OBResidue(), OBResidue::operator=(), and OBResidue::SetName().
|
protected |
PBB insertion code.
Referenced by OBResidue::Clear(), OBResidue::GetInsertionCode(), OBResidue::OBResidue(), and OBResidue::operator=().
|
protected |
Is a given atom a HETAM.
Referenced by OBResidue::AddAtom(), OBResidue::Clear(), OBResidue::IsHetAtom(), OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::RemoveAtom(), and OBResidue::SetHetAtom().
|
protected |
Residue atom text IDs.
Referenced by OBResidue::AddAtom(), OBResidue::Clear(), OBResidue::GetAtomID(), OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::RemoveAtom(), and OBResidue::SetAtomID().
|
protected |
List of OBAtom in this residue.
Referenced by OBResidue::AddAtom(), OBResidue::BeginAtom(), OBResidue::Clear(), OBResidue::GetAtomID(), OBResidue::GetAtoms(), OBResidue::GetBonds(), OBResidue::GetNumAtoms(), OBResidue::GetSerialNum(), OBResidue::IsHetAtom(), OBResidue::NextAtom(), OBResidue::RemoveAtom(), OBResidue::SetAtomID(), OBResidue::SetHetAtom(), OBResidue::SetSerialNum(), and OBResidue::~OBResidue().
|
protected |
List of serial numbers.
Referenced by OBResidue::AddAtom(), OBResidue::Clear(), OBResidue::GetSerialNum(), OBResidue::OBResidue(), OBResidue::operator=(), OBResidue::RemoveAtom(), and OBResidue::SetSerialNum().
|
protectedinherited |
Custom data.
Referenced by OBMol::OBMol().