indigoX
Atom Class Reference

#include <indigox/classes/atom.hpp>

Classes

struct  Impl
 

Public Types

using AtomAngles = std::vector< Angle >
 Container for storing IXAngle references. More...
 
using AtomBonds = std::vector< Bond >
 Container for storing Bond references. More...
 
using AtomDihedrals = std::vector< Dihedral >
 Container for storing IXDihedral references. More...
 
enum  Stereo
 Enum for the different types of atom stereochemistry. More...
 

Public Member Functions

 Atom ()=default
 
 Atom (const Atom &)=default
 
 Atom (Atom &&)=default
 
 ~ Atom ()=default
 
int32_t AddImplicitHydrogen ()
 Add an implicit hydrogen. More...
 
const AtomAnglesGetAngles () const
 
const AtomBondsGetBonds () const
 
int32_t GetChargeGroupID () const
 
const AtomDihedralsGetDihedrals () const
 
const ElementGetElement () const
 Element of the atom. More...
 
int32_t GetFormalCharge () const
 Formal charge on the atom. More...
 
int64_t GetID () const
 
int32_t GetImplicitCount () const
 Get number of implicit hydrogens. More...
 
int64_t GetIndex () const
 Get the index from the molecule. More...
 
const MoleculeGetMolecule () const
 Molecule this atom is associated with. More...
 
const std::string & GetName () const
 Atom name. More...
 
double GetPartialCharge () const
 Partial atomic charge on the atom. More...
 
const Eigen::Vector3d & GetPosition () const
 Vector of the atom's position. More...
 
int32_t GetResidueID ()
 
std::string GetResidueName ()
 
Stereo GetStereochemistry () const
 Get the stereochemistry of the atom. More...
 
int64_t GetTag () const
 Tag of the atom. More...
 
const FFAtomGetType () const
 Get the FF type of the atom. More...
 
double GetX () const
 Atom x position. More...
 
double GetY () const
 Atom y position. More...
 
double GetZ () const
 Atom z position. More...
 
bool HasType () const
 
int64_t NumAngles () const
 Number of valid angles this atom is a part of. More...
 
int64_t NumBonds () const
 Number of valid bonds this atom is part of. More...
 
int64_t NumDihedrals () const
 Number of valid dihedrals this atom is a part of. More...
 
int32_t NumHeavyAtomBonds () const
 
int32_t NumHydrogenBonds () const
 
 operator bool () const
 
bool operator!= (const Atom &atm) const
 
bool operator< (const Atom &atm) const
 
bool operator<= (const Atom &atm) const
 
Atomoperator= (const Atom &)=default
 
Atomoperator= (Atom &&)=default
 
bool operator== (const Atom &atm) const
 
bool operator> (const Atom &atm) const
 
bool operator>= (const Atom &atm) const
 
int32_t RemoveImplicitHydrogen ()
 Remove an implicit hydrogen. More...
 
void SetChargeGroupID (int32_t id)
 
void SetElement (const Element &e)
 Set the element of this atom. More...
 
void SetElement (std::string e)
 Set the element of this atom. More...
 
void SetElement (int32_t e)
 Set the element of this atom. More...
 
void SetFormalCharge (int32_t q)
 Set the formal charge of this atom. More...
 
void SetImplicitCount (int32_t h)
 Set the number of implicit hydrogens. More...
 
void SetName (std::string n)
 Set the atom name. More...
 
void SetPartialCharge (double q)
 Set the partial charge of this atom. More...
 
void SetPosition (double x, double y, double z)
 Set the x, y and z positions. More...
 
void SetStereochemistry (Stereo s)
 Set the stereochemistry of an atomic center. More...
 
void SetTag (int32_t i)
 Set the tag of this atom. More...
 
void SetType (const FFAtom &type)
 Set the FF type of the atom. More...
 

Friends

class cereal::access
 Friendship allows IXAtom to be serialised. More...
 
class indigox::Molecule
 Friendship allows IXMolecule to create new atoms. More...
 
std::ostream & operator<< (std::ostream &os, const Atom &atm)
 

Member Typedef Documentation

◆ AtomAngles

using AtomAngles = std::vector<Angle>

Container for storing IXAngle references.

◆ AtomBonds

using AtomBonds = std::vector<Bond>

Container for storing Bond references.

◆ AtomDihedrals

using AtomDihedrals = std::vector<Dihedral>

Container for storing IXDihedral references.

Member Enumeration Documentation

◆ Stereo

enum Stereo
strong

Enum for the different types of atom stereochemistry.

Enumerator
UNDEFINED 

No defined stereochemistry.

ACHIRAL 

Defined as no stereochemistry.

Has R stereochemistry.

Has S stereochemistry.

Constructor & Destructor Documentation

◆ Atom() [1/3]

Atom ( )
default

◆ Atom() [2/3]

Atom ( const Atom )
default

◆ Atom() [3/3]

Atom ( Atom &&  )
default

◆ ~ Atom()

~ Atom ( )
default

Member Function Documentation

◆ AddImplicitHydrogen()

int32_t AddImplicitHydrogen ( )

Add an implicit hydrogen.

Returns
the new number of implicit hydrogens in the atom.

◆ GetAngles()

const AtomAngles& GetAngles ( ) const

◆ GetBonds()

const AtomBonds& GetBonds ( ) const

◆ GetChargeGroupID()

int32_t GetChargeGroupID ( ) const

◆ GetDihedrals()

const AtomDihedrals& GetDihedrals ( ) const

◆ GetElement()

const Element& GetElement ( ) const

Element of the atom.

Returns
the element of this atom.

◆ GetFormalCharge()

int32_t GetFormalCharge ( ) const

