用ptraj成像

2022-03-16 17:44:07
3096
最后编辑:青 于 2022-03-18 11:10:30
The box we created with packmol manifests a fundamental problem: a significant portion of the molecules is exposed to vacuum, which would yield deviations in simulation results. Under periodic boundaries, our box is “replicated” in all three dimensions so that our system represents a realistic bulk fluid. As a result, when a molecule exits the box from one side, it enters from the other. Ptraj's imaging tool repacks the molecules that left the box and gives us a proper image of what the central box looks like.
Create an input file, “ptraj.in”:
trajin md1.nc # the name of the trajectory
image center
trajout ptraj.out # the name of the output filethe
To run ptraj, run the following command:
ptraj prmtop ptraj.in
Ptmtop is the topology file for our box.
image: 10_Users_case_projects_ionic_liquids_mdionic2.jpg  image: 11_Users_case_projects_ionic_liquids_image.jpg
Figure 9:
MD results: (left) before imaging in ptraj; (right) after imaging
Radial Distribution Functions (RDFs)
  1. First, analyze the Density to see if the average density is close to your target.
    awk '/Density/ { print $3 }; $1=="A" && $2=="V" {exit 0}' md1.out > density.dat
    This awk script takes in the input file (md1.out) and prints the third column everytime the word “Density” appears in a line. The output is channeled into “density.dat”. When awk reaches the “Average” section in the output file, the script quits.
  2. To graph density data with xmgrace:
    $ xmgrace density.dat
  3. To calculate the average density, examine the sets in xmgrace, or run the following script:
    awk '{ sum = sum + $1 }; END { print "average = ", sum/NR }' density.dat
    This awk script takes in density.dat, and adds the first column of each line to “sum”, then prints sum divided by NR (a special variable for Number of Records).
  4. Examine the Energy Total to see if the system is at equilibrium.
    awk '/Etot/ {print $3}; ($1=="A" && $2=="V") {exit 0};' Eq2.1.out > etot.dat
    To graph the Energy Total data in xmgrace, use commands similar to those above for the density.
    Below is an example of the graph of the Energy Totals for the the MD simulation for the ionic liquid mixture of [bmim][BF4] and acetonitrile:
  5. Once the density is at target and total energy is at equilibrium, calculate Radial Distribution Functions.
    1. In this case, the average density is 1.0774 cc/mol, whereas the paper's density is 1.087 cc/mol.
image: 12_Users_case_projects_ionic_liquids_Densitytutorial.jpg  image: 13_Users_case_projects_ionic_liquids_Etottutorial.jpg
Figure 10:
Time dependence of the density (left) and total energy (right)
In order to calculate the RDFs, we will use  ptraj, a program used to analyze sets of 3-D coordinates from input coordinate files. We will be calculating the RDF between the N1 atoms of the Acetonitrile [CH3CN]
  • 1) Create an input file ptraj.in
trajin <trajectory filename>
radial CH3CN_N1 .1 15.0 :ACN@N
  • 2)Run
ptraj prmtop ptraj.in
CH3CN_N1 is the header for output file names, .1 is the bin size, 15.0 is the maximum for the histogram, and :ACN@N is the mask for selecting atoms we want to use for our analysis.
The output files that result after running the ptraj.in file will be:  CH3CN_N1_carnal.xmgr  CH3CN_N1_standard.xmgr  CH3CN_N1_volume.xmgr
Use Xmgrace to open the files to view the resulting graph of the RDFs. For example:
$ xmgrace CH3CN_N1_volume.xmgr
The above command will open the file CH3CN_N1_volume.xmgr in xmgrace. The x axis is distance in angstroms, and g(r) gives the probablity of finding an atom (in this case, the nitrogen in acetonitrile) at a given distance (r) of another atom (another nitrogen in acetonitrile). The first peak (around four angstroms) represents the first coordination shell, and the second peak (little less than six angstroms) represents the second coordination shell.
image: 14_Users_case_projects_ionic_liquids_rdfcrof25ns.jpg
Figure 11:
Radial distribution function
发表评论
评论通过审核后显示。
ICP标识

0
底部分享

产品

  • 离子液体(ILs)
  • ILs > 抗静电剂
  • ILs > 阻燃剂
  • ILs > 抗菌剂
  • ILs > 脱硫液
  • ILs > 液体活塞液
  • ILs > 脱芳液
  • 会议

  • 全国离子液体大会
  • 亚太离子液体会议
  • 世界离子液体会议
  • 学习

  • 合成
  • 理论
  • 实验
  • 关于 ILPlatform

    www.ionicliquids.com.cn


    “离子液体(ILs)产学研”平台(ILPlatform),用于打造出ILs内容自由分享集散中心,基于该中心将关联到与ILs有关的各个资源,为ILs从业人员以及想了解ILs的人们提供便捷的信息获取与分享渠道,未来实现多样化终端部署,让信息传递更加及时有效...