Loading...
Searching...
No Matches
rotamer.h
Go to the documentation of this file.
/**********************************************************************
rotamer.h - Handle rotamer list data.
Copyright (C) 1998-2000 by OpenEye Scientific Software, Inc.
Some portions Copyright (C) 2001-2006 by Geoffrey R. Hutchison
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_ROTAMER_H
#define OB_ROTAMER_H
#include <vector>
#include <map>
#include <openbabel/rotor.h>
#include <openbabel/generic.h>
namespace OpenBabel
{
class OBMol;
// Further class introduction in rotamer.cpp
class OBAPI OBRotamerList : public OBGenericData
{
unsigned int _NBaseCoords;
std::vector<double*> _c;
std::vector<std::pair<OBAtom**,std::vector<int> > > _vrotor;
std::vector<std::vector<double> > _vres;
std::vector<unsigned char*> _vrotamer;
std::vector<std::vector<int> > _vrings;
std::vector<std::vector<double> > _vringTors;
public:
OBRotamerList()
{
_NBaseCoords=0;
_type= OBGenericDataType::RotamerList;
_attr="RotamerList";
}
virtual OBGenericData* Clone(OBBase* parent) const;
~OBRotamerList();
void Setup(OBMol&,OBRotorList&);
void Setup(OBMol &mol,unsigned char*ref,int nrotors);
unsigned int NumRotors() const
{
return (unsigned int)_vrotor.size();
}
unsigned int NumRotamers() const
{
return (unsigned int)_vrotamer.size();
}
void AddRotamer(double*);
void AddRotamer(int *key);
void AddRotamer(std::vector<int> key);
void AddRotamer(unsigned char *key);
void AddRotamers(unsigned char *arr,int nconf);
void GetReferenceArray(unsigned char*) const;
std::vector<unsigned char*>::iterator BeginRotamer()
{
return _vrotamer.begin();
}
std::vector<unsigned char*>::iterator EndRotamer()
{
return _vrotamer.end();
}
std::vector<double*> CreateConformerList(OBMol& mol);
void ExpandConformerList(OBMol&mol,std::vector<double*>& confs);
bool SetCurrentCoordinates(OBMol &mol, std::vector<int> arr);
void SetBaseCoordinateSets(OBMol& mol);
void SetBaseCoordinateSets(std::vector<double*> bc, unsigned int N);
unsigned int NumBaseCoordinateSets() const
{
return static_cast<unsigned int> (_c.size());
}
double *GetBaseCoordinateSet(unsigned int i) const
{
return (i<_c.size()) ? _c[i] : nullptr;
}
unsigned int NumAtoms() const
{
return _NBaseCoords;
}
};
int Swab(int);
}
#endif // OB_ROTAMER_H
OpenBabel::OBBase
Base Class.
Definition base.h:240
OpenBabel::OBGenericData
Base class for generic data.
Definition base.h:189
OpenBabel::OBGenericData::_type
unsigned int _type
attribute type – declared for each subclass
Definition base.h:192
OpenBabel::OBGenericData::OBGenericData
OBGenericData(const std::string attr="undefined", const unsigned int type=OBGenericDataType::UndefinedData, const DataOrigin source=any)
Definition generic.cpp:166
OpenBabel::OBGenericData::_attr
std::string _attr
attribute tag (e.g., "UnitCell", "Comment" or "Author")
Definition base.h:191
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
OpenBabel::OBRotamerList
Supports a set of rotamer coordinate sets for some number of potentially rotatable bonds.
Definition rotamer.h:36
OpenBabel::OBRotamerList::GetBaseCoordinateSet
double * GetBaseCoordinateSet(unsigned int i) const
Get a pointer to a specific base pointer (i.e., specific conformer).
Definition rotamer.h:132
OpenBabel::OBRotamerList::NumAtoms
unsigned int NumAtoms() const
Definition rotamer.h:138
OpenBabel::OBRotamerList::BeginRotamer
std::vector< unsignedchar * >::iterator BeginRotamer()
Definition rotamer.h:95
OpenBabel::OBRotamerList::OBRotamerList
OBRotamerList()
Definition rotamer.h:54
OpenBabel::OBRotamerList::NumRotors
unsigned int NumRotors() const
Definition rotamer.h:71
OpenBabel::OBRotamerList::NumBaseCoordinateSets
unsigned int NumBaseCoordinateSets() const
Definition rotamer.h:126
OpenBabel::OBRotamerList::NumRotamers
unsigned int NumRotamers() const
Definition rotamer.h:76
OpenBabel::OBRotamerList::EndRotamer
std::vector< unsignedchar * >::iterator EndRotamer()
Definition rotamer.h:99
OpenBabel::OBRotorList
Given an OBMol, set up a list of possibly rotatable torsions,.
Definition rotor.h:458
generic.h
Handle generic data classes. Custom data for atoms, bonds, etc.
OpenBabel::OBGenericDataType::RotamerList
@ RotamerList
Information for generating & manipulating rotamers, i.e. OBRotamerList.
Definition base.h:85
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
OpenBabel::Swab
int Swab(int)
Swap Byte instruction (i.e., handle transfers between endian forms).
Definition rotamer.cpp:104
rotor.h
Rotate torsional according to rotor rules.