LigandMolecule


[ ligand_pharma | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

KEYWORD
AUTHORS
CHANGES LOG
GOALS
USAGE

Class Summary

class LigandMolecule
: public Molecule< Mol2Atom>
{
public:
typedef hash_map< unsigned int, RigidTrans3, hash< unsigned int> > RigidGroupTrans3Map;
// Constructors
LigandMolecule(unsigned int molId) ;
LigandMolecule(unsigned int molId, const string molName) ;
void init(ifstream& mol2FileStream) ;
void addDummyPoints();
// Inspectors
const Mol2Atom& getAtomById(int id) const ;
unsigned int getAtomIndexById(int id) const ;
const Vector3& getDummyPoint(unsigned int dummyPointIndex) const ;
const vector< Vector3>& getDummyPoints() const ;
void getCriticalPoints(vector< Vector3>& points) const;
unsigned int getID() const ;
const string& getFileName() const ;
const string& getMol2Name() const ;
const string& getName() const ;
HYBRIDIZATION_TYPE getHybridizationType(unsigned int atomIndex) const;
const vector< RigidGroup*>& getRigidGroups() const ;
unsigned int getNumOfRigidGroups() const ;
unsigned int numberOfHeavyAtoms() const ;
const RigidGroup& getRigidGroup(int groupId) const ;
const vector< Vector3> getCoordinates(int groupId) const ;
int getCommonRigidGroup(unsigned int atomIndex1, unsigned int atomIndex2, unsigned int atomIndex3) const;
void getNeighborsForAtom(unsigned int atomIndex, vector< unsigned int>& atomNeighbors) const;
unsigned int getNumOfNeighbors(unsigned int atomIndex) const;
void getNeighborsForBondAtom(unsigned int atomIndex1, unsigned int atomIndex2, vector< unsigned int>& atom1Neighbors) const;
int readMol2file(istream& mol2stream);
Molecule< Mol2Atom> transformAtoms(RigidGroupTrans3Map& rigidGroupTransformations) const;
void updateTransformations(RigidGroupTrans3Map& rigidGroupTransformations) const;
const vector< const RigidGroup*> getRigidGroups(unsigned int atomIndex) const;
bool isClose(const Vector3& point) const;
void outputMol2File(ostream& output) const;
void outputMol2File(ostream& output, const RigidTrans3& trans) const;
void outputMol2File(RigidGroupTrans3Map& transformations, ostream& output) const;
protected:
void initAtomHash() ;
void prepareAtomIdMapping() ;
void markHinges();
void buildRigidGroups();
void orderRigidGroups();
void addHydrogensToRigidGroups();
void markCyclicBonds();
void markPeptideBonds();
void addDummyPointsOnRings();
void addDummyPointsOnTriangles();
bool isConnectedToElement(const leda::node u, const ELEMENT element) const;
unsigned int numberOfNeighboursWithElement(const leda::node u, const ELEMENT element) const;
unsigned int numberOfNeighboursWithAtomType(const leda::node u, const string atomType) const;
int numberOfBonds(const leda::node u) const ;
bool isConnectedToAtom(const leda::node u, const string atomName) const;
void outputMol2Header(ostream& output) const;
void outputMol2Bonds(ostream& output) const;
vector< RigidGroup*> rigidGroups_;
leda::UGRAPH< unsigned int, Bond> ligandGraphWithHydrogens;
leda::UGRAPH< unsigned int, Bond> ligandGraphWithoutHydrogens;
map< unsigned int, leda::node> atomId2NodeWithoutHydrogens_, atomId2NodeWithHydrogens_;
unsigned int id;
string name;
string mol2name_;
hash_map< unsigned int, unsigned int> atomId2Index_;
GeomHash< Vector3, const Mol2Atom*> atomHash_;
vector< Vector3> dummyPoints_;
static float maxAtomDistance2_;
}; // LigandMolecule

Back to the top of LigandMolecule


KEYWORD

Back to the top of LigandMolecule


AUTHORS

Dina, Oranit, Yuval

Copyright: SAMBA group, Tel-Aviv Univ. Israel, 2003.

Back to the top of LigandMolecule


CHANGES LOG

Back to the top of LigandMolecule


GOALS

Back to the top of LigandMolecule

		

USAGE

		

Back to the top of LigandMolecule


typedef hash_map< unsigned int, RigidTrans3, hash< unsigned int> > RigidGroupTrans3Map;

  typedef hash_map< unsigned int, RigidTrans3, hash< unsigned int> > RigidGroupTrans3Map;

Back to the top of LigandMolecule


LigandMolecule(unsigned int molId) ;

Constructs and empty LigandMolecule object

  LigandMolecule(unsigned int molId) ;

Function is currently defined inline.


Back to the top of LigandMolecule


LigandMolecule(unsigned int molId, const string molName) ;

Constructs a LigandMolecule object according to the given Mol2 file which describes the molecule.

  LigandMolecule(unsigned int molId, const string molName) ;

Function is currently defined inline.


Back to the top of LigandMolecule


void init(ifstream& mol2FileStream) ;

  void init(ifstream& mol2FileStream)                                                                                        
;

Function is currently defined inline.


Back to the top of LigandMolecule


void addDummyPoints();

  void addDummyPoints();

Back to the top of LigandMolecule


const Mol2Atom& getAtomById(int id) const ;

  const Mol2Atom& getAtomById(int id) const                                            ;

Function is currently defined inline.


Back to the top of LigandMolecule


unsigned int getAtomIndexById(int id) const ;

  unsigned int getAtomIndexById(int id) const                                            ;

Function is currently defined inline.


Back to the top of LigandMolecule


const Vector3& getDummyPoint(unsigned int dummyPointIndex) const ;

  const Vector3& getDummyPoint(unsigned int dummyPointIndex) const                                                
;

Function is currently defined inline.


Back to the top of LigandMolecule


const vector< Vector3>& getDummyPoints() const ;

  const vector< Vector3>& getDummyPoints() const                         
;

Function is currently defined inline.


Back to the top of LigandMolecule


void getCriticalPoints(vector< Vector3>& points) const;

  void getCriticalPoints(vector< Vector3>& points) const;

Back to the top of LigandMolecule


unsigned int getID() const ;

  unsigned int getID() const               
;

Function is currently defined inline.


Back to the top of LigandMolecule


const string& getFileName() const ;

Returns the name of the molecule (which is the name of the Mol2 file that describes the molecule)

  const string& getFileName() const                 
;

Function is currently defined inline.


Back to the top of LigandMolecule


const string& getMol2Name() const ;

  const string& getMol2Name() const                      
;

Function is currently defined inline.


Back to the top of LigandMolecule


const string& getName() const ;

  const string& getName() const                                          ;

Function is currently defined inline.


Back to the top of LigandMolecule


HYBRIDIZATION_TYPE getHybridizationType(unsigned int atomIndex) const;

  HYBRIDIZATION_TYPE getHybridizationType(unsigned int atomIndex) const;

Back to the top of LigandMolecule


const vector< RigidGroup*>& getRigidGroups() const ;

  const vector< RigidGroup*>& getRigidGroups() const                         
;

Function is currently defined inline.


Back to the top of LigandMolecule


unsigned int getNumOfRigidGroups() const ;

  unsigned int getNumOfRigidGroups() const                                
;

Function is currently defined inline.


Back to the top of LigandMolecule


unsigned int numberOfHeavyAtoms() const ;

  unsigned int numberOfHeavyAtoms() const                                                          
;

Function is currently defined inline.


Back to the top of LigandMolecule


const RigidGroup& getRigidGroup(int groupId) const ;

  const RigidGroup& getRigidGroup(int groupId) const                                     
;

Function is currently defined inline.


Back to the top of LigandMolecule


const vector< Vector3> getCoordinates(int groupId) const ;

  const vector< Vector3> getCoordinates(int groupId) const                                                          
;

Function is currently defined inline.


Back to the top of LigandMolecule


int getCommonRigidGroup(unsigned int atomIndex1, unsigned int atomIndex2, unsigned int atomIndex3) const;

Return the Id of the rigid group that is common to all three atoms. Returns -1 if such a rigid group does not exist.

  int getCommonRigidGroup(unsigned int atomIndex1, unsigned int atomIndex2, unsigned int atomIndex3) const;

Back to the top of LigandMolecule


void getNeighborsForAtom(unsigned int atomIndex, vector< unsigned int>& atomNeighbors) const;

Returns for atom the set of its atom neighbors

  void getNeighborsForAtom(unsigned int atomIndex, vector< unsigned int>& atomNeighbors) const;  

Back to the top of LigandMolecule


unsigned int getNumOfNeighbors(unsigned int atomIndex) const;

  unsigned int getNumOfNeighbors(unsigned int atomIndex) const;

Back to the top of LigandMolecule


void getNeighborsForBondAtom(unsigned int atomIndex1, unsigned int atomIndex2, vector< unsigned int>& atom1Neighbors) const;

Returns for atom1 of a given bond the set of its atom neighbors excluding the atom2 on the bond

  void getNeighborsForBondAtom(unsigned int atomIndex1, unsigned int atomIndex2,
			       vector< unsigned int>& atom1Neighbors) const;  

Back to the top of LigandMolecule


int readMol2file(istream& mol2stream);

Read Mol2 file and create the graphs that represent it. Note that substructures are treated as one structure!

  int readMol2file(istream& mol2stream);

Back to the top of LigandMolecule


Molecule< Mol2Atom> transformAtoms(RigidGroupTrans3Map& rigidGroupTransformations) const;

Each given transformation will be applied on the atoms of a rigid group. The atoms of a rigid group with unassigned transformation will be transfored according to the transformation of a predecessor in a BFS tree.

TODO: To modify the signature of this method so that the resulting Molecule< Mol2Atom> will be given as an argument.

  Molecule< Mol2Atom> transformAtoms(RigidGroupTrans3Map& rigidGroupTransformations) const;

Back to the top of LigandMolecule


void updateTransformations(RigidGroupTrans3Map& rigidGroupTransformations) const;

  void updateTransformations(RigidGroupTrans3Map& rigidGroupTransformations) const;

Back to the top of LigandMolecule


const vector< const RigidGroup*> getRigidGroups(unsigned int atomIndex) const;

Returns the rigid groups to which the given atom belongs to

  const vector< const RigidGroup*> getRigidGroups(unsigned int atomIndex) const;

Back to the top of LigandMolecule


bool isClose(const Vector3& point) const;

Return true if the given atom is close (within a ball of predefined radius) to some atom of the molecule.

  bool isClose(const Vector3& point) const;    

Back to the top of LigandMolecule


void outputMol2File(ostream& output) const;

Output the molecule (excluding the hydrogen atoms) to a file

  void outputMol2File(ostream& output) const;

Back to the top of LigandMolecule


void outputMol2File(ostream& output, const RigidTrans3& trans) const;

transform by trans and output

  void outputMol2File(ostream& output, const RigidTrans3& trans) const;

Back to the top of LigandMolecule


void outputMol2File(RigidGroupTrans3Map& transformations, ostream& output) const;

Transform the rigid groups of the molecule according to the given rigid transformations and output

  void outputMol2File(RigidGroupTrans3Map& transformations, ostream& output) const;

Back to the top of LigandMolecule


void initAtomHash() ;

  void initAtomHash()                                                                                                                                                 ;

Function is currently defined inline.


Back to the top of LigandMolecule


void prepareAtomIdMapping() ;

  void prepareAtomIdMapping()                                                                                                             
;

Function is currently defined inline.


Back to the top of LigandMolecule


void markHinges();

Mark all flexible bonds as hinges

  void markHinges();

Back to the top of LigandMolecule


void buildRigidGroups();

build all the rigid groups divided by hinges

  void buildRigidGroups();

Back to the top of LigandMolecule


void orderRigidGroups();

order rigid groups according to DFS order of the tree they make

  void orderRigidGroups();

Back to the top of LigandMolecule


void addHydrogensToRigidGroups();

add hydrogens

  void addHydrogensToRigidGroups();

Back to the top of LigandMolecule


void markCyclicBonds();

mark all cyclic bonds (i.e. part of the ring) as not hinges

  void markCyclicBonds();

Back to the top of LigandMolecule


void markPeptideBonds();

mark all peptide bonds as not hinges

  void markPeptideBonds();

Back to the top of LigandMolecule


void addDummyPointsOnRings();

  void addDummyPointsOnRings();

Back to the top of LigandMolecule


void addDummyPointsOnTriangles();

void addDummyPointsOnTriangles();

Back to the top of LigandMolecule


bool isConnectedToElement(const leda::node u, const ELEMENT element) const;

Gets a node in the ligandGraphWithHydrogens graph and a chemical element type. Returns true if the given node represents an atom that is connected to an atom with the given element type

  bool isConnectedToElement(const leda::node u, const ELEMENT element) const;

Back to the top of LigandMolecule


unsigned int numberOfNeighboursWithElement(const leda::node u, const ELEMENT element) const;

  unsigned int numberOfNeighboursWithElement(const leda::node u, const ELEMENT element) const;

Back to the top of LigandMolecule


unsigned int numberOfNeighboursWithAtomType(const leda::node u, const string atomType) const;

  unsigned int numberOfNeighboursWithAtomType(const leda::node u, const string atomType) const;

Back to the top of LigandMolecule


int numberOfBonds(const leda::node u) const ;

int numberOfBonds(const leda::node u) const                                               
;

Function is currently defined inline.


Back to the top of LigandMolecule


bool isConnectedToAtom(const leda::node u, const string atomName) const;

Gets a node in the ligandGraphWithoutHydrogens graph and an atom name. Returns true if the given node represents an atom that is connected to atom with the given name.

  bool isConnectedToAtom(const leda::node u, const string atomName) const;

Back to the top of LigandMolecule


void outputMol2Header(ostream& output) const;

Output the Mol2 header of the molecule

  void outputMol2Header(ostream& output) const;

Back to the top of LigandMolecule


void outputMol2Bonds(ostream& output) const;

Output the bonds of the molecule in Mol2 format

  void outputMol2Bonds(ostream& output) const;

Back to the top of LigandMolecule


vector< RigidGroup*> rigidGroups_;

Rigid Groups container

  vector< RigidGroup*> rigidGroups_;

Back to the top of LigandMolecule


leda::UGRAPH< unsigned int, Bond> ligandGraphWithHydrogens;

graph representing a molecule (including all the hydrogen atoms)

  leda::UGRAPH< unsigned int, Bond> ligandGraphWithHydrogens;

Back to the top of LigandMolecule


leda::UGRAPH< unsigned int, Bond> ligandGraphWithoutHydrogens;

graph representing a molecule without the hydrogen atoms

  leda::UGRAPH< unsigned int, Bond> ligandGraphWithoutHydrogens;

Back to the top of LigandMolecule


map< unsigned int, leda::node> atomId2NodeWithoutHydrogens_, atomId2NodeWithHydrogens_;

These two mapping between atomId and node in the ligandGraphWithoutHydrogens and ligandGraphWithHydrogens graphs are needed to find the atoms of a bond in order to add an edge to the graph

  map< unsigned int, leda::node> atomId2NodeWithoutHydrogens_, atomId2NodeWithHydrogens_; 

Back to the top of LigandMolecule


unsigned int id;

molecule id

  unsigned int id;

Back to the top of LigandMolecule


string name;

molecule name

  string name;

Back to the top of LigandMolecule


string mol2name_;

string mol2name_;

Back to the top of LigandMolecule


hash_map< unsigned int, unsigned int> atomId2Index_;

hash_map< unsigned int, unsigned int> atomId2Index_;

Back to the top of LigandMolecule


GeomHash< Vector3, const Mol2Atom*> atomHash_;

stores molecule atoms

  GeomHash< Vector3, const Mol2Atom*> atomHash_;

Back to the top of LigandMolecule


vector< Vector3> dummyPoints_;

  vector< Vector3> dummyPoints_;

Back to the top of LigandMolecule


float maxAtomDistance2_;

distance tolerance for hash query

  static float maxAtomDistance2_; 

Back to the top of LigandMolecule


All Members

public:
typedef hash_map< unsigned int, RigidTrans3, hash< unsigned int> > RigidGroupTrans3Map;
// Constructors
void init(ifstream& mol2FileStream) ;
void addDummyPoints();
// Inspectors
const Mol2Atom& getAtomById(int id) const ;
unsigned int getAtomIndexById(int id) const ;
const Vector3& getDummyPoint(unsigned int dummyPointIndex) const ;
const vector< Vector3>& getDummyPoints() const ;
void getCriticalPoints(vector< Vector3>& points) const;
unsigned int getID() const ;
const string& getFileName() const ;
const string& getMol2Name() const ;
const string& getName() const ;
HYBRIDIZATION_TYPE getHybridizationType(unsigned int atomIndex) const;
const vector< RigidGroup*>& getRigidGroups() const ;
unsigned int getNumOfRigidGroups() const ;
unsigned int numberOfHeavyAtoms() const ;
const RigidGroup& getRigidGroup(int groupId) const ;
const vector< Vector3> getCoordinates(int groupId) const ;
int getCommonRigidGroup(unsigned int atomIndex1, unsigned int atomIndex2, unsigned int atomIndex3) const;
void getNeighborsForAtom(unsigned int atomIndex, vector< unsigned int>& atomNeighbors) const;
unsigned int getNumOfNeighbors(unsigned int atomIndex) const;
void getNeighborsForBondAtom(unsigned int atomIndex1, unsigned int atomIndex2, vector< unsigned int>& atom1Neighbors) const;
int readMol2file(istream& mol2stream);
Molecule< Mol2Atom> transformAtoms(RigidGroupTrans3Map& rigidGroupTransformations) const;
void updateTransformations(RigidGroupTrans3Map& rigidGroupTransformations) const;
const vector< const RigidGroup*> getRigidGroups(unsigned int atomIndex) const;
bool isClose(const Vector3& point) const;
void outputMol2File(ostream& output) const;
void outputMol2File(ostream& output, const RigidTrans3& trans) const;
void outputMol2File(RigidGroupTrans3Map& transformations, ostream& output) const;
protected:
void initAtomHash() ;
void prepareAtomIdMapping() ;
void markHinges();
void buildRigidGroups();
void orderRigidGroups();
void addHydrogensToRigidGroups();
void markCyclicBonds();
void markPeptideBonds();
void addDummyPointsOnRings();
void addDummyPointsOnTriangles();
bool isConnectedToElement(const leda::node u, const ELEMENT element) const;
unsigned int numberOfNeighboursWithElement(const leda::node u, const ELEMENT element) const;
unsigned int numberOfNeighboursWithAtomType(const leda::node u, const string atomType) const;
int numberOfBonds(const leda::node u) const ;
bool isConnectedToAtom(const leda::node u, const string atomName) const;
void outputMol2Header(ostream& output) const;
void outputMol2Bonds(ostream& output) const;
vector< RigidGroup*> rigidGroups_;
leda::UGRAPH< unsigned int, Bond> ligandGraphWithHydrogens;
leda::UGRAPH< unsigned int, Bond> ligandGraphWithoutHydrogens;
map< unsigned int, leda::node> atomId2NodeWithoutHydrogens_, atomId2NodeWithHydrogens_;
unsigned int id;
string name;
string mol2name_;
hash_map< unsigned int, unsigned int> atomId2Index_;
GeomHash< Vector3, const Mol2Atom*> atomHash_;
vector< Vector3> dummyPoints_;
static float maxAtomDistance2_;

Back to the top of LigandMolecule


Ancestors

Inheritance chain for LigandMolecule:

Back to the top of LigandMolecule


Descendants

Back to the top of LigandMolecule


Generated from source by the Cocoon utilities on Mon Dec 21 11:44:47 2009 .

Report problems to jkotula@unimax.com