BALL 1.5.0
Loading...
Searching...
No Matches
BALL::Conformation Class Reference

#include <BALL/DOCKING/COMMON/conformation.h>

Public Member Functions

 Conformation ()
 
 Conformation (AtomContainer *parent, AtomContainer *conformation_molecule)
 
 Conformation (const Conformation &conf)
 
virtual ~Conformation ()
 
bool operator== (const Conformation &conf)
 
bool operator!= (const Conformation &conf)
 
void applyConformation (AtomContainer &ac) const
 
const HashMap< Size, Vector3 > * getAtomPositions ()
 
void setAtomPositions (const AtomContainer *parent, const HashMap< Size, Vector3 > &pos)
 
const AtomContainergetParent ()
 
void setParent (AtomContainer *parent)
 
String getId ()
 
bool checkID (String &hash)
 
void setID (String &hash)
 
void addProperty (const String &name, const String &value)
 
const std::vector< std::pair< String, String > > * getProperties ()
 
Size getNoOfAtoms () const
 

Static Public Member Functions

static void generateHash (const AtomContainer *mol, String &hash)
 

Detailed Description

Conformation class.

This class represents conformations of a molecule by simply storing the atom positions (Vector3) of all atoms that deviate significantly from the resp. atom positions of the base conformation ( = parent molecule). Stored conformations can be applied to the parent molecule to reconstruct the conformer of the molecule.

Definition at line 24 of file conformation.h.

Constructor & Destructor Documentation

◆ Conformation() [1/3]

BALL::Conformation::Conformation ( )

◆ Conformation() [2/3]

BALL::Conformation::Conformation ( AtomContainer * parent,
AtomContainer * conformation_molecule )

◆ Conformation() [3/3]

BALL::Conformation::Conformation ( const Conformation & conf)

◆ ~Conformation()

virtual BALL::Conformation::~Conformation ( )
virtual

Member Function Documentation

◆ addProperty()

void BALL::Conformation::addProperty ( const String & name,
const String & value )

Add a property to this Conformation. The stored properties are assigned to an AtomContainer when applyConformation() is used.

Parameters
namethe name of the property to be added
valuethe value of the property to be added

◆ applyConformation()

void BALL::Conformation::applyConformation ( AtomContainer & ac) const

Apply the conformation of the supplied AtomContainer.

Parameters
referenceto AtomContainer

◆ checkID()

bool BALL::Conformation::checkID ( String & hash)

Check whether the hashkey of this Conformation matches the specified key. This function can thus be used to search for file corruptions.

◆ generateHash()

static void BALL::Conformation::generateHash ( const AtomContainer * mol,
String & hash )
static

Generate a Sha1-hash for the given molecule

◆ getAtomPositions()

const HashMap< Size, Vector3 > * BALL::Conformation::getAtomPositions ( )

Get the list of all atom positions.

Returns
vector of atom positions

◆ getId()

String BALL::Conformation::getId ( )

Get the ID of the Conformation

Returns
ID of Conformation

◆ getNoOfAtoms()

Size BALL::Conformation::getNoOfAtoms ( ) const

◆ getParent()

const AtomContainer * BALL::Conformation::getParent ( )

◆ getProperties()

const std::vector< std::pair< String, String > > * BALL::Conformation::getProperties ( )

◆ operator!=()

bool BALL::Conformation::operator!= ( const Conformation & conf)

Check whether this conformation is unequal to the given Conformation.
If at least one atom-position of this Conformation deviates more than 1e-02 from the resp. position in the given Conformation, or the conformations have an unequal number of atoms, true is returned. Else, false is returned.

◆ operator==()

bool BALL::Conformation::operator== ( const Conformation & conf)

Check whether this conformation is equal to the given Conformation.
If at least one atom-position of this Conformation deviates more than 1e-02 from the resp. position in the given Conformation, or the conformations have an unequal number of atoms, false is returned. Else, true is returned.

◆ setAtomPositions()

void BALL::Conformation::setAtomPositions ( const AtomContainer * parent,
const HashMap< Size, Vector3 > & pos )

Set the list of atom positions.

Parameters
HashMapof atom-indices and atom positions

◆ setID()

void BALL::Conformation::setID ( String & hash)

◆ setParent()

void BALL::Conformation::setParent ( AtomContainer * parent)