File: Water.h

package info (click to toggle)
macromoleculebuilder 4.2%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 119,404 kB
  • sloc: cpp: 23,722; python: 5,098; ansic: 2,101; awk: 145; perl: 144; makefile: 40; sh: 38
file content (84 lines) | stat: -rw-r--r-- 2,817 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include "SimTKmolmodel.h"
#include <iostream>
#include <fstream>




namespace SimTK 
{




class Water : public Compound { public:
        Water(DuMMForceFieldSubsystem &dumm)
        {   
 

     if (!dumm.hasAtomClass(DuMM::AtomClassIndex(400)))
     {	

     	dumm.defineAtomClass_KA(
         	DuMM::AtomClassIndex(400),
         	"TIP3P Hydrogen"    ,
         	1 , //element number
         	1, //expected valence
         	.0001 ,//from vdw parms
         	(.0000)
         	);
     }	
     if (! dumm.hasChargedAtomType(DuMM::ChargedAtomTypeIndex(8000)))
     {	
     	dumm.defineChargedAtomType(
         	DuMM::ChargedAtomTypeIndex(8000),
         	"TIP3P Hydrogen"    ,
         	DuMM::AtomClassIndex(400),
         	.417                   //partial charge
         	);
     }
	
     if (! Biotype::exists("TIP3P"   ,"Hydrogen" ))
         Biotype::defineBiotype(Element::getBySymbol("H"), 1, "TIP3P",   "Hydrogen"  ); // second arg is valence
                                                                                 // a residue name, second is an atom name
     dumm.setBiotypeChargedAtomType( DuMM::ChargedAtomTypeIndex(8000), Biotype::get("TIP3P", "Hydrogen"     ).getIndex() );
     if (!dumm.hasAtomClass(DuMM::AtomClassIndex(300)))
     {	
     	dumm.defineAtomClass_KA(
         	DuMM::AtomClassIndex(300),
         	"TIP3P Oxygen"      ,
         	16, //element number
         	2, //expected valence
         	1.7683,//from vdw parms
         	(.1520)
         	);
     }
     if (!dumm.hasChargedAtomType(DuMM::ChargedAtomTypeIndex(7000)))
     {			
     	dumm.defineChargedAtomType(
         	DuMM::ChargedAtomTypeIndex(7000),
         	"TIP3P Oxygen"      ,//magnesium",
         	DuMM::AtomClassIndex(300),
         	-.834                  //partial charge
         	);
     }
     if (! Biotype::exists("TIP3P"   ,"Oxygen"   ))
         Biotype::defineBiotype(Element::getBySymbol("O"), 2, "TIP3P"   ,  "Oxygen"  ); // second arg is valence
                                                                                 // a residue name, second is an atom name
     dumm.setBiotypeChargedAtomType( DuMM::ChargedAtomTypeIndex(7000), Biotype::get("TIP3P" , "Oxygen"     ).getIndex() );
 

   
        setBaseAtom    (BivalentAtom("OW",Element::getBySymbol("O")),Vec3(0));
        bondAtom    ( UnivalentAtom("HW0",Element::getBySymbol("H")),"OW/bond1",(.09572));
        bondAtom    ( UnivalentAtom("HW1",Element::getBySymbol("H")),"OW/bond2",(.09572));
        setDefaultBondAngle((104.52*Deg2Rad),"HW0","OW","HW1");

        setBiotypeIndex( "OW", Biotype::get("TIP3P"   ,"Oxygen").getIndex() );
        setBiotypeIndex("HW0", Biotype::get("TIP3P"   ,"Hydrogen").getIndex() );
        setBiotypeIndex("HW1", Biotype::get("TIP3P"   ,"Hydrogen").getIndex() );
        }   
};


}