Skip to content

Commit d13e3d8

Browse files
committed
Implementing proposed changes
1 parent 978e3fd commit d13e3d8

12 files changed

Lines changed: 32 additions & 33 deletions

File tree

sample_inputs/input.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ nwritef=0, ! how often we print forces?
3131
/
3232

3333
! Thermostat options
34-
&nhcopt
34+
&thermostat
3535
temp=298.15, ! temperature [K] for Maxwell-Boltzmann sampling and thermostat
36-
inose=0, ! Thermostating: Nose-Hoover 1, microcanonical 0,GLE 2, Langevin 3
36+
therm='none', ! Thermostating: Nose-Hoover 1, microcanonical 0,GLE 2, Langevin 3
3737
nchain=4, ! number of nose-hoover chains
3838
tau0=0.0015, ! relaxation time of NHC thermostat
3939
/

sample_inputs/input.in.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ nwritev=0, ! how often we print velocities? (by default ABIN does not print vel
1818
/
1919

2020

21-
&nhcopt
21+
&thermostat
2222
temp=298.15, ! temperature [K] for Maxwell-Boltzmann sampling and thermostat
23-
inose=1, ! Thermostat options:
23+
therm='nhc', ! Thermostat options:
2424
! 0 = NVE( microcanonical)
2525
! 1 = Nose-Hoover
2626
! 2 = Generalized Langevin Equation (GLE)

sample_inputs/input.in.pigle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ nrest=5, ! how often we print restart files?
1717
nwritev=0, ! how often we print velocities?
1818
/
1919

20-
&nhcopt
20+
&thermostat
2121
temp=298.15, ! temperature (Kelvins) for initial Maxwell-Boltzmann sampling of velocities
2222
! WARNING: The actual temperature of the simulation is determined via the GLE parameters!
23-
inose=2, ! GLE thermostat for QT or PI+GLE, needs additional parameters in "GLE-A" and "GLE-C" files
23+
therm='gle', ! GLE thermostat for QT or PI+GLE, needs additional parameters in "GLE-A" and "GLE-C" files
2424
/

sample_inputs/input.in.pimd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ nwritex=5, ! how often should we print coordinates?
1616
nrest=5, ! how often we print restart files?
1717
/
1818

19-
&nhcopt
19+
&thermostat
2020
temp=298.15, ! temperature [K] for Maxwell-Boltzmann sampling and thermostat
21-
inose=1, ! NHC thermostat
21+
therm='nhc', ! NHC thermostat
2222
tau0=0.001, ! thermostat relaxation time (in picoseconds)
2323
/

sample_inputs/input.in.qt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ nrest=5, ! how often to print restart files?
2121
nwritev=0, ! how often to print velocities?
2222
/
2323

24-
&nhcopt
24+
&thermostat
2525
temp=298.15, ! temperature (Kelvins) for initial Maxwell-Boltzmann sampling of velocities
2626
! WARNING: The actual temperature of the simulation is determined via the GLE parameters!
27-
inose=2, ! GLE thermostat for QT or PI+GLE, needs additional parameters in "GLE-A" and "GLE-C" files
27+
therm='gle', ! GLE thermostam for QT or PI+GLE, needs additional parameters in "GLE-A" and "GLE-C" files
2828
/

sample_inputs/input.in.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ nrest=1, ! how often to print restart files?
1414
nwritev=0, ! how often to print velocities?
1515
/
1616

17-
&nhcopt
18-
inose=0, ! NVE ensemble (thermostat turned OFF)
17+
&thermostat
18+
therm='none', ! NVE ensemble (thermostat turned OFF)
1919
!temp=0.00, ! Usually, you would read initial velocities from previous ground state sampling (-v option)
2020
/
2121

sample_inputs/input.in.shake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ ishake1=1,1,4,4,8,8,11,11, ! list of bond constraints
1919
ishake2=2,3,5,6,9,10,12,13,
2020
/
2121

22-
&nhcopt
22+
&thermostat
2323
nmolt=53, ! number of separate systems(partitions) to couple NHC thermostat
2424
natmolt=53*3 ! number of atoms in each partition
2525
nshakemol=2,2,0,2,2,3*0, ! number of constraints in each partition
2626
imasst=0, ! DO NOT use massive thermostat when using SHAKE
27-
inose=1, ! Only global Nose-Hoover is available for SHAKE
27+
therm='nhc', ! Only global Nose-Hoover is available for SHAKE
2828
temp=298.15, ! initial temperature for Maxwell-Boltzmann sampling [au]
2929
tau0=0.001
30-
/
30+

src/init.F90

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ subroutine init(dt)
104104
character(len=20) :: xyz_units
105105
character(len=60) :: chdivider
106106
character(len=60) :: mdtype
107-
character(len=60) :: itherm
107+
character(len=60) :: therm
108108
character(len=1024) :: tc_server_name, tcpb_input_file, tcpb_host
109109
integer :: tcpb_port
110110
logical :: file_exists
@@ -135,11 +135,11 @@ subroutine init(dt)
135135
namelist /remd/ nswap, nreplica, deltaT, Tmax, temp_list
136136

137137
! new namelist section for thermostat, previously nhcopt
138-
namelist /thermostat/ inose, itherm, temp, temp0, nchain, tau0, tau0_langevin, imasst, nrespnose, nyosh, &
138+
namelist /thermostat/ inose, therm, temp, temp0, nchain, tau0, tau0_langevin, imasst, nrespnose, nyosh, &
139139
scaleveloc, readNHC, nmolt, natmolt, nshakemol, rem_comrot, rem_comvel, gle_test
140140

141141
! old namelist section for thermostat, kept for backwards compatibility
142-
namelist /nhcopt/ inose, temp, temp0, nchain, tau0, tau0_langevin, imasst, nrespnose, nyosh, &
142+
namelist /nhcopt/ inose, therm, temp, temp0, nchain, tau0, tau0_langevin, imasst, nrespnose, nyosh, &
143143
scaleveloc, readNHC, nmolt, natmolt, nshakemol, rem_comrot, rem_comvel, gle_test
144144

145145
namelist /system/ masses, massnames, ndist, dist1, dist2, &
@@ -158,7 +158,7 @@ subroutine init(dt)
158158
tcpb_input_file = ''
159159
tcpb_port = -1
160160
mdtype = ''
161-
itherm = ''
161+
therm = ''
162162
dt = -1
163163
nproc = 1
164164
iplumed = 0
@@ -409,14 +409,13 @@ subroutine init(dt)
409409
call initialize_tcpb(natqm, atnames, tcpb_port, tcpb_host, tcpb_input_file)
410410
end if
411411

412-
! first check if 'itherm' keyword was used and then transfer to inose
413-
write (stdout, *) 'itherm = ', itherm
414-
if (itherm /= '') then
415-
itherm = tolower(itherm)
416-
select case (itherm)
412+
! first check if 'therm' keyword was used and then transfer to inose
413+
if (therm /= '') then
414+
therm = tolower(therm)
415+
select case (therm)
417416
case ('none')
418417
inose = 0
419-
case ('nh')
418+
case ('nhc')
420419
inose = 1
421420
case ('gle')
422421
inose = 2

tests/DOUBLEWELL/input.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ nwritef=1,
1515
idebug=1,
1616
/
1717

18-
&thermostat !&nhcopt
19-
itherm='none', !inose=0,
18+
&thermostat
19+
therm='none',
2020
temp=298.15,
2121
/
2222

tests/LANGEVIN/input.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ nwritev=1,
1414
nwritef=1,
1515
/
1616

17-
&thermostat !&nhcopt
18-
itherm='langevine', !inose=3,
17+
&thermostat
18+
therm='langevine',
1919
temp=300.0
2020
tau0_langevin=0.001
2121
/

0 commit comments

Comments
 (0)