Download presentation
Presentation is loading. Please wait.
Published byLorena Woods Modified over 9 years ago
1
Tips for Designing a Good Simulation Project
2
Designing Good Simulation Projects Work incrementally –Do your literature homework. –Start with small model problems. –Reproduce literature results. –Visualize early and often. –Expect to throw the first one away. Learn how to troubleshoot problems –Don’t be afraid to experiment. –Demand internal consistency. –Become familiar with the source code. Devise your own analysis –Learn a plotting program like Xmgrace/Sigma plot well. –Learn a scripting language like Awk or Python. –Learn how to use Grep and Sed. –Learn statistics: time-correlation analysis, error propagation, linear and non-linear parameter estimation, noise filtering.
3
Use the best settings / Avoid shortcuts for performance –Only simulate in a vacuum if you really want to reproduce results for your system in a vacuum! Explicit solvent –Always use PME! –Never make cut < 8.0A –Avoid use of NRESPA (multiple time stepping) –Initial Heat in NVT, Relaxation in NPT, Production in the ensemble you want to measure – suggest[NPT] –Use binary (netcdf) trajectories [ioutfm=1] –Use MonteCarlo Barostat [barostat=2] Implicit solvent –Do NOT use cut offs –Use a Langevin Thermostat for heating. –Production in NVE(NVT) Be sure to check conserved quantities –Total Energy (NVE) / Angular Momentum Designing Good Simulation Projects
4
"Grass is green" syndrome –Demand a good structural starting model. –Try to incorporate just the essential features. –Cultivate “hypothesis-driven” research. "Power-house" theoretician syndrome –Avoid just reproducing what has already been measured. –Search for real collaborations. –Avoid novelty for novelty’s sake; size for size’s sake. Anecdotal results –Plan to do more sampling than you think you will need to. –Search for ways to use more than one starting structure. –Check the validity of your parameters - NEVER trust Antechamber! Avoiding Bad Simulation Projects
5
Some Example Input Files
6
Minimization 1 Minimization&cntrl imin=1, ! Minimization imin=1, ! Minimization ntx=1, ! Read just coordinates ntx=1, ! Read just coordinates maxcyc=2000, ncyc=1000, ! 1000 steps SD, 1000 CG maxcyc=2000, ncyc=1000, ! 1000 steps SD, 1000 CG ntc=1, ntf=1, ! No shake during minimization ntc=1, ntf=1, ! No shake during minimization ntb=1, ntp=0, ! Constant volume ntb=1, ntp=0, ! Constant volume ntpr=50, ! Print to mdout every 50 steps ntpr=50, ! Print to mdout every 50 steps cut=8.0, ! 8 angstrom cutoff. cut=8.0, ! 8 angstrom cutoff./ Sometimes one can do a multi-stage minimization with restraints on some atoms – e.g. minimize just H, then everything. mpirun –np 8 $AMBERHOME/bin/pmemd.MPI –O –i 01_min.in –o 01_min.out \ –p prmtop –c inpcrd -r 01_min.rst -inf 01_min.mdinfo
7
Relaxation 1 (50ps NVT) Relaxation 1 &cntrl imin=0, ntx=1,! Run MD [imin=0] imin=0, ntx=1,! Run MD [imin=0] ntb=1,cut=8.0,! NVT, 8 A cutoff ntb=1,cut=8.0,! NVT, 8 A cutoff ntp=0,! No barostat ntp=0,! No barostat ntc=2, ntf=2! Shake on ntc=2, ntf=2! Shake on ntt=3, gamma_ln=1.0,! Langevin Thermostat, 1.0ps -1 ntt=3, gamma_ln=1.0,! Langevin Thermostat, 1.0ps -1 tempi=0.0,! Initial Temperature of 0K tempi=0.0,! Initial Temperature of 0K nstlim=25000, dt=0.002,! 25K steps x 2fs = 50ps nstlim=25000, dt=0.002,! 25K steps x 2fs = 50ps iwrap=1,! Wrap coordinates to central box iwrap=1,! Wrap coordinates to central box ioutfm=1,! Write binary mdcrd ioutfm=1,! Write binary mdcrd ntpr=5000, ntwx=5000,! Write to mdout and mdcrd every 5,000 steps ntpr=5000, ntwx=5000,! Write to mdout and mdcrd every 5,000 steps ntwr=50000, ! Write restart file every 50,000 steps ntwr=50000, ! Write restart file every 50,000 steps ntr=1, restraint_wt=4.0,! Restrain backbone atoms with 4.0 KCal/Mol/A ntr=1, restraint_wt=4.0,! Restrain backbone atoms with 4.0 KCal/Mol/A restraintmask='@CA,C,N', restraintmask='@CA,C,N', ig=-1,! Use 'random' random number seed. ig=-1,! Use 'random' random number seed. nmropt=1,! Used to ramp temperature slowly nmropt=1,! Used to ramp temperature slowly/ &wt type='TEMP0', istep1=0, istep2=25000,value1=0.0, value2=50.0 / We start at 0K so calculation of pressure would be very inaccurate – so run a short NVT first $AMBERHOME/bin/pmemd.CUDA –O –i 02_heat.in –o 02_heat.out –p prmtop –c 01_min.rst \ -r 02_heat.rst –x 02_heat.nc -inf 02_heat.mdinfo –ref 01_min.rst
8
Relaxation 2 (NPT 1000ps) Relaxation 2 &cntrl imin=0, ntx=5, irest=1,! Read box and velocity info from inpcrd imin=0, ntx=5, irest=1,! Read box and velocity info from inpcrd ntb=2,cut=8.0, ! NPT ntb=2,cut=8.0, ! NPT ntp=2, pres0=1.0,! Anisotropic pressure scaling at 1 atm ntp=2, pres0=1.0,! Anisotropic pressure scaling at 1 atm barostat=2,! Use MonteCarlo barostat barostat=2,! Use MonteCarlo barostat ntc=2, ntc=2, ntf=2, ntf=2, ntt=3, temp0=310.0, gamma_ln=1.0, ntt=3, temp0=310.0, gamma_ln=1.0, nstlim=500000, dt=0.002, nstlim=500000, dt=0.002, iwrap=1, ioutfm=1, iwrap=1, ioutfm=1, ntpr=5000, ntwr=50000, ntwx=5000, ntpr=5000, ntwr=50000, ntwx=5000, ntr=1, restraint_wt=1.0, restraintmask='@CA,C,N', ! Keep weak restraints on backbone ntr=1, restraint_wt=1.0, restraintmask='@CA,C,N', ! Keep weak restraints on backbone ig=-1, ig=-1, nmropt=1, nmropt=1,/ &wt type='TEMP0', istep1=0, istep2=125000,value1=50.0, value2=310.0 / &wt type='TEMP0', istep1=125001, istep2=500000,value1=310.0, value2=310.0 / $AMBERHOME/bin/pmemd.CUDA –O –i 03_heat.in –o 03_heat.out –p prmtop –c 02_heat.rst \ -r 03_heat.rst –x 03_heat.nc -inf 03_heat.mdinfo –ref 02_heat.rst We heat from 50 to 310K over 250ps then hold at 310K for remaining 750ps
9
Relaxation 3 (NPT 1000ps) Relaxation 3 &cntrl imin=0, ntx=5, irest=1, imin=0, ntx=5, irest=1, ntb=2,cut=8.0, ntb=2,cut=8.0, ntp=2, pres0=1.0, ntp=2, pres0=1.0, barostat=2, barostat=2, ntc=2, ntc=2, ntf=2, ntf=2, ntt=3, temp0=310.0, gamma_ln=1.0,! Thermostat temp = 310K ntt=3, temp0=310.0, gamma_ln=1.0,! Thermostat temp = 310K nstlim=500000, dt=0.002, nstlim=500000, dt=0.002, iwrap=1, ioutfm=1, iwrap=1, ioutfm=1, ntpr=5000, ntwr=50000, ntwx=5000, ntpr=5000, ntwr=50000, ntwx=5000, ntr=0,! Turn off restraints ntr=0,! Turn off restraints ig=-1, ig=-1,/ $AMBERHOME/bin/pmemd.CUDA –O –i 04_equil.in –o 04_heat.out –p prmtop –c 03_heat.rst \ -r 04_equil.rst –x 04_heat.nc -inf 04_heat.mdinfo
10
Production (NPT 20ns chunks) Production&cntrl imin=0, ntx=5, irest=1, imin=0, ntx=5, irest=1, ntb=2,cut=8.0, ntb=2,cut=8.0, ntp=2, pres0=1.0, ntp=2, pres0=1.0, barostat=2, barostat=2, ntc=2, ntc=2, ntf=2, ntf=2, ntt=3, temp0=310.0, gamma_ln=1.0, ntt=3, temp0=310.0, gamma_ln=1.0, nstlim=10000000, dt=0.002, nstlim=10000000, dt=0.002, iwrap=1, ioutfm=1, iwrap=1, ioutfm=1, ntpr=5000, ntwr=50000, ntwx=5000, ntpr=5000, ntwr=50000, ntwx=5000, ntr=0, ig=-1, ntr=0, ig=-1,/ prevstep=$step step=$(( $step + 1)) while [ $step -le $max_step ] do $AMBERHOME/pmemd.cuda -O –i 20ns.in –p prmtop -c md_prod_$prevstep.rst \ -o md_prod_$step.out -r md_prod_$step.rst -x md_prod_$step.mdcrd -inf md_prod_$step.info prevstep=$(( $prevstep + 1)) step=$(( $step + 1)) done
11
Verify Key Properties –Visualize –RMSD, RMSF, TEMP, DENSITY Check for Convergence –Throw half your data away, how does your prediction change? –Consider plotting 'result' vs simulation time. E.g. calculate binding energy using first 1000 points, 2000 points, 3000 points. Plot cumulative result. Repeat –Repeat the calculation from different starting structures Run 100ns run, take 10ns snapshots and use these for 10 additional runs. –Remember correlation /= causation Check Your Results
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.