Giter VIP home page Giter VIP logo

namd_interface's Introduction

NAMD_interface

Table of Content


Brief summary

Interface of running nonadiabatic molecular dynamics (NAMD) between QChem and homemade nuclear dynamic program (Dr. Dmitry Makhov).


Illustration of source codes

List of source codes

  1. Input data procession: dima2xyz, dima2inifile
  2. On-the-fly dynamic propagation: runNAMD_slave, macro_runNAMD, checkRunningDir
  3. Output data procession: check1traj, macro_chk,ana1traj, macro_ana, plotStates.gnu

Input data procession

  • Purpose of each source code
    1. dima2xyz: Transform Bohr to angstrom in order to check the initial molecular structure via Jmol.
    2. dima2inifile: Pre-process initial input file (coordinate and momentum) for each trajectory.

On-the-fly dynamic propagation

  • Purpose of each source code
    1. runNAMD_slave: Propagate one trajectory on HPC; Sun Grid Engine (SGE) scheduler system
    2. macro_runNAMD: Call runNAMD_slave to propagate many trajectories.
    3. checkRunningDir: Check the running status for all trajectories, and standard output the statistic result.
  • Key pseudo-code in runNAMD_slave
    1. Calculate the first point of one trajectory
      1. Extracting position and momentum to form the header of the dynamic file.
      2. Calculate non-adiabatic coupling.
      3. Calculate force in different electronic states.
      4. Extract EST information to complete the dynamic file.
      5. Nuclear preliminary propagation.
      6. Calculate non-adiabatic coupling.
      7. Calculate force in different electronic states.
      8. Extract EST information to write another dynamic file.
      9. Final nuclear propagation
    2. Propagate the rest points depending on the previous point
      • Repeat steps 5 to 9.

Output data procession

  • Purpose of each source code
    1. check1traj: Transform raw data to useful information for one trajectory.
    2. macro_chk: Call check1traj to transform raw data to useful information for all trajectories.
    3. ana1traj: For one trajectory, calculate bonds length from the output of the previous step.
    4. macro_ana: Call ana1traj to analyse all trajectories.
    5. plotStates.gnu: Use gnuplot to plot potential energy curves, population of each electronic state, and non-adiabatic coupling for any two states.

Example of propagating trajectory

Single trajectory

  • PATH: /run/CH4

Set input and submit jobs on HPC

  1. Check geometry after sampling.

    • Transform the unit of molecular coordinate from Bohr to angstrom.
      • input: g_1.dima, atomlist.dat
      • output: g_1.xyz
        $ dima2xyz g_1.dima atomlist.dat 
      
    • Visualize molecular structure.
      • Download Jmol via this link if you need.
      • input: g_1.xyz
      • output: stdout
      $ jmol g_1.xyz 
      
  2. Check nuclear and electronic setting.

    • File: setting.dat
    • Especially check the number of atom and number of state for different molecule.
  3. Run dynamics on HPC.

    • Input for runNAMD_slave
      1. File with molecular coordinate and momentum (g_1.iniPM).
      2. File with nuclear and electronic setting (setting.dat).
    $ qsub runNAMD_slave g_1.iniPM setting.dat 
    

Analyse output files

Multiple trajectories

  • PATH: /run/C3H2F4

Set input and submit jobs on HPC

  1. Check geometry after sampling. In this example, it has five molecular structures.

    • Transform the unit of molecular coordinate from Bohr to angstrom.

      • input: c3h2f4.dima, atomlist.dat
      • output: c3h2f4.xyz
          $ dima2xyz c3h2f4.dima atomlist.dat 
      
    • Visualize molecular structure.

      • input: c3h2f4.xyz
      • output: stdout
      $ jmol c3h2f4.xyz 
      
      c3h2f4.mov
  2. Generate the file with both molecular coordinate and momentum (c3h2f4.iniPM) by the sampling file (c3h2f4.dima).

    • input: c3h2f4.dima, atomlist.dat
    • output: c3h2f4_*.iniPM
    $ dima2iniPM c3h2f4.dima atomlist.dat 
    
  3. Check the nuclear and electronic setting.

    • File: setting.dat
    • Now, the number of atom is 9, and the number of state is 5 in this case.
  4. Use a loop to prepare necessary files.

    • Create sub-directory for each trajectory. The psudo-code is
      $ mkdir traj_$(directory index)
      
    • And then put all the *.iniPM into these subdirectories separately. The psudo-code is
      $ mv $(some name).iniPM traj_$(directory index)
      
    • Also, create the list for recording the sub-directory index. The psudo-code is
      $ echo $(subdirectory index) >> list.dat
      
    • Combine above three steps, the real script for the testing 5 subdirectories is
      $ for ((i=1;i<=5;i++))
          do 
              mkdir traj_$i
              mv g_$i.iniPM traj_$i 
              echo $i >> list.dat 
          done 
      
  5. Run dynamics on HPC.

    $ macro_runNAMD list.dat setting.dat 
    

Analyse output files

namd_interface's People

Watchers

Grace avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.