00001 #include "molmodel/internal/common.h"
00002 #include "molmodel/internal/Compound.h"
00003 #include <iostream>
00004 #include <fstream>
00005
00006
00007 namespace SimTK
00008 {
00009
00010
00011
00012
00013
00014
00015 class P12 : public Compound {
00016 public:
00017
00018 P12(DuMMForceFieldSubsystem &dumm)
00019 {
00020
00021 setBaseCompound("methyl", MethylGroup() );
00022 bondAtom(BivalentAtom("OA1",Element::Oxygen(),109.5*Deg2Rad), "methyl/bond" ,.141);
00023 bondAtom(TrivalentAtom("C4", Element::Carbon()),"OA1/bond2",.141);
00024 bondCompound("C3compound",AromaticSixMemberedCHGroup(),"C4/bond2",.141);
00025 bondCompound("C5compound",AromaticSixMemberedCHGroup(),"C4/bond3",.141);
00026 bondCompound("C6compound",AromaticSixMemberedCHGroup(),"C5compound/C/bond2",.141);
00027 bondAtom(TrivalentAtom("C1", Element::Carbon()),"C6compound/C/bond2",.141);
00028 bondAtom(TrivalentAtom("C2", Element::Carbon()),"C3compound/C/bond2",.141);
00029 addRingClosingBond("C1/bond3", "C2/bond3", 0.1410);
00030 nameAtom("C5", "C5compound/C");
00031 nameAtom("C6", "C6compound/C");
00032 defineDihedralAngle("C4C3CC2C1","C4","C3compound/C","C2" ,"C1");
00033 setDefaultDihedralAngle("C4C3CC2C1", 0.00*Deg2Rad);
00034 bondCompound("CAcompound",MethyleneGroup(),"C2/bond2" ,.141);
00035 nameAtom("CA", "CAcompound/C");
00036 nameAtom("HA1", "CAcompound/H1");
00037 nameAtom("HA2", "CAcompound/H2");
00038 defineDihedralAngle("theta", "C4","C3compound/C","C2","CA");
00039 setDefaultDihedralAngle("theta",140.0 *Deg2Rad);
00040 bondAtom(QuadrivalentAtom("NB",Element::Nitrogen()),"CAcompound/bond2",.141);
00041 bondAtom( UnivalentAtom("HB",Element::Hydrogen()),"NB/bond4",.141);
00042 defineDihedralAngle("omega", "C3compound/C","C2","CA","NB");
00043 setDefaultDihedralAngle("omega", 40.0 *Deg2Rad);
00044 bondAtom(BivalentAtom("OA",Element::Oxygen(),109.5*Deg2Rad), "C1/bond2" ,.141);
00045
00046 bondCompound( "CBcompound",MethyleneGroup(),"OA/bond2" ,.141);
00047 nameAtom( "CB", "CBcompound/C");
00048 nameAtom( "HB1","CBcompound/H1");
00049 nameAtom( "HB2","CBcompound/H2");
00050
00051 defineDihedralAngle("alpha", "C6compound/C","C1","OA","CB");
00052 setDefaultDihedralAngle("alpha", 40.0 *Deg2Rad);
00053
00054
00055 bondCompound("CGcompound",MethyleneGroup(),"CBcompound/bond2" ,.141);
00056 nameAtom("CG", "CGcompound/C");
00057 nameAtom("HG1","CGcompound/H1");
00058 nameAtom("HG2","CGcompound/H2");
00059
00060 bondCompound( "CDcompound",MethyleneGroup(),"CGcompound/bond2" ,.141);
00061 nameAtom("CD", "CDcompound/C");
00062 nameAtom("HD1","CDcompound/H2");
00063 nameAtom("HD2","CDcompound/H1");
00064 defineDihedralAngle("zeta", "C1","OA","CB","CG");
00065 setDefaultDihedralAngle("zeta" , 40.0 *Deg2Rad);
00066
00067 bondCompound("NEcompound",PrimaryAmineGroup(),"CDcompound/bond2" ,.141);
00068 nameAtom("NE", "NEcompound/N");
00069 nameAtom("HE1","NEcompound/H1");
00070 nameAtom("HE2","NEcompound/H2");
00071 nameAtom("HE3","NEcompound/H3");
00072
00073 defineDihedralAngle("gamma", "C3compound/C","C2","CA","NB");
00074 setDefaultDihedralAngle("gamma", 140.0*Deg2Rad);
00075
00076 bondCompound("CG1compound",MethyleneGroup(),"NB/bond2" ,.141);
00077 nameAtom("CG1", "CG1compound/C");
00078 nameAtom("HG11","CG1compound/H2");
00079 nameAtom("HG12","CG1compound/H1");
00080 bondCompound("CG2compound",MethyleneGroup(),"NB/bond3" ,.141);
00081 nameAtom("CG2", "CG2compound/C");
00082 nameAtom("HG21","CG2compound/H1");
00083 nameAtom("HG22","CG2compound/H2");
00084 bondCompound("CD1compound",MethyleneGroup(),"CG1compound/bond2" ,.141);
00085 nameAtom("CD1", "CD1compound/C");
00086 nameAtom("HD11","CD1compound/H1");
00087 nameAtom("HD12","CD1compound/H2");
00088 bondCompound("CD2compound",MethyleneGroup(),"CG2compound/bond2" ,.141);
00089 nameAtom("CD2", "CD2compound/C");
00090 nameAtom("HD21","CD2compound/H2");
00091 nameAtom("HD22","CD2compound/H1");
00092
00093 bondAtom(TrivalentAtom("NE1",Element::Nitrogen()),"CD1compound/bond2",.141);
00094 bondAtom( TrivalentAtom("CZ" ,Element::Carbon()), "NE1/bond2" ,.141);
00095 addRingClosingBond("CD2compound/bond2", "NE1/bond3", 0.1410);
00096 bondAtom(TrivalentAtom("NH1",Element::Nitrogen()), "CZ/bond2",.141);
00097 bondAtom(UnivalentAtom("HH11",Element::Hydrogen()),"NH1/bond2",.141);
00098 bondAtom(UnivalentAtom("HH12",Element::Hydrogen()),"NH1/bond3",.141);
00099 bondAtom(TrivalentAtom("NH2",Element::Nitrogen()), "CZ/bond3",.141);
00100 bondAtom(UnivalentAtom("HH21",Element::Hydrogen()),"NH2/bond2",.141);
00101 bondAtom(UnivalentAtom("HH22",Element::Hydrogen()),"NH2/bond3",.141);
00102
00103 defineDihedralAngle("delta", "NH1" ,"CZ","NE1","CD1");
00104 setDefaultDihedralAngle("delta", 70.00*Deg2Rad);
00105
00106 defineDihedralAngle("beta" , "C1","OA","CB","CG");
00107 setDefaultDihedralAngle("beta" , 40.0 *Deg2Rad);
00108
00109
00110
00111
00112 nameAtom("CB1", "methyl/C");
00113 nameAtom("HB11", "methyl/H1");
00114 nameAtom("HB12", "methyl/H2");
00115 nameAtom("HB13", "methyl/H3");
00116 nameAtom("C3", "C3compound/C");
00117 nameAtom("H3", "C3compound/H");
00118 nameAtom("H5", "C5compound/H");
00119 nameAtom("H6", "C6compound/H");
00120
00121
00122
00123
00124
00125 setAtomBiotype("CB1" ,"P12","CB1" );
00126 setAtomBiotype("HB11","P12","HB11");
00127 setAtomBiotype("HB12","P12","HB11");
00128 setAtomBiotype("HB13","P12","HB11");
00129 setAtomBiotype("HA1" ,"P12","HC" );
00130 setAtomBiotype("HA2" ,"P12","HC" );
00131 setAtomBiotype("HB1" ,"P12","HC" );
00132 setAtomBiotype("HB2" ,"P12","HC" );
00133
00134 setAtomBiotype("HD1" ,"P12","HC" );
00135
00136 setAtomBiotype("HD2" ,"P12","HC" );
00137
00138 setAtomBiotype("HG1" ,"P12","HC" );
00139
00140 setAtomBiotype("HG2" ,"P12","HC" );
00141
00142 setAtomBiotype("HG11","P12","HC" );
00143
00144 setAtomBiotype("HG12","P12","HC" );
00145
00146 setAtomBiotype("HG21","P12","HC" );
00147
00148 setAtomBiotype("HG22","P12","HC" );
00149
00150 setAtomBiotype("HD11","P12","HC" );
00151
00152 setAtomBiotype("HD12","P12","HC" );
00153
00154 setAtomBiotype("HD21","P12","HC" );
00155
00156 setAtomBiotype("HD22","P12","HC" );
00157 setAtomBiotype("HE1" ,"P12", "HE1");
00158
00159
00160 setAtomBiotype("HE2" ,"P12","HE1" );
00161
00162 setAtomBiotype("HE3" ,"P12","HE1" );
00163 setAtomBiotype("HA1" ,"P12","HC" );
00164
00165 setAtomBiotype("HH11","P12","HH11");
00166
00167 setAtomBiotype("HH12","P12","HH11");
00168
00169 setAtomBiotype("HH21","P12","HH11");
00170
00171 setAtomBiotype("HH22","P12","HH11");
00172
00173 setAtomBiotype("OA1" ,"P12","OA1" );
00174
00175
00176 setAtomBiotype("OA" ,"P12","OA1" );
00177
00178 setAtomBiotype("NE" ,"P12", "NE" );
00179
00180 setAtomBiotype("NE1" ,"P12", "NE1" );
00181
00182 setAtomBiotype("NH1" ,"P12", "NH1");
00183
00184 setAtomBiotype("NH2" ,"P12","NH1" );
00185
00186
00187 setAtomBiotype("NB" ,"P12","NE" );
00188
00189 setAtomBiotype("C4" ,"P12","C4" );
00190
00191
00192 setAtomBiotype("C1" ,"P12","C4" );
00193 setAtomBiotype("C3" ,"P12", "C3" );
00194 setAtomBiotype("H3" ,"P12", "H3" );
00195
00196 setAtomBiotype("C5" ,"P12","C3" );
00197
00198 setAtomBiotype("H5" ,"P12","H3" );
00199
00200 setAtomBiotype("C6" ,"P12","C3" );
00201
00202 setAtomBiotype("H6" ,"P12","H3" );
00203
00204 setAtomBiotype("C2" ,"P12", "C3" );
00205 setAtomBiotype("CB" ,"P12", "CD" );
00206 setAtomBiotype("CD" ,"P12", "CD" );
00207
00208 setAtomBiotype("CG" ,"P12","CD" );
00209
00210 setAtomBiotype("CD" ,"P12","CD" );
00211 setAtomBiotype("CA" ,"P12","CD" );
00212 setAtomBiotype("CG1" ,"P12","CD" );
00213 setAtomBiotype("CG2" ,"P12","CD" );
00214 setAtomBiotype("CD1","P12","CD");
00215 setAtomBiotype("CD2" ,"P12","CD" );
00216 setAtomBiotype("CZ" ,"P12", "CZ" );
00217 setAtomBiotype("C4" ,"P12","C4" );
00218
00219
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(37),Biotype::get("P12","CB1").getIndex());
00231 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(38),Biotype::get("P12","HB11").getIndex());
00232 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(34),Biotype::get("P12","HC").getIndex());
00233 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(371),Biotype::get("P12","HE1").getIndex());
00234 cout << "setting parameters for P12 HB"<<endl;
00235 setAtomBiotype("HB","P12","HB");
00236 if (! dumm.hasChargedAtomType(DuMM::ChargedAtomTypeIndex(4000)))
00237 {
00238 dumm.defineChargedAtomType(DuMM::ChargedAtomTypeIndex(4000),"P12 HB",DuMM::AtomClassIndex(29),.6);
00239 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(4000),Biotype::get("P12","HB").getIndex());
00240
00241 }
00242
00243
00244
00245
00246
00247
00248
00249
00250
00251
00252
00253 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(303),Biotype::get("P12","HH11").getIndex());
00254 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(1068),Biotype::get("P12","OA1").getIndex());
00255 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(368),Biotype::get("P12","NE").getIndex());
00256 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(1078),Biotype::get("P12","NE1").getIndex());
00257 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(302),Biotype::get("P12","NH1").getIndex());
00258 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(130),Biotype::get("P12","C4").getIndex());
00259 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(133),Biotype::get("P12","C3").getIndex());
00260 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(134),Biotype::get("P12","H3").getIndex());
00261
00262 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(33),Biotype::get("P12","CD").getIndex());
00263 dumm.setBiotypeChargedAtomType(DuMM::ChargedAtomTypeIndex(301),Biotype::get("P12","CZ").getIndex());
00264
00265 for (int r =0 ; r<getNumBonds(); r++)
00266 {
00267 setBondMobility(BondMobility::Free ,Compound::BondIndex(r));
00268 }
00269
00270 setPdbResidueNumber(1046);
00271 setPdbResidueName("P12") ;
00272 setPdbChainId('B');
00273
00274 std::ifstream inFileStream("1UUI.pdb",std::ifstream::in);
00275
00276
00277
00278 PdbStructure pdbStructure(inFileStream);
00279 Compound::AtomTargetLocations atomTargets = createAtomTargets(pdbStructure);
00280 std::cout<<"atomtargest.szie "<<atomTargets.size()<<std::endl;
00281 matchDefaultBondLengths(atomTargets);
00282 matchDefaultBondAngles(atomTargets);
00283 matchDefaultAtomChirality(atomTargets);
00284 matchDefaultDihedralAngles(atomTargets);
00285 matchDefaultTopLevelTransform(atomTargets);
00286
00287 }
00288
00289
00290
00291 };
00292 }