00001 #include "molmodel/internal/common.h"
00002 #include "molmodel/internal/Compound.h"
00003 #include <iostream>
00004 #include <fstream>
00005
00006
00007
00008
00009
00010 namespace SimTK
00011 {
00012
00013
00014
00015
00016 class Water : public Compound { public:
00017 Water(TinkerDuMMForceFieldSubsystem &dumm)
00018 {
00019
00020
00021 if (!dumm.hasAtomClass(DuMM::AtomClassIndex(400)))
00022 {
00023
00024 dumm.defineAtomClass_KA(
00025 DuMM::AtomClassIndex(400),
00026 "TIP3P Hydrogen" ,
00027 1 ,
00028 1,
00029 .0001 ,
00030 (.0000)
00031 );
00032 }
00033 if (! dumm.hasChargedAtomType(DuMM::ChargedAtomTypeIndex(8000)))
00034 {
00035 dumm.defineChargedAtomType(
00036 DuMM::ChargedAtomTypeIndex(8000),
00037 "TIP3P Hydrogen" ,
00038 DuMM::AtomClassIndex(400),
00039 .417
00040 );
00041 }
00042
00043 if (! Biotype::exists("TIP3P" ,"Hydrogen" ))
00044 Biotype::defineBiotype(Element::Hydrogen(), 1, "TIP3P", "Hydrogen" );
00045
00046 dumm.setBiotypeChargedAtomType( DuMM::ChargedAtomTypeIndex(8000), Biotype::get("TIP3P", "Hydrogen" ).getIndex() );
00047 if (!dumm.hasAtomClass(DuMM::AtomClassIndex(300)))
00048 {
00049 dumm.defineAtomClass_KA(
00050 DuMM::AtomClassIndex(300),
00051 "TIP3P Oxygen" ,
00052 16,
00053 2,
00054 1.7683,
00055 (.1520)
00056 );
00057 }
00058 if (!dumm.hasChargedAtomType(DuMM::ChargedAtomTypeIndex(7000)))
00059 {
00060 dumm.defineChargedAtomType(
00061 DuMM::ChargedAtomTypeIndex(7000),
00062 "TIP3P Oxygen" ,
00063 DuMM::AtomClassIndex(300),
00064 -.834
00065 );
00066 }
00067 if (! Biotype::exists("TIP3P" ,"Oxygen" ))
00068 Biotype::defineBiotype(Element::Oxygen(), 2, "TIP3P" , "Oxygen" );
00069
00070 dumm.setBiotypeChargedAtomType( DuMM::ChargedAtomTypeIndex(7000), Biotype::get("TIP3P" , "Oxygen" ).getIndex() );
00071
00072
00073
00074 setBaseAtom (BivalentAtom("OW",Element::Oxygen()),Vec3(0));
00075 bondAtom ( UnivalentAtom("HW0",Element::Hydrogen()),"OW/bond1",(.09572));
00076 bondAtom ( UnivalentAtom("HW1",Element::Hydrogen()),"OW/bond2",(.09572));
00077 setDefaultBondAngle((104.52*Deg2Rad),"HW0","OW","HW1");
00078
00079 setBiotypeIndex( "OW", Biotype::get("TIP3P" ,"Oxygen").getIndex() );
00080 setBiotypeIndex("HW0", Biotype::get("TIP3P" ,"Hydrogen").getIndex() );
00081 setBiotypeIndex("HW1", Biotype::get("TIP3P" ,"Hydrogen").getIndex() );
00082 }
00083 };
00084
00085
00086 }