-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse.f
More file actions
223 lines (192 loc) · 7.48 KB
/
Copy pathparse.f
File metadata and controls
223 lines (192 loc) · 7.48 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
subroutine parse(line,value,error)
include "common.f"
character*256 line,value
logical error
error=.false.
c +-----------------------------------+
c | Parameters for EDIP two-body term |
c +-----------------------------------+
if (index(line,'aa=').eq.1) then
read(value,*,err=100) aa
elseif (index(line,'bb=').eq.1) then
read(value,*,err=100) bb
elseif (index(line,'beta=').eq.1) then
read(value,*,err=100) beta
elseif (index(line,'sigma=').eq.1) then
read(value,*,err=100) sigma
elseif (index(line,'a1=').eq.1) then
read(value,*,err=100) a1
elseif (index(line,'a2=').eq.1) then
read(value,*,err=100) a2
c +-------------------------------------+
c | Parameters for EDIP three-body term |
c +-------------------------------------+
elseif (index(line,'gamma=').eq.1) then
read(value,*,err=100) gamma
elseif (index(line,'qq=').eq.1) then
read(value,*,err=100) qq
elseif (index(line,'xlam=').eq.1) then
read(value,*,err=100) xlam
c elseif (index(line,'pilam=').eq.1) then
c read(value,*,err=100) pilam
elseif (index(line,'xmu=').eq.1) then
read(value,*,err=100) xmu
c +-----------------------------------------+
c | Parameters for generalised coordination |
c +-----------------------------------------+
elseif (index(line,'zrep=').eq.1) then
read(value,*,err=100) zrep
elseif (index(line,'zrep2=').eq.1) then
read(value,*,err=100) zrep2
elseif (index(line,'zdih=').eq.1) then
read(value,*,err=100) zdih
elseif (index(line,'c0=').eq.1) then
read(value,*,err=100) c0
c +------------------------------------------------+
c | Parameters for cutoff functions f(r) and zz(r) |
c +------------------------------------------------+
elseif (index(line,'zlow=').eq.1) then
read(value,*,err=100) zlow
elseif (index(line,'zhigh=').eq.1) then
read(value,*,err=100) zhigh
elseif (index(line,'zalpha=').eq.1) then
read(value,*,err=100) zalpha
elseif (index(line,'flow=').eq.1) then
read(value,*,err=100) flow
elseif (index(line,'fhigh=').eq.1) then
read(value,*,err=100) fhigh
elseif (index(line,'falpha=').eq.1) then
read(value,*,err=100) falpha
elseif (index(line,'bondcutoff=').eq.1) then
read(value,*,err=100) bondcutoff
c +-----------------------------------------------------+
c | These control values are stored in single variables |
c +-----------------------------------------------------+
elseif (index(line,'ntakof=').eq.1) then
read(value,*,err=100) ntakof
elseif (index(line,'nprint=').eq.1) then
read(value,*,err=100) nprint
elseif (index(line,'nsnap=').eq.1) then
read(value,*,err=100) nsnap
elseif (index(line,'computeshear').eq.1) then
computeshear=.true.
elseif (index(line,'shear=').eq.1) then
read(value,*,err=100) shear
elseif (index(line,'nolinear').eq.1) then
nolinear=.true.
elseif (index(line,'nodihedral').eq.1) then
nodihedral=.true.
elseif (index(line,'norepulsion').eq.1) then
norepulsion=.true.
elseif (index(line,'calcstress').eq.1) then
calcstress=.true.
elseif (index(line,'smin=').eq.1) then
read(value,*,err=100) smin
elseif (index(line,'smax=').eq.1) then
read(value,*,err=100) smax
elseif (index(line,'cyclo=').eq.1) then
read(value,*,err=100) cyclo
elseif (index(line,'nslab=').eq.1) then
read(value,*,err=100) nslab
elseif (index(line,'nswap=').eq.1) then
read(value,*,err=100) nswap
elseif (index(line,'ifix=').eq.1) then
read(value,*,err=100) ifix
elseif (index(line,'newgcutoff').eq.1) then
newgcutoff=.true.
elseif (index(line,'usedihedral2').eq.1) then
usedihedral2=.true.
elseif (index(line,'usedihedral4').eq.1) then
usedihedral4=.true.
elseif (index(line,'norings').eq.1) then
norings=.true.
elseif (index(line,'static').eq.1) then
static=.true.
elseif (index(line,'steepestdescent').eq.1) then
steepestdescent=.true.
elseif (index(line,'velocityverlet').eq.1) then
velocityverlet=.true.
elseif (index(line,'xbspbc').eq.1) then
xbspbc=.true.
elseif (index(line,'cellneighbour').eq.1) then
cellneighbour=.true.
elseif (index(line,'avas').eq.1) then
avas=.true.
elseif (index(line,'vmd').eq.1) then
vmd=.true.
elseif (index(line,'ovito').eq.1) then
ovito=.true.
elseif (index(line,'zbl').eq.1) then
zbl=.true.
elseif (index(line,'variablestep').eq.1) then
variablestep=.true.
elseif (index(line,'mass').eq.1) then
mass=.true.
elseif (index(line,'slabconstrain').eq.1) then
slabconstrain=.true.
elseif (index(line,'sphereconstrain').eq.1) then
sphereconstrain=.true.
elseif (index(line,'sphereradius=').eq.1) then
read(value,*,err=100) sphereradius
elseif (index(line,'timemax=').eq.1) then
read(value,*,err=100) timemax
elseif (index(line,'temp_start=').eq.1) then
read(value,*,err=100) temp_start
elseif (index(line,'random=').eq.1) then
read(value,*,err=100) nrandom
elseif (index(line,'special=').eq.1) then
special=.true.
namespecial=value
c +-------------------------------+
c | Cylindrical exclusion regions |
c +-------------------------------+
elseif (index(line,'cylinder=').eq.1) then
numcylinder=numcylinder+1
read(value,*,err=100) (cylinder(numcylinder,ind),ind=1,3)
c +-------------------------+
c | Primary knock-on events |
c +-------------------------+
elseif (index(line,'PKAatom=').eq.1) then
read(value,*,err=100) ipka
elseif (index(line,'PKAenergy=').eq.1) then
read(value,*,err=100) epka
elseif (index(line,'PKAdirection=').eq.1) then
read(value,*,err=100) (xpka(ind),ind=1,3)
elseif (index(line,'xebox=').eq.1) then
read(value,*,err=100) xebox
elseif (index(line,'xepka').eq.1) then
xepka=.true.
elseif (index(line,'c60pka').eq.1) then
c60pka=.true.
c +---------------------------------------------+
c | The token `run' indexes the array variables |
c +---------------------------------------------+
elseif (index(line,'run').eq.1) then
npass=npass+1
do i=1,NVAR
varlist(npass,i)=varlist(npass-1,i)
end do
c +---------------------------------------------+
c | These control values are stored in an array |
c +---------------------------------------------+
elseif (index(line,'h=').eq.1) then
read(value,*,err=100) varlist(npass,1)
elseif (index(line,'nstep=').eq.1) then
read(value,*,err=100) varlist(npass,2)
elseif (index(line,'temp=').eq.1) then
read(value,*,err=100) varlist(npass,3)
elseif (index(line,'therm=').eq.1) then
read(value,*,err=100) varlist(npass,4)
elseif (index(line,'gr=').eq.1) then
read(value,*,err=100) varlist(npass,5)
elseif (index(line,'msd=').eq.1) then
read(value,*,err=100) varlist(npass,6)
c +------------------------------+
c | If no match we have an error |
c +------------------------------+
elseif (line(1:1).ne.';') then
error=.true.
end if
return
100 error=.true.
end