BALL
1.4.1
|
00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 00005 #ifndef BALL_STRUCTURE_PEPTIDEBUILDER_H 00006 #define BALL_STRUCTURE_PEPTIDEBUILDER_H 00007 00008 #ifndef BALL_STRUCTURE_PEPTIDES_H 00009 # include <BALL/STRUCTURE/peptides.h> 00010 #endif 00011 00012 namespace BALL 00013 { 00014 class FragmentDB; 00015 00016 namespace Peptides 00017 { 00021 class BALL_EXPORT AminoAcidDescriptor 00022 { 00023 public: 00024 00027 AminoAcidDescriptor(); 00028 00035 AminoAcidDescriptor(const String& type, const Angle& phi=Angle(-47.,false), 00036 const Angle& psi=Angle(-58.,false), const Angle& omega=Angle(180.,false)); 00038 00041 virtual ~AminoAcidDescriptor(); 00042 00045 AminoAcidDescriptor(const AminoAcidDescriptor& aad); 00046 00050 void setAminoAcidType(const String& type); 00051 00054 void setPhi(const Angle& phi); 00055 00058 void setPsi(const Angle& psi); 00059 00062 void setOmega(const Angle& omega); 00063 00066 const String& getType() const; 00067 00070 const Angle& getPhi() const; 00071 00074 const Angle& getPsi() const; 00075 00078 const Angle& getOmega() const; 00079 00080 protected: 00081 00082 String type_; 00083 Angle phi_; 00084 Angle psi_; 00085 Angle omega_; 00086 }; 00087 00092 class BALL_EXPORT PeptideBuilder 00093 { 00094 public: 00095 00098 PeptideBuilder(); 00099 00104 PeptideBuilder(const std::vector<AminoAcidDescriptor>& sequence); 00105 00108 PeptideBuilder(const String& sequence, const Angle& phi = Angle(-47., false), 00109 const Angle& psi = Angle(-58., false), const Angle& omega = Angle(180., false)); 00110 00113 PeptideBuilder(const PeptideBuilder& pc); 00114 00117 virtual ~PeptideBuilder(); 00118 00121 void addAminoAcid(const String& type, const Angle& phi=Angle(-47.,false), 00122 const Angle& psi=Angle(-58.,false), const Angle& omega=Angle(180.,false)); 00123 // Sheet angles ??? 00124 00127 void addAminoAcid(const AminoAcidDescriptor& aad); 00128 00131 void setChainName(const String& name); 00132 00135 const String& getChainName() const; 00136 00139 void setProteinName(const String& name); 00140 00143 const String& getProteinName() const; 00144 00147 Protein* construct(); 00148 00150 void setFragmentDB(const FragmentDB* db) 00151 ; 00152 00154 const FragmentDB* getFragmentDB() const 00155 ; 00156 00157 protected: 00158 std::vector<AminoAcidDescriptor> sequence_; 00159 String chainname_; 00160 String proteinname_; 00161 00163 bool is_proline_; 00164 FragmentDB* fragment_db_; 00165 00169 Residue* createResidue_(const String& type, const int id); 00170 void insert_(Residue& resnew, Residue& resold); 00171 void transform_(const Angle& phi, const Angle& psi, Residue& resold, Residue& resnew); 00172 void peptide_(Residue& resold, Residue& resnew); 00173 void setOmega_(Residue& resold, Residue& residue, const Angle& omega); 00174 PDBAtom* getAtomByName_(Residue& res, const String& name); 00175 }; 00176 00177 } // namespace Peptides 00178 00179 } // namespace BALL 00180 00181 #endif // BALL_STRUCTURE_PEPTIDEBUILDER_H