Skip to content

Commit 2a11608

Browse files
authored
Version 5.2.1 (#56)
* deleted simmd keywords * Fixed Bug for Temprun mode
1 parent 6d88c06 commit 2a11608

File tree

5 files changed

+28
-61
lines changed

5 files changed

+28
-61
lines changed

src/info.f90

+2-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ subroutine start_info
6666
end subroutine start_info
6767

6868

69-
subroutine info_main(ntraj, tstep, tmax, simMD, Tinit, trelax, eimp0, mchrg, &
69+
subroutine info_main(ntraj, tstep, tmax, Tinit, trelax, eimp0, mchrg, &
7070
mchrg_prod, ieeatm, iee_a, iee_b, btf, fimp, hacc, ELAB, ECOM, MaxColl, &
7171
CollNo, CollSec, ESI, tempESI, eTempin, maxsec, betemp, nfragexit, &
7272
iprog, edistri, legacy)
@@ -80,7 +80,7 @@ subroutine info_main(ntraj, tstep, tmax, simMD, Tinit, trelax, eimp0, mchrg, &
8080
integer :: dumprint
8181
integer :: iprog
8282
integer :: edistri
83-
integer :: i, simMD
83+
integer :: i
8484

8585
real(wp) :: tstep,tmax,etempin,betemp
8686
real(wp) :: Tinit,trelax
@@ -170,7 +170,6 @@ subroutine info_main(ntraj, tstep, tmax, simMD, Tinit, trelax, eimp0, mchrg, &
170170
write(*,'('' total traj. (ntraj) : '',i4 )')ntraj
171171
write(*,'('' time steps (tstep) : '',f7.2,'' fs'')')tstep
172172
!if ( method == 1 ) write(*,'('' max. sim. time (tmax) : '',f7.2,'' ps'')')tmax/1000.0_wp
173-
!if ( method == 3 ) write(*,'('' MFP sim. time (simmd) : '',f7.2,'' ps'')')simmd/1000.0_wp
174173
write(*,'('' sim. time / MD (tmax) : '',f7.2,'' ps'')')tmax/1000.0_wp
175174
write(*,'('' Initial temp. (tinit) : '',f7.2,'' K'')')Tinit
176175

src/input.f90

+11-13
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
2020
edistri,btf,ieeatm, &
2121
scanI,lowerbound,upperbound,ELAB,ECOM, eExact,ECP,unity,noecp, &
2222
nometal,vScale,CollNo,CollSec,ConstVelo, &
23-
minmass,manual_simMD,convetemp, coll, &
23+
minmass,etempGS, coll, &
2424
MinPot,ESI,tempESI,No_ESI,NoScale,manual_dist, legacy)
2525
! use gbobc, only: lgbsa
2626

@@ -49,6 +49,7 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
4949
real(wp) :: xx(10),axi
5050
real(wp) :: lowerbound
5151
real(wp) :: upperbound
52+
real(wp) :: eTempGS
5253

5354

5455
! interface
@@ -75,8 +76,6 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
7576
integer :: CollNo(3)
7677
integer :: CollSec(3)
7778
integer :: minmass
78-
integer :: manual_simMD
79-
integer :: convetemp
8079
!integer :: set_coll
8180
integer :: manual_dist
8281

@@ -139,6 +138,8 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
139138
Tinit = 500
140139
!> switch on etemp
141140
No_eTemp = .false.
141+
! GS Etemp (to converge radicals etc)
142+
etempGS=298.15 ! normal
142143

143144
!!! !!!!
144145
!!! QC Settings !!!!
@@ -266,7 +267,6 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
266267
! Extra settings
267268
eExact = .False. ! switch off ELAB velocity scaling (exact velocities)
268269
minmass = 45 ! set resolution (lower masses are cut)
269-
manual_simMD = 0 ! set Mean-free-path steps manually
270270
No_ESI = .false. ! Don't do pre-scaling of int. Energy (if true)
271271
NoScale = .false. ! no distributing ESI energy (if true)
272272
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -277,7 +277,6 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
277277
ConstVelo = .False. ! scale to const. velo after collision
278278
MinPot = 0 ! velocity scaling as well
279279
vScale = 0.00 ! velocity scaling as well
280-
convetemp = 0 ! convergence temp for strange GS
281280

282281

283282
!--------------------------------------------------------------
@@ -595,6 +594,11 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
595594
call readl(line,xx,nn)
596595
Tinit=xx(1)
597596
endif
597+
! GS eTEMP
598+
if(index(line,'ETEMP') /= 0)then
599+
call readl(line,xx,nn)
600+
Tinit=xx(1)
601+
endif
598602
! NUMBER OF TRAJ.
599603
if(index(line,'NTRAJ') /= 0)then
600604
call readl(line,xx,nn)
@@ -649,9 +653,9 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
649653
if(nn.gt.0) etemp_in=xx(1)
650654
endif
651655
! set etemp in equilibration MD
652-
if(index(line,'CONVETEMP') /= 0)then
656+
if(index(line,'ETEMPGS') /= 0)then
653657
call readl(line,xx,nn)
654-
convetemp=xx(1)
658+
etempGS=xx(1)
655659
endif
656660

657661
! set grid for TMOL (not yet implemnted)
@@ -836,12 +840,6 @@ subroutine input(tstep,tmax,ntraj,etemp_in,Tinit, mchrg_prod, &
836840
minmass=xx(1)
837841
endif
838842

839-
! set mean-free-path way (in fs; care timestep)
840-
if(index(line,'SIMMD') /= 0)then
841-
call readl(line,xx,nn)
842-
manual_simMD=xx(1)
843-
endif
844-
845843
! set number of steps until collision (circa)
846844
if(index(line,'DIST') /= 0)then
847845
call readl(line,xx,nn)

src/main.F90

+9-39
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ program QCxMS
7171
integer :: collisions
7272
integer :: minmass,numb
7373
integer :: frag_counter,new_counter,save_counter
74-
integer :: simMD, manual_simMD
7574
integer :: rand_int,dep,convetemp
7675
integer :: manual_dist
7776
integer :: arg_list
@@ -228,11 +227,6 @@ program QCxMS
228227
dumpstep=4
229228
! counts the number of QC calls
230229
calls=0
231-
! GS Etemp (to converge radicals etc)
232-
etempGS=298.15 ! normal ! Maybe make this input relevant
233-
convetemp=0
234-
! introduce simmd
235-
simMD = 8000 ! =8000 * 0.5 fs => 4 ps
236230
! set scaling temp to 0
237231
tscale = 0.0_wp
238232

@@ -268,7 +262,7 @@ program QCxMS
268262
& scani,lowerbound,upperbound, &
269263
& ELAB,ECOM,eExact,ECP,unity,noecp,nometal, &
270264
& vScale,CollNo,CollSec,ConstVelo, &
271-
& minmass,manual_simMD,convetemp,coll, &
265+
& minmass,etempGS,coll, &
272266
& MinPot,ESI,tempESI,No_ESI,NoScale,manual_dist,legacy)
273267
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
274268

@@ -398,11 +392,11 @@ program QCxMS
398392
tmax = tmax*1000.0_wp
399393
! # MD steps in a frag run
400394
nmax = tmax / tstep
401-
! for CID make dependend on atom size
402-
if(method == 3) then
403-
nmax = nuc * 100
404-
tmax = nmax * tstep
405-
endif
395+
!! for CID make dependend on atom size
396+
!if(method == 3) then
397+
! nmax = nuc * 100
398+
! tmax = nmax * tstep
399+
!endif
406400

407401
! timesteps in au
408402
tstep = tstep * fstoau
@@ -412,7 +406,7 @@ program QCxMS
412406

413407
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
414408
! printing runtype information and chosen parameters
415-
call info_main(ntraj, tstep/fstoau, tmax, simMD, Tinit, trelax, eimp0*autoev, mchrg, &
409+
call info_main(ntraj, tstep/fstoau, tmax, Tinit, trelax, eimp0*autoev, mchrg, &
416410
mchrg_prod, ieeatm, iee_a, iee_b, btf, fimp, hacc, ELAB, ECOM, coll%max_coll, &
417411
CollNo, CollSec, ESI, tempESI, etemp_in, maxsec, betemp, nfragexit, iprog, &
418412
edistri, legacy)
@@ -538,13 +532,8 @@ program QCxMS
538532
! initilize the velocities, distribute among the atoms
539533
call mdinitu(nuc,velo,mass,edum)
540534

541-
if(convetemp /= 0)then
542-
etempGS=convetemp
543-
write(*,*)
544-
write(*,*) 'Groundstate eTemp set to',etempGS
545-
endif
546-
547535
! init the QM code ! Here edum is total energy, not inner energy anymore!
536+
write(*,*) 'Groundstate eTemp set to',etempGS
548537
call iniqm(nuc,xyz,iat,mchrg,mspin,etempGS,edum,iniok,ECP)
549538

550539
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -1827,40 +1816,21 @@ program QCxMS
18271816
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18281817
!> reduce the simulation timings for performance
18291818

1830-
!> Check if the sim. MD time has been manually set
1831-
if ( method == 3 .and. manual_simMD > 0 ) simMD = manual_simMD
1832-
18331819
!> change MFP times to reduce timings (empirical values)
1834-
!> but only if not set manually
1835-
!if ( manual_simMD == 0 ) then
1836-
! simMD = icoll * 0.6 * nuc * 100
1837-
! if ( simMD > 6000 .and. frag_counter <= 2 ) simMD = 6000
1838-
!
1839-
! !>> make some timing adjustments
1840-
! if ( simMD > 6000 .and. frag_counter > 2 ) then
1841-
! simMD = 6000 * 0.75_wp
1842-
! elseif ( simMD > 6000 .and. frag_counter > 3 ) then
1843-
! simMD = 6000 * 0.6_wp
1844-
! elseif ( simMD > 6000 .and. frag_counter >= 4 ) then
1845-
! simMD = 6000 * 0.5_wp
1846-
! endif
1847-
1848-
18491820
nmax = nuc * 100
18501821

18511822
!> reduce the MD time if fragmentation in MFP occurs
18521823
!> even if manually set
18531824
if (isec == 3) nmax =int(nmax * 0.75_wp)
18541825
if (isec == 4) nmax =int(nmax * 0.6_wp )
18551826
if (isec >= 5) nmax =int(nmax * 0.5_wp )
1856-
!if ( fragstate == 2 ) simMD = simMD / 2
18571827

18581828
!>> not too short/long simulations
18591829
if ( nmax < 1000 ) nmax = 1000
18601830
if ( nmax > 10000 ) nmax = 10000
18611831

18621832
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1863-
!! Do Mean-free-path (MFP) MD with simMD timesteps
1833+
!! Do Mean-free-path (MFP) MD with nmax timesteps
18641834
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
18651835
call md(itrj,icoll,isec,nuc,nmax,xyz,iat,mass,imass,mchrg,grad,&
18661836
& velo,velof,list,tstep,j,nfragexit, &

src/md.f90

+2-2
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ subroutine md(it,icoll,isec,nuc,nmax,xyz,iat,mass,imass,mchrg,grad, &
493493
! Start counting to get average structure for IP calculation and the RMSD of
494494
! the counted structures
495495
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
496-
CID: if (method == 3) then
496+
CID: if (method == 3 .and. .not. Temprun) then
497497

498498
!> there was an idea to check the rmsd for large deviation, but it was not found usefull
499499
!root_msd=0
@@ -620,7 +620,7 @@ subroutine md(it,icoll,isec,nuc,nmax,xyz,iat,mass,imass,mchrg,grad, &
620620

621621
endif avct
622622

623-
elseif (method < 3) then ! if EI :
623+
elseif (method < 3 .or. Temprun) then ! if EI :
624624

625625
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
626626
! Check out the fragments. If > 2, do 1000 steps. If more, do 250 steps.

src/version.f90

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ subroutine version(i)
77
integer,intent(in) :: i
88
character(len=:), allocatable :: line
99

10-
line ='Jul 25 14:00:00 CEST 2022 '
10+
line ='Sep 20 18:00:00 CEST 2022 '
1111

1212
if (i.eq.0)then
13-
write(*,' (22x,''*'',18x,''V5.2.0'',18x,'' *'')' )
13+
write(*,' (22x,''*'',18x,''V5.2.1'',18x,'' *'')' )
1414
endif
1515
if (i.eq.1) write(*,' (22x,''* '',(a)'' *'')' ) line
16-
if (i.eq.2) write(*,' (22x,''--- QCxMS V5.2.0'',(a)'' ---'')') line
17-
if (i.eq.33) write(33,'(22x,''--- QCxMS V5.2.0'',(a)'' ---'')') line
16+
if (i.eq.2) write(*,' (22x,''--- QCxMS V5.2.1'',(a)'' ---'')') line
17+
if (i.eq.33) write(33,'(22x,''--- QCxMS V5.2.1'',(a)'' ---'')') line
1818

1919
end subroutine version
2020

0 commit comments

Comments
 (0)