| #ifndef CHEM_ATOM_H
|
| #define CHEM_ATOM_H
|
|
|
| #include "Atom.h"
|
|
|
| enum HB_TYPE {DONOR = 0, ACCEPTOR = 1, HB_BOTH = 2, NONE = 3};
|
| enum MOL2_TYPE {C2 = 0, C3 =1 , Car = 2, Ccat = 3, N2 = 4, N4 = 5, Nam = 6,
|
| Nar = 7, Npl3 = 8, O2 = 9, O3 = 10, Oco2 = 11, P3 = 12, S3 = 13, UNK_MOL2_TYPE = 14 };
|
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| class ChemAtom : public Atom {
|
| public:
|
|
|
|
|
|
|
| ChemAtom();
|
|
|
|
|
| ChemAtom(const Vector3& p, const char ch, const unsigned int aid,
|
| const unsigned int resid, const char* const t, const char resTp,
|
| const int chem_type=0, const float rad=1.5, const float charge=0);
|
|
|
| ChemAtom(const std::string& PDBrec, bool cif = false);
|
|
|
|
|
|
|
|
|
|
|
| void setChemType(const int chem_type) {
|
| if(chem_type <= 0 || chem_type > 18) {
|
| std::cerr << "Error in ChemType for atom " << *this << std::endl;
|
| } else {
|
| chemType_ = chem_type;
|
| }
|
| }
|
|
|
|
|
| void setRadius(const float r) { radius_ = r; }
|
|
|
|
|
| void setEpsilon(const float e) { epsilon_ = e; }
|
|
|
|
|
| void setCharge(const float c) { charge_ = c; }
|
|
|
|
|
| void setHBData(const HB_TYPE hbType, const Vector3& hbDirection);
|
|
|
|
|
| void setSteadyProb(const float p) { steadyProb_ = p; }
|
|
|
|
|
| void setASA(const float ASA) { ASA_ = ASA; }
|
|
|
|
|
| void setPosition(const Vector3& v) { update(v); }
|
|
|
|
|
| void setMol2Type(const MOL2_TYPE t) { mol2Type_ = t; }
|
|
|
|
|
|
|
|
|
| int getChemType() const {
|
| if(chemType_ <= 0 || chemType_ > 18) return 0;
|
| return chemType_;
|
| }
|
|
|
|
|
| float getRadius() const { return radius_; }
|
|
|
|
|
| float getEpsilon() const { return epsilon_; }
|
|
|
|
|
| bool isHydrogen() const { return isH(); }
|
|
|
|
|
| float getCharge() const { return charge_; }
|
|
|
|
|
| bool isDonor() const { return (hbType_ == HB_BOTH || hbType_ == DONOR); }
|
|
|
|
|
| bool isAcceptor() const { return (hbType_ == HB_BOTH || hbType_ == ACCEPTOR); }
|
|
|
|
|
| const Vector3& getHBDirection() const { return hbDirection_; }
|
|
|
|
|
| float getSteadyProb() const { return steadyProb_; }
|
|
|
|
|
| float getASA() const { return ASA_; }
|
|
|
|
|
| bool isNonPolar() const { return isNonPolar_; }
|
|
|
|
|
| MOL2_TYPE getMol2Type() const { return mol2Type_; }
|
|
|
| Vector3 position() const {return (Atom(*this)).position(); }
|
|
|
| friend Vector3& operator*=(ChemAtom &v,const RigidTrans3 &rt) {
|
|
|
| v += (rt.rotation() * v) + rt.translation() - v;
|
| if (!v.hbDirection_.isZero())
|
| v.hbDirection_ = rt.rotation() * v.hbDirection_;
|
| return v;
|
| }
|
|
|
|
|
|
|
| static const float maxRadius;
|
|
|
|
|
| private:
|
| void setPolarity();
|
|
|
| private:
|
| int chemType_;
|
| float radius_;
|
| float charge_;
|
| float epsilon_;
|
| HB_TYPE hbType_;
|
| Vector3 hbDirection_;
|
| bool isNonPolar_;
|
| float steadyProb_;
|
| float ASA_;
|
| MOL2_TYPE mol2Type_;
|
| };
|
| #endif
|
|
|