Skip to content

Commit fe46cf0

Browse files
committed
add POLEDIT option to test with zero multipole values
1 parent cdb17f6 commit fe46cf0

File tree

1 file changed

+56
-4
lines changed

1 file changed

+56
-4
lines changed

source/poledit.f

Lines changed: 56 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ program poledit
3030
c get the desired type of coordinate file modification
3131
c
3232
call initial
33-
nmode = 4
33+
nmode = 5
3434
mode = 0
3535
query = .true.
3636
call nextarg (string,exist)
@@ -44,8 +44,9 @@ program poledit
4444
20 format (/,' The Tinker Multipole Editing Utility Can :',
4545
& //,4x,'(1) Use Multipoles from Stone GDMA Output',
4646
& /,4x,'(2) Use Multipoles from Multiwfn MBIS Output',
47-
& /,4x,'(3) Alter Local Coordinate Frame Definitions',
48-
& /,4x,'(4) Remove the Intramolecular Polarization')
47+
& /,4x,'(3) Create Output with Zero Multipole Values',
48+
& /,4x,'(4) Alter Local Coordinate Frame Definitions',
49+
& /,4x,'(5) Remove the Intramolecular Polarization')
4950
do while (mode.lt.1 .or. mode.gt.nmode)
5051
mode = 0
5152
write (iout,30)
@@ -88,6 +89,23 @@ program poledit
8889
call avgpole
8990
call prtpole
9091
else if (mode .eq. 3) then
92+
use_mpole = .true.
93+
use_polar = .true.
94+
call getxyz
95+
call attach
96+
call field
97+
call katom
98+
call kmpole
99+
call initpole
100+
call molsetup
101+
call setframe
102+
call rotframe
103+
call setpolar
104+
call setpgrp
105+
call alterpol
106+
call avgpole
107+
call prtpole
108+
else if (mode .eq. 4) then
91109
call getxyz
92110
call attach
93111
call field
@@ -97,7 +115,7 @@ program poledit
97115
call kchgtrn
98116
call fixframe
99117
call prtpole
100-
else if (mode .eq. 4) then
118+
else if (mode .eq. 5) then
101119
call getxyz
102120
call attach
103121
call field
@@ -112,6 +130,40 @@ program poledit
112130
end
113131
c
114132
c
133+
c ################################################################
134+
c ## ##
135+
c ## subroutine initpole -- initialize multipole parameters ##
136+
c ## ##
137+
c ################################################################
138+
c
139+
c
140+
c "initpole" sets all atomic multipole parameter values to an
141+
c initial value of zero
142+
c
143+
c
144+
subroutine initpole
145+
use atoms
146+
use mpole
147+
integer i
148+
c
149+
c
150+
c zero out atomic multipole parameter values
151+
c
152+
do i = 1, n
153+
ipole(i) = 0
154+
zaxis(i) = 0
155+
xaxis(i) = 0
156+
yaxis(i) = 0
157+
do j = 1, 13
158+
pole(j,i) = 0.0d0
159+
rpole(j,i) = 0.0d0
160+
end do
161+
polaxe(i) = ' '
162+
end do
163+
return
164+
end
165+
c
166+
c
115167
c ##############################################################
116168
c ## ##
117169
c ## subroutine molsetup -- set molecule for polarization ##

0 commit comments

Comments
 (0)