Class compound
Defined in File compound.hpp
Class Documentation
-
class compound
a class that contains information about a chemical compound. This information is derived from the CDD by default.
To create compounds, you use the factory method. You can add your own compound definitions by calling the addExtraComponents function and pass it a valid CCD formatted file.
Public Functions
-
inline std::string id() const
Return the alphanumeric code for the chemical component.
-
inline std::string name() const
Return the name of the chemical component.
-
inline std::string type() const
Return the type of monomer.
-
inline std::string formula() const
Return the chemical formula of the chemical component.
-
inline float formula_weight() const
Return the formula mass of the chemical component in Daltons.
-
inline int formal_charge() const
Return the formal charge on the chemical component.
-
inline const std::vector<compound_atom> &atoms() const
Return the list of atoms for this compound.
-
inline const std::vector<compound_bond> &bonds() const
Return the list of bonds for this compound.
-
compound_atom get_atom_by_atom_id(const std::string &atom_id) const
Return the atom with id atom_id.
-
bool atoms_bonded(const std::string &atomId_1, const std::string &atomId_2) const
Return true if atomId_1 is bonded to atomId_2.
-
float bond_length(const std::string &atomId_1, const std::string &atomId_2) const
Return the bond length between atomId_1 and atomId_2.
-
inline bool is_water() const
< Return if the compound is actually a water
-
bool is_peptide() const
Return whether this compound has a type of either ‘peptide linking’ or ‘L-peptide linking’.
-
bool is_base() const
Return whether this compound has a type of either ‘DNA linking’ or ‘RNA linking’.
-
inline char one_letter_code() const
-
inline std::string parent_id() const
Return the one letter code to use in a canonical sequence. If unknown the value ‘\0’ is returned.
-
inline std::string id() const