New variables in MD simulation
tao liu
liut... at gmail.com
Wed May 27 09:46:49 UTC 2015
Dear All,
I am interested in introducing some new variables in MD simulation to
calculate the thermal conductivity of the material. Here is what I have
done, but it seems something is wrong when I tried to read in these new
variables
Could anyone tell me what's wrong please?
*in script 'input_cp2k_md.F'
SUBROUTINE create_md_section(section,error)
The following lines are added
logical :: TC
INTEGER :: TCNS
INTEGER :: TCFD
INTEGER :: TCXP
REAL(dp) :: TCSF
integer :: taow !output
taow=400
CALL keyword_create(keyword, name="TC",&
description="decide to run thermal conductivity calculation",&
usage="TC LOGICAL",default_l_val=.FALSE.,
lone_keyword_l_val=.TRUE., error=error)
CALL section_add_keyword(section,keyword,error=error)
CALL keyword_release(keyword,error=error)
CALL keyword_create(keyword,name="TCNS",&
description="number of discrete sections",usage="TCNS 16",&
default_i_val=16,error=error)
CALL section_add_keyword(section,keyword,error=error)
CALL keyword_release(keyword,error=error)
CALL keyword_create(keyword, name="TCFD",&
description=" flux direction",&
usage="TCFD 3", default_i_val=3,error=error)
CALL section_add_keyword(section,keyword,error=error)
CALL keyword_release(keyword,error=error)
CALL keyword_create(keyword, name="TCXP",&
description="exchange period (time-steps)",&
usage="TCXP 50", default_i_val=50,error=error)
CALL section_add_keyword(section,keyword,error=error)
CALL keyword_release(keyword,error=error)
CALL keyword_create(keyword, name="TCSF",&
description="start of first section (in fraction)",&
usage="TCSF 0.0", default_r_val=0.0_dp,error=error)
CALL section_add_keyword(section,keyword,error=error)
CALL keyword_release(keyword,error=error)
CALL
open_file(file_name='TCinput',file_status="UNKNOWN",file_action="WRITE",unit_number=taow)
WRITE (taow,*) 'TC ',TC
WRITE (taow,*) 'TCNS ',TCNS
WRITE (taow,*) 'TCFD ',TCFD
WRITE (taow,*) 'TCXP ',TCXP
WRITE (taow,*) 'TCSF ',TCSF
CALL close_file(unit_number=taow)
*CP2K input file
&MOTION
&MD
ENSEMBLE NVT
STEPS 1
TIMESTEP 1
TEMPERATURE 300.0
&THERMOSTAT
&NOSE
LENGTH 3
YOSHIDA 3
TIMECON 100.0
MTS 2
&END NOSE
&END
TC .TRUE.
TCNS 16
TCFD 3
TCXP 1
TCSF 0.0
&END MD
&END MOTION
In the new file 'TCinput', I expect the same values as in the input file,
but it shows that
TC T
TCNS 538976288
TCFD 538976288
TCXP 63
TCSF 0.0000000000000000
Thanks.
Regards,
Tao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150527/ef02fbf1/attachment.htm>
More information about the CP2K-user
mailing list