本計算(サンプリング)
前回、平衡化が完了したため、物理量のサンプリングを行うことが出来る。
以下に本計算を行うNAMD configuration fileを示す。
############################################################# ## JOB DESCRIPTION ## ############################################################# # Minimization and Equilibration of # ralgds in a Water Box ############################################################# ## ADJUSTABLE PARAMETERS ## ############################################################# structure /home/users/hogehoge/common/bpti_wb_ions.psf coordinates /home/users/hogehoge/common/bpti_wb_ions.pdb bincoordinates ./bpti_eq.restart.coor binvelocity ./bpti_eq.restart.vel extendedsystem ./bpti_eq.restart.xsc set temperature 300 set outputname bpti_sampling firsttimestep 0 ############################################################# ## SIMULATION PARAMETERS ## ############################################################# # Input paraTypeCharmm on parameters /home/users/hogehoge/topper/par_all27_prot_lipid.inp temperature 300 # Force-Field Parameters exclude scaled1-4 1-4scaling 1.0 cutoff 13.0 switching on switchdist 11.0 pairlistdist 20.0 # Integrator Parameters timestep 2.0 ;# 2fs/step rigidBonds all ;# needed for 2fs steps nonbondedFreq 1 fullElectFrequency 2 stepspercycle 20 # Constant Temperature Control langevin on ;# do langevin dynamics langevinDamping 5.0 ;# damping coefficient (gamma) of 1/ps langevinTemp $temperature langevinHydrogen off ;# don't couple langevin bath to hydrogens wrapAll on # PME (for full-system periodic electrostatics) PME yes PMEInterpOrder 6 PMEGridSizeX 64 PMEGridSizeY 64 PMEGridSizeZ 64 # Constant Pressure Control (variable volume) useGroupPressure yes ;# needed for rigidBonds useFlexibleCell no useConstantArea no langevinPiston on langevinPistonTarget 1 ;# in bar langevinPistonPeriod 200.0 langevinPistonDecay 100.0 langevinPistonTemp $temperature # Output outputName $outputname restartfreq 500 ;# 500steps = every 1ps dcdfreq 500 ;# 500steps = every 1ps xstFreq 250 outputEnergies 100 ;# 100steps = every 200fs outputPressure 100 ############################################################# ## EXECUTION SCRIPT ## ############################################################# run 500000 # you need more long time step,change me! In the current setting,simulation run 1ns. ;# take 1000 snapshots and measure energy and pressure 5000 times.
上記のファイルをbpti_sampling.confとして保存し、以下の通りに実行する。
mpiexec -np 10 namd2 bpti_eq.conf > bpti_eq.log #もしくは #charmrun +p10 namd2 bpti_eq.conf > bpti_eq.log #mpirun -np 10 namd2 bpti_eq.conf > bpti_eq.log #-npの後ろや+pの後ろはコア数の指定である。
サンプリングした物理量の時間変化はVMDのextensionタブのNAMD plotで確認することが出来る。
また物理量の時間平均やアンサンブル平均、RMS等の統計量を計算したい場合や、gnuplotで値を確認したい場合はコマンドライン上で以下を実行して出力ファイルを加工すれば良い。
grep ENERGY: hogehoge.log | awk '{print $見たい物理量が存在している列の番号}'