Formal charge on the atom.

Returns
the formal charge on the atom.

◆ GetID()

int64_t GetID ( ) const

◆ GetImplicitCount()

int32_t GetImplicitCount ( ) const

Get number of implicit hydrogens.

Returns
the number of implicit hydrogens in the atom.

◆ GetIndex()

int64_t GetIndex ( ) const

Get the index from the molecule.

Calculates the index of the atom in the container of atoms of the molecule it is a part of. If the molecule is dead, the index returned is the tag of the atom.

Returns
the index of the atom.

◆ GetMolecule()

const Molecule& GetMolecule ( ) const

Molecule this atom is associated with.

The returned shared_ptr is empty of the atom is not assigned to a valid molecule.

Returns
the molecule associated with this atom.

◆ GetName()

const std::string& GetName ( ) const

Atom name.

Returns
name of the atom.

◆ GetPartialCharge()

double GetPartialCharge ( ) const

Partial atomic charge on the atom.

Returns
the partial atomic charge.

◆ GetPosition()

const Eigen::Vector3d& GetPosition ( ) const

Vector of the atom's position.

Returns
the atoms position.

◆ GetResidueID()

int32_t GetResidueID ( )

◆ GetResidueName()

std::string GetResidueName ( )

◆ GetStereochemistry()

Stereo GetStereochemistry ( ) const

Get the stereochemistry of the atom.

Returns
the stereochemistry of the atom.

◆ GetTag()

int64_t GetTag ( ) const

Tag of the atom.

This value may be modified without warning. Use with caution. For a constant identifier to the atom, use IXAtom::GetUniqueID.

Returns
the tag assigned to the atom.

◆ GetType()

const FFAtom& GetType ( ) const

Get the FF type of the atom.

Returns
the force field type of the atom.

◆ GetX()

double GetX ( ) const

Atom x position.

Returns
the x coordinate of this atom.

◆ GetY()

double GetY ( ) const

Atom y position.

Returns
the y coordinate of this atom.

◆ GetZ()

double GetZ ( ) const

Atom z position.

Returns
the z coordinate of this atom.

◆ HasType()

bool HasType ( ) const

◆ NumAngles()

int64_t NumAngles ( ) const

Number of valid angles this atom is a part of.

Returns
the number of valid assigned angles.

◆ NumBonds()

int64_t NumBonds ( ) const

Number of valid bonds this atom is part of.

Returns
the number of valid assigned bonds.

◆ NumDihedrals()

int64_t NumDihedrals ( ) const

Number of valid dihedrals this atom is a part of.

Returns
the number of valid assigned dihedrals.

◆ NumHeavyAtomBonds()

int32_t NumHeavyAtomBonds ( ) const

◆ NumHydrogenBonds()

int32_t NumHydrogenBonds ( ) const

◆ operator bool()

operator bool ( ) const
inline

◆ operator!=()

bool operator!= ( const Atom atm) const
inline

◆ operator<()

bool operator< ( const Atom atm) const

◆ operator<=()

bool operator<= ( const Atom atm) const
inline

◆ operator=() [1/2]

Atom& operator= ( const Atom )
default

◆ operator=() [2/2]

Atom& operator= ( Atom &&  )
default

◆ operator==()

bool operator== ( const Atom atm) const

◆ operator>()

bool operator> ( const Atom atm) const

◆ operator>=()

bool operator>= ( const Atom atm) const
inline

◆ RemoveImplicitHydrogen()

int32_t RemoveImplicitHydrogen ( )

Remove an implicit hydrogen.

If GetImplicitCount() == 0, no hydrogen is removed.

Returns
the new number of implicit hydrogens in the atom.

◆ SetChargeGroupID()

void SetChargeGroupID ( int32_t  id)

◆ SetElement() [1/3]

void SetElement ( const Element e)

Set the element of this atom.

Parameters
ethe element to set to.

◆ SetElement() [2/3]

void SetElement ( std::string  e)

Set the element of this atom.

Parameters
ethe name or atomic symbol of the element to set.

◆ SetElement() [3/3]

void SetElement ( int32_t  e)

Set the element of this atom.

Parameters
ethe atomic number of the element to set.

◆ SetFormalCharge()

void SetFormalCharge ( int32_t  q)

Set the formal charge of this atom.

Parameters
qthe formal charge value to set.

◆ SetImplicitCount()

void SetImplicitCount ( int32_t  h)

Set the number of implicit hydrogens.

Parameters
hthe number of implicit hydrogens to set.

◆ SetName()

void SetName ( std::string  n)

Set the atom name.

Parameters
nname to set.

◆ SetPartialCharge()

void SetPartialCharge ( double  q)

Set the partial charge of this atom.

Parameters
qthe partial charge value to set.

◆ SetPosition()

void SetPosition ( double  x,
double  y,
double  z 
)

Set the x, y and z positions.

Parameters
x,y,zposition to set.

◆ SetStereochemistry()

void SetStereochemistry ( Stereo  s)

Set the stereochemistry of an atomic center.

Parameters
sthe stereochemistry to set.

◆ SetTag()

void SetTag ( int32_t  i)

Set the tag of this atom.

The tag of an atom should not be considered stable. Use with caution.

Parameters
ithe tag to set.

◆ SetType()

void SetType ( const FFAtom type)

Set the FF type of the atom.

Parameters
typethe type to set.

Friends And Related Function Documentation

◆ cereal::access

friend class cereal::access
friend

Friendship allows IXAtom to be serialised.

◆ indigox::Molecule

friend class indigox::Molecule
friend

Friendship allows IXMolecule to create new atoms.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Atom atm 
)
friend

The documentation for this class was generated from the following file: