Molmodel
|
00001 #ifndef SimTK_MOLMODEL_IONS_H_ 00002 #define SimTK_MOLMODEL_IONS_H_ 00003 00004 /* -------------------------------------------------------------------------- * 00005 * SimTK Core: SimTK Molmodel * 00006 * -------------------------------------------------------------------------- * 00007 * This is part of the SimTK Core biosimulation toolkit originating from * 00008 * Simbios, the NIH National Center for Physics-Based Simulation of * 00009 * Biological Structures at Stanford, funded under the NIH Roadmap for * 00010 * Medical Research, grant U54 GM072970. See https://simtk.org. * 00011 * * 00012 * Portions copyright (c) 2007 Stanford University and the Authors. * 00013 * Authors: Michael Sherman, Christopher Bruns * 00014 * Contributors: * 00015 * * 00016 * Permission is hereby granted, free of charge, to any person obtaining a * 00017 * copy of this software and associated documentation files (the "Software"), * 00018 * to deal in the Software without restriction, including without limitation * 00019 * the rights to use, copy, modify, merge, publish, distribute, sublicense, * 00020 * and/or sell copies of the Software, and to permit persons to whom the * 00021 * Software is furnished to do so, subject to the following conditions: * 00022 * * 00023 * The above copyright notice and this permission notice shall be included in * 00024 * all copies or substantial portions of the Software. * 00025 * * 00026 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * 00027 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * 00028 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * 00029 * THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 00030 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 00031 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE * 00032 * USE OR OTHER DEALINGS IN THE SOFTWARE. * 00033 * -------------------------------------------------------------------------- */ 00034 00035 00036 #include "SimTKsimbody.h" 00037 00038 #include "molmodel/internal/common.h" 00039 #include "molmodel/internal/Compound.h" 00040 00041 #include <iosfwd> // declare ostream without all the definitions 00042 00043 namespace SimTK { 00044 00046 class LithiumIon : public Molecule { 00047 public: 00048 LithiumIon() 00049 { 00050 instantiateBiotypes(); 00051 00052 setPdbResidueName("LI "); 00053 00054 setBaseAtom( "Li+", Biotype::get("Lithium Ion", "Li+") ); 00055 00056 setCompoundName("Lithium Ion"); 00057 } 00058 00059 static void instantiateBiotypes() { 00060 if (! Biotype::exists("Lithium Ion", "Li+") ) 00061 Biotype::defineBiotype(Element::Lithium(), 0, "Lithium Ion", "Li+"); 00062 } 00063 00064 // create charged atom types 00065 // ensure that charges sum to zero, unless molecule has a formal charge 00066 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00067 { 00068 instantiateBiotypes(); 00069 00070 const char* ionName = "Li+ Lithium Ion"; 00071 00072 if (! dumm.hasAtomClass(ionName) ) { 00073 dumm.defineAtomClass_KA( 00074 dumm.getNextUnusedAtomClassIndex(), 00075 ionName, 00076 Element::Lithium().getAtomicNumber(), 00077 0, // no covalent bonds 00078 1.137, // radius 00079 0.0183 // well depth 00080 ); 00081 } 00082 00083 if (! dumm.hasChargedAtomType(ionName) ) { 00084 dumm.defineChargedAtomType( 00085 dumm.getNextUnusedChargedAtomTypeIndex(), 00086 ionName, 00087 dumm.getAtomClassIndex(ionName), 00088 1.00 00089 ); 00090 } 00091 00092 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Lithium Ion", "Li+").getIndex() ); 00093 } 00094 }; 00095 00097 class SodiumIon : public Molecule { 00098 public: 00099 SodiumIon() 00100 { 00101 instantiateBiotypes(); 00102 00103 setPdbResidueName("NA "); 00104 00105 setBaseAtom( "Na+", Biotype::get("Sodium Ion", "Na+") ); 00106 00107 setCompoundName("Sodium Ion"); 00108 } 00109 00110 static void instantiateBiotypes() { 00111 if (! Biotype::exists("Sodium Ion", "Na+") ) 00112 Biotype::defineBiotype(Element::Sodium(), 0, "Sodium Ion", "Na+"); 00113 } 00114 00115 // create charged atom types 00116 // ensure that charges sum to zero, unless molecule has a formal charge 00117 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00118 { 00119 instantiateBiotypes(); 00120 00121 if (! dumm.hasAtomClass("Na+ Sodium Ion") ) { 00122 dumm.defineAtomClass_KA( 00123 dumm.getNextUnusedAtomClassIndex(), 00124 "Na+ Sodium Ion", 00125 Element::Sodium().getAtomicNumber(), 00126 0, // no covalent bonds 00127 1.8680, // radius 00128 0.00277 // well depth 00129 ); 00130 } 00131 00132 if (! dumm.hasChargedAtomType("Na+ Sodium Ion") ) { 00133 dumm.defineChargedAtomType( 00134 dumm.getNextUnusedChargedAtomTypeIndex(), 00135 "Na+ Sodium Ion", 00136 dumm.getAtomClassIndex("Na+ Sodium Ion"), 00137 1.00 00138 ); 00139 } 00140 00141 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex("Na+ Sodium Ion"), Biotype::get("Sodium Ion", "Na+").getIndex() ); 00142 } 00143 00144 }; 00145 00147 class PotassiumIon : public Molecule { 00148 public: 00149 PotassiumIon() 00150 { 00151 instantiateBiotypes(); 00152 00153 setPdbResidueName("K "); 00154 00155 setBaseAtom( "K+", Biotype::get("Potassium Ion", "K+") ); 00156 00157 setCompoundName("Potassium Ion"); 00158 } 00159 00160 static void instantiateBiotypes() { 00161 if (! Biotype::exists("Potassium Ion", "K+") ) 00162 Biotype::defineBiotype(Element::Potassium(), 0, "Potassium Ion", "K+"); 00163 } 00164 00165 // create charged atom types 00166 // ensure that charges sum to zero, unless molecule has a formal charge 00167 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00168 { 00169 instantiateBiotypes(); 00170 00171 const char* ionName = "K+ Potassium Ion"; 00172 00173 if (! dumm.hasAtomClass(ionName) ) { 00174 dumm.defineAtomClass_KA( 00175 dumm.getNextUnusedAtomClassIndex(), 00176 ionName, 00177 Element::Potassium().getAtomicNumber(), 00178 0, // no covalent bonds 00179 2.6580, // radius 00180 0.000328 // well depth 00181 ); 00182 } 00183 00184 if (! dumm.hasChargedAtomType(ionName) ) { 00185 dumm.defineChargedAtomType( 00186 dumm.getNextUnusedChargedAtomTypeIndex(), 00187 ionName, 00188 dumm.getAtomClassIndex(ionName), 00189 1.00 00190 ); 00191 } 00192 00193 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Potassium Ion", "K+").getIndex() ); 00194 } 00195 }; 00196 00198 class RubidiumIon : public Molecule { 00199 public: 00200 RubidiumIon() 00201 { 00202 instantiateBiotypes(); 00203 00204 setPdbResidueName("RB "); 00205 00206 setBaseAtom( "Rb+", Biotype::get("Rubidium Ion", "Rb+") ); 00207 00208 setCompoundName("Rubidium Ion"); 00209 } 00210 00211 static void instantiateBiotypes() { 00212 if (! Biotype::exists("Rubidium Ion", "Rb+") ) 00213 Biotype::defineBiotype(Element::Rubidium(), 0, "Rubidium Ion", "Rb+"); 00214 } 00215 00216 // create charged atom types 00217 // ensure that charges sum to zero, unless molecule has a formal charge 00218 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00219 { 00220 instantiateBiotypes(); 00221 00222 const char* ionName = "Rb+ Rubidium Ion"; 00223 00224 if (! dumm.hasAtomClass(ionName) ) { 00225 dumm.defineAtomClass_KA( 00226 dumm.getNextUnusedAtomClassIndex(), 00227 ionName, 00228 Element::Rubidium().getAtomicNumber(), 00229 0, // no covalent bonds 00230 2.956, // radius 00231 0.00017 // well depth 00232 ); 00233 } 00234 00235 if (! dumm.hasChargedAtomType(ionName) ) { 00236 dumm.defineChargedAtomType( 00237 dumm.getNextUnusedChargedAtomTypeIndex(), 00238 ionName, 00239 dumm.getAtomClassIndex(ionName), 00240 1.00 00241 ); 00242 } 00243 00244 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Rubidium Ion", "Rb+").getIndex() ); 00245 } 00246 }; 00247 00249 class CesiumIon : public Molecule { 00250 public: 00251 CesiumIon() 00252 { 00253 instantiateBiotypes(); 00254 00255 setPdbResidueName("CS "); 00256 00257 setBaseAtom( "Cs+", Biotype::get("Cesium Ion", "Cs+") ); 00258 00259 setCompoundName("Cesium Ion"); 00260 } 00261 00262 static void instantiateBiotypes() { 00263 if (! Biotype::exists("Cesium Ion", "Cs+") ) 00264 Biotype::defineBiotype(Element::Cesium(), 0, "Cesium Ion", "Cs+"); 00265 } 00266 00267 // create charged atom types 00268 // ensure that charges sum to zero, unless molecule has a formal charge 00269 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00270 { 00271 instantiateBiotypes(); 00272 00273 const char* ionName = "Cs+ Cesium Ion"; 00274 00275 if (! dumm.hasAtomClass(ionName) ) { 00276 dumm.defineAtomClass_KA( 00277 dumm.getNextUnusedAtomClassIndex(), 00278 ionName, 00279 Element::Cesium().getAtomicNumber(), 00280 0, // no covalent bonds 00281 3.390, // radius 00282 0.0000806 // well depth 00283 ); 00284 } 00285 00286 if (! dumm.hasChargedAtomType(ionName) ) { 00287 dumm.defineChargedAtomType( 00288 dumm.getNextUnusedChargedAtomTypeIndex(), 00289 ionName, 00290 dumm.getAtomClassIndex(ionName), 00291 1.00 00292 ); 00293 } 00294 00295 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Cesium Ion", "Cs+").getIndex() ); 00296 } 00297 }; 00298 00300 class MagnesiumIon : public Molecule { 00301 public: 00302 MagnesiumIon() 00303 { 00304 instantiateBiotypes(); 00305 00306 setPdbResidueName("MG "); 00307 00308 setBaseAtom( "Mg+2", Biotype::get("Magnesium Ion", "Mg+2") ); 00309 00310 setCompoundName("Magnesium Ion"); 00311 } 00312 00313 static void instantiateBiotypes() { 00314 if (! Biotype::exists("Magnesium Ion", "Mg+2") ) 00315 Biotype::defineBiotype(Element::Magnesium(), 0, "Magnesium Ion", "Mg+2"); 00316 } 00317 00318 // create charged atom types 00319 // ensure that charges sum to zero, unless molecule has a formal charge 00320 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00321 { 00322 instantiateBiotypes(); 00323 00324 const char* ionName = "Mg+2 Magnesium Ion"; 00325 00326 if (! dumm.hasAtomClass(ionName) ) { 00327 dumm.defineAtomClass_KA( 00328 dumm.getNextUnusedAtomClassIndex(), 00329 ionName, 00330 Element::Magnesium().getAtomicNumber(), 00331 0, // no covalent bonds 00332 0.7926, // radius 00333 0.8947 // well depth 00334 ); 00335 } 00336 00337 if (! dumm.hasChargedAtomType(ionName) ) { 00338 dumm.defineChargedAtomType( 00339 dumm.getNextUnusedChargedAtomTypeIndex(), 00340 ionName, 00341 dumm.getAtomClassIndex(ionName), 00342 2.00 00343 ); 00344 } 00345 00346 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Magnesium Ion", "Mg+2").getIndex() ); 00347 } 00348 }; 00349 00351 class CalciumIon : public Molecule { 00352 public: 00353 CalciumIon() 00354 { 00355 instantiateBiotypes(); 00356 00357 setPdbResidueName("CA "); 00358 00359 setBaseAtom( "Ca+2", Biotype::get("Calcium Ion", "Ca+2") ); 00360 00361 setCompoundName("Calcium Ion"); 00362 } 00363 00364 static void instantiateBiotypes() { 00365 if (! Biotype::exists("Calcium Ion", "Ca+2") ) 00366 Biotype::defineBiotype(Element::Calcium(), 0, "Calcium Ion", "Ca+2"); 00367 } 00368 00369 // create charged atom types 00370 // ensure that charges sum to zero, unless molecule has a formal charge 00371 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00372 { 00373 instantiateBiotypes(); 00374 00375 const char* ionName = "Ca+2 Calcium Ion"; 00376 00377 if (! dumm.hasAtomClass(ionName) ) { 00378 dumm.defineAtomClass_KA( 00379 dumm.getNextUnusedAtomClassIndex(), 00380 ionName, 00381 Element::Calcium().getAtomicNumber(), 00382 0, // no covalent bonds 00383 1.7131, // radius 00384 0.459789 // well depth 00385 ); 00386 } 00387 00388 if (! dumm.hasChargedAtomType(ionName) ) { 00389 dumm.defineChargedAtomType( 00390 dumm.getNextUnusedChargedAtomTypeIndex(), 00391 ionName, 00392 dumm.getAtomClassIndex(ionName), 00393 2.00 00394 ); 00395 } 00396 00397 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Calcium Ion", "Ca+2").getIndex() ); 00398 } 00399 }; 00400 00402 class ZincIon : public Molecule { 00403 public: 00404 ZincIon() 00405 { 00406 instantiateBiotypes(); 00407 00408 setPdbResidueName("ZN "); 00409 00410 setBaseAtom( "Zn+2", Biotype::get("Zinc Ion", "Zn+2") ); 00411 00412 setCompoundName("Zinc Ion"); 00413 } 00414 00415 static void instantiateBiotypes() { 00416 if (! Biotype::exists("Zinc Ion", "Zn+2") ) 00417 Biotype::defineBiotype(Element::Zinc(), 0, "Zinc Ion", "Zn+2"); 00418 } 00419 00420 // create charged atom types 00421 // ensure that charges sum to zero, unless molecule has a formal charge 00422 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00423 { 00424 instantiateBiotypes(); 00425 00426 const char* ionName = "Zn+2 Zinc Ion"; 00427 00428 if (! dumm.hasAtomClass(ionName) ) { 00429 dumm.defineAtomClass_KA( 00430 dumm.getNextUnusedAtomClassIndex(), 00431 ionName, 00432 Element::Zinc().getAtomicNumber(), 00433 0, // no covalent bonds 00434 1.1000, // radius 00435 0.0125 // well depth 00436 ); 00437 } 00438 00439 if (! dumm.hasChargedAtomType(ionName) ) { 00440 dumm.defineChargedAtomType( 00441 dumm.getNextUnusedChargedAtomTypeIndex(), 00442 ionName, 00443 dumm.getAtomClassIndex(ionName), 00444 2.00 00445 ); 00446 } 00447 00448 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Zinc Ion", "Zn+2").getIndex() ); 00449 } 00450 }; 00451 00453 class ChlorideIon : public Molecule { 00454 public: 00455 ChlorideIon() 00456 { 00457 instantiateBiotypes(); 00458 00459 setPdbResidueName("CL "); 00460 00461 setBaseAtom( "Cl-", Biotype::get("Chloride Ion", "Cl-") ); 00462 00463 setCompoundName("Chloride Ion"); 00464 } 00465 00466 static void instantiateBiotypes() { 00467 if (! Biotype::exists("Chloride Ion", "Cl-") ) 00468 Biotype::defineBiotype(Element::Chlorine(), 0, "Chloride Ion", "Cl-"); 00469 } 00470 00471 // create charged atom types 00472 // ensure that charges sum to zero, unless molecule has a formal charge 00473 static void setAmberLikeParameters(DuMMForceFieldSubsystem& dumm) 00474 { 00475 instantiateBiotypes(); 00476 00477 const char* ionName = "Cl- Chloride Ion"; 00478 00479 if (! dumm.hasAtomClass(ionName) ) { 00480 dumm.defineAtomClass_KA( 00481 dumm.getNextUnusedAtomClassIndex(), 00482 ionName, 00483 Element::Chlorine().getAtomicNumber(), 00484 0, // no covalent bonds 00485 2.4700, // radius 00486 0.1000 // well depth 00487 ); 00488 } 00489 00490 if (! dumm.hasChargedAtomType(ionName) ) { 00491 dumm.defineChargedAtomType( 00492 dumm.getNextUnusedChargedAtomTypeIndex(), 00493 ionName, 00494 dumm.getAtomClassIndex(ionName), 00495 -1.00 00496 ); 00497 } 00498 00499 dumm.setBiotypeChargedAtomType( dumm.getChargedAtomTypeIndex(ionName), Biotype::get("Chloride Ion", "Cl-").getIndex() ); 00500 } 00501 }; 00502 00503 } // namespace SimTK 00504 00505 #endif // SimTK_MOLMODEL_IONS_H_