22 #include <AminoAcidCode.h>
23 #include <IntCoordConverter.h>
26 namespace Victor {
namespace Biopool {
41 virtual string getClassName()
const {
44 virtual unsigned int getCode()
const;
46 virtual string getExtendedType()
const;
48 double getChi(
unsigned int n);
50 unsigned int getMaxChi();
54 bool isMember(
const AtomCode& ac)
const;
59 void setChi(
unsigned int n,
double c);
60 void setChi(vector<double> cv);
80 Atom& operator[](
unsigned int n);
81 const Atom& operator[](
unsigned int n)
const;
82 Atom& operator[](
const AtomCode& ac);
83 const Atom& operator[](
const AtomCode& ac)
const;
89 bool findCode(
char c,
unsigned int& pos,
unsigned int& pos2);
90 void findHCode(
char c,
char c2,
Atom& at,
bool connect);
91 void setMaxChiFromCode();
92 void setMaxChi(
unsigned int _maxChi);
93 double calculateChi(
unsigned int n);
94 void convertChi(
unsigned int n,
double a);
123 inline unsigned int SideChain::getCode()
const {
124 return aminoAcidThreeLetterTranslator(
getType());
129 return tmp.substr(0, 3);
132 inline string SideChain::getExtendedType()
const {
137 PRECOND(n < chi.size(), exception);
139 chi[n] = RAD2DEG * calculateChi(n);
143 inline unsigned int SideChain::getMaxChi() {
147 inline AminoAcid* SideChain::getBackboneRef() {
148 if (backboneRef == NULL)
149 DEBUG_MSG(
"Sidechain has no assigned backbone.");
153 inline bool SideChain::isMember(
const AtomCode& ac)
const {
157 inline void SideChain::save(Saver& s) {
161 inline void SideChain::acceptCalculator(EnergyVisitor* v) {
162 v->PrepareSideChain(*
this);
165 inline void SideChain::acceptOptimizer(OptimizationVisitor* v) {
166 v->PrepareSideChain(*
this);
172 inline void SideChain::setChi(
unsigned int n,
double c) {
173 PRECOND((n < chi.size()) && (c >= -180) && (c <= 180), exception);
174 convertChi(n, DEG2RAD * c);
178 inline void SideChain::load(Loader& l) {
179 l.loadSideChain(*
this);
200 inline Atom& SideChain::operator[](
unsigned int n) {
201 return (Group::getAtom(n));
204 inline const Atom& SideChain::operator[](
unsigned int n)
const {
205 return (Group::getAtom(n));
208 inline Atom& SideChain::operator[](
const AtomCode& ac) {
210 INVARIANT(a != NULL, exception);
214 inline const Atom& SideChain::operator[](
const AtomCode& ac)
const {
216 INVARIANT(a != NULL, exception);
223 #endif //_SIDECHAIN_H_
void setBackboneRef(AminoAcid *br)
Definition: SideChain.cc:82
Base class for saving components (Atoms, Groups, etc.).
Definition: Saver.h:39
This class implements a side chain.
Definition: SideChain.h:32
vector< double > getChi()
Definition: SideChain.cc:47
virtual const SimpleBond & getInBond(unsigned int n) const
Definition: SimpleBond.h:176
virtual const SimpleBond & getOutBond(unsigned int n) const
Definition: SimpleBond.h:184
This class implements a simple chemical group.
Definition: Group.h:35
void resetBoundaries()
Definition: Group.cc:50
void patchAminoAcidCode()
Definition: SideChain.cc:96
virtual const SideChain & getInBond(unsigned int n) const
Definition: SideChain.h:183
Base class for loading components (Atoms, Groups, etc.).
Definition: Loader.h:39
Base class implementing the visitor pattern.
Definition: Visitor.h:38
bool setBondsFromPdbCode(bool connect, bool permissive=false)
Definition: SideChain.cc:171
virtual const SideChain & getOutBond(unsigned int n) const
Definition: SideChain.h:191
Atom * pGetAtom(const AtomCode &ac) const
Definition: Group.cc:200
Base class Optimizacion Patter.
Definition: Visitor.h:66
Implements a simple atom type.
Definition: Atom.h:39
It mplements a simple amino acid.
Definition: AminoAcid.h:43
virtual string getType() const
Definition: SideChain.h:127