-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpotential.cpp
101 lines (82 loc) · 1.89 KB
/
potential.cpp
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include "potential.h"
potential::potential(string n1, string n2, string uni, string f):name1(n1),name2(n2),units(uni),file(f)
{
visited=false;
id1=-1;
id2=-1;
if(units=="ev")
{
energyFactor=23.0609;
// energyFactor=3.82929389*6.0221415;
}else if (units=="kj")
{
energyFactor=1/4.1840;
}else if(units=="kcal")
{
energyFactor=1;
}else if (units=="K")
{
energyFactor=(8.314/4184);
}
if(uni.substr(0,3)=="lj/"|| uni.substr(0,5)=="buck/")
{
prefix="pair_coeff";
style=units;
}
}
potential::potential(string n1, string n2, string st, string uni,string disUni, string f):name1(n1),name2(n2),style(st),units(uni),disUnits(disUni),file(f)
{
visited=false;
id1=-1;
id2=-1;
prefix="pair_coeff";
if(units=="ev")
{
energyFactor=23.0609;
//energyFactor=3.82929389*6.0221415;
}else if (units=="kj")
{
energyFactor=1/4.1840;
}else if(units=="kcal")
{
energyFactor=1;
}else if (units=="K")
{
energyFactor=(8.314/4184);
}
if (disUnits=="A")
{
distanceFactor=1;
}else if (disUnits=="nm")
{
distanceFactor=10;
}else if(disUnits=="Rm")
{
double r=1.0/6.0;
distanceFactor=1.0/pow(2,r);
//cout <<distanceFactor<<" "<<r<<endl;
}else if (disUnits=="AB")
{
distanceFactor=1;
}
}
potential::potential(int i1,int i2,string n1,string n2,bool ii): id1(i1),id2(i2),name1(n1),name2(n2)
{
visited=false;
if (ii)
{
style="";
}else
{
}
prefix="pair_coeff";
file="MISSING!";
}
potential::potential(int i1, int i2, string n1, string n2, string uni, string f):id1(i1),id2(i2),name1(n1),name2(n2),units(uni),file(f)
{
visited=false;
prefix="pair_coeff";
}
/*potential::potential(int i1, int i2):id1(i1),id1(i2)
{
}*/