forked from TinkerTools/tinker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtorphase.f
58 lines (58 loc) · 1.56 KB
/
torphase.f
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
c
c
c ###################################################
c ## COPYRIGHT (C) 1991 by Jay William Ponder ##
c ## All Rights Reserved ##
c ###################################################
c
c ##############################################################
c ## ##
c ## subroutine torphase -- torsional amplitude and phase ##
c ## ##
c ##############################################################
c
c
c "torphase" sets the n-fold amplitude and phase values
c for each torsion via sorting of the input parameters
c
c
subroutine torphase (ft,vt,st)
implicit none
integer i,k
integer ft(*)
real*8 ampli(6)
real*8 phase(6)
real*8 vt(*),st(*)
c
c
c copy the input fold, amplitude and phase angles
c
do i = 1, 6
ampli(i) = vt(i)
phase(i) = st(i)
vt(i) = 0.0d0
st(i) = 0.0d0
end do
c
c shift the phase angles into the standard range
c
do i = 1, 6
do while (phase(i) .lt. -180.0d0)
phase(i) = phase(i) + 360.0d0
end do
do while (phase(i) .gt. 180.0d0)
phase(i) = phase(i) - 360.0d0
end do
end do
c
c convert input torsional parameters to storage format
c
do i = 1, 6
k = ft(i)
if (k.ge.1 .and. k.le.6) then
vt(k) = ampli(i)
st(k) = phase(i)
end if
end do
return
end