Modar internal command:


 trjReadNextFrame

To read one frame from the trajectory buffer in sequence.

  • Syntax
    trjreadnextframe

  • Examples

    #to get ntotframes first

    trjin file="step9_harvest.trj"

     

    ifrm=0

    while($ifrm<$ntotframes){

      trjreadnextframe

      mdtime=$curmdtime

      #double check whether trjreadnextframe successfully or not

      if($mdtime<0) abort

      #print progress for every 10ps

      tmod=$mdtime%10

      if($tmod==0) echo -hs "current MD time: $mdtime ps"

     

      #recalculate enerergy for each frame

      doenergy

     

      #calculate RMSD for all heavy atoms comparing to initial structure

      calc rmsd fitgroup=mainpro calcgroup=mainpro

      echo "$mdtime $value" >> rmsd.txt

     

      #calculate RMSD for main chain atoms

      calc rmsd fitgroup="mainpro and name C CA N O" \

                calcgroup="mainpro and name C CA N O"

      echo "$mdtime $value" >> mainrmsd.txt

     

      #calculate distance between terminals

      calc dist group1="residue PROA 41" group2="residue PROA 76"

      echo "$mdtime $value" >> dist.txt

     

      #calculate PHI,PSI for residue 50

      calc dihe group1="atom PROA 49 C" \

                group2="atom PROA 50 N" \

                group3="atom PROA 50 CA" \

                group4="atom PROA 50 C"

      phi=$value

      calc dihe group1="atom PROA 50 N" \

                group2="atom PROA 50 CA" \

                group3="atom PROA 50 C" \

                group4="atom PROA 51 N"

      psi=$value

      echo "$mdtime $PHI $PSI" >> phipsi.txt

     

      #calculate Radius of Gyration

      calc rgy  select="all"

      echo "$mdtime $value" >> rgy.txt

     

      ifrm=$ifrm+1

    }


  • Arguments
    none

  • Variables exported

    curmdtime

    MD time of current frame


 

 

 

  Contact us

  Phone: 400-660-8656
  Email: support@beemd.org

 

       我们长期和北京市计算中心合作提供计算培训服务,承接托管计算业务,如有需求请随时联系我们。