<div dir="ltr">Dear All,<br><br>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<br>Could anyone tell me what's wrong please?<br> <br>*in script  'input_cp2k_md.F' <br><br>SUBROUTINE create_md_section(section,error)<br><br>The following lines are added<br><br>    logical  :: TC<br>    INTEGER  :: TCNS<br>    INTEGER  :: TCFD<br>    INTEGER  :: TCXP<br>    REAL(dp) :: TCSF<br>    integer  :: taow          !output<br><br>       taow=400<br><br>       CALL keyword_create(keyword, name="TC",&<br>            description="decide to run thermal conductivity calculation",&<br>            usage="TC LOGICAL",default_l_val=.FALSE., lone_keyword_l_val=.TRUE., error=error)<br>       CALL section_add_keyword(section,keyword,error=error)<br>       CALL keyword_release(keyword,error=error)<br><br>       CALL keyword_create(keyword,name="TCNS",&<br>            description="number of discrete sections",usage="TCNS 16",&<br>            default_i_val=16,error=error)<br>       CALL section_add_keyword(section,keyword,error=error)<br>       CALL keyword_release(keyword,error=error)<br><br>       CALL keyword_create(keyword, name="TCFD",&<br>            description=" flux direction",&<br>            usage="TCFD 3", default_i_val=3,error=error)<br>       CALL section_add_keyword(section,keyword,error=error)<br>       CALL keyword_release(keyword,error=error)<br><br>       CALL keyword_create(keyword, name="TCXP",&<br>            description="exchange period (time-steps)",&<br>            usage="TCXP 50", default_i_val=50,error=error)<br>       CALL section_add_keyword(section,keyword,error=error)<br>       CALL keyword_release(keyword,error=error)<br><br>       CALL keyword_create(keyword, name="TCSF",&<br>            description="start of first section (in fraction)",&<br>            usage="TCSF 0.0", default_r_val=0.0_dp,error=error)<br>       CALL section_add_keyword(section,keyword,error=error)<br>       CALL keyword_release(keyword,error=error)<br><br>    CALL open_file(file_name='TCinput',file_status="UNKNOWN",file_action="WRITE",unit_number=taow)<br>          WRITE (taow,*) 'TC ',TC<br>          WRITE (taow,*) 'TCNS ',TCNS<br>          WRITE (taow,*) 'TCFD ',TCFD<br>          WRITE (taow,*) 'TCXP ',TCXP<br>          WRITE (taow,*) 'TCSF ',TCSF<br>    CALL close_file(unit_number=taow)<br><br><br>*CP2K input file<br><br>&MOTION<br>  &MD<br>    ENSEMBLE NVT<br>    STEPS 1<br>    TIMESTEP 1<br>    TEMPERATURE 300.0<br>    &THERMOSTAT<br>      &NOSE<br>        LENGTH 3<br>        YOSHIDA 3<br>        TIMECON 100.0<br>        MTS 2<br>      &END NOSE<br>    &END<br>    TC .TRUE.<br>    TCNS 16<br>    TCFD 3<br>    TCXP 1<br>    TCSF 0.0<br>  &END MD<br>&END MOTION<br><br><br>In the new file 'TCinput', I expect the same values as in the input file, but it shows that<br><br> TC         T<br> TCNS    538976288<br> TCFD    538976288<br> TCXP           63<br> TCSF    0.0000000000000000<br><br><br>Thanks.<br><br><br>Regards,<br>Tao<br></div>