Simulations: Difference between revisions

From csml-wiki.northwestern.edu
Jump to navigation Jump to search
Line 5: Line 5:
== Molecular dynamics simulations ==
== Molecular dynamics simulations ==


By and large the CSML uses [http://lammps.sandia.gov/ LAMMPS] for MD, though depending on the application [http://www.ks.uiuc.edu/Research/namd/ NAMD], [http://www.gromacs.org/ GROMACS], or any of [http://en.wikipedia.org/wiki/List_of_software_for_molecular_mechanics_modeling a host of other packages] may be useful. Most issues can be resolved by consulting the [http://lammps.sandia.gov/doc/Manual.html LAMMPS manual], though some common problems are addressed below.
===Special Usage Notes===

By default LAMMPS normalizes the temperature by an amount <math>n_\text{dof} - d</math>, where <math>n_\text{dof}</math> is the system's total number of degrees of freedom and <math>d</math> is the system's dimensionality. Subtracting <math>d</math> accounts for the center-of-mass motion of the system. This is incorrect if the system has a proper frame of reference, e.g., when using a Langevin thermostat in which all particles interact with a stationary background solvent. In this case it is necessary to ensure <math>n_\text{dof}</math> is used instead of <math>n_\text{dof} - d</math>. To do this, use the command [http://lammps.sandia.gov/doc/compute_modify.html compute_modify] as follows
===LAMMPS Special Usage Notes===
By default LAMMPS normalizes the temperature by an amount <math>n_\text{dof} - d</math>, where <math>n_\text{dof}</math> is the system's total number of degrees of freedom and <math>d</math> is the system's dimensionality. Subtracting <math>d</math> accounts for the center-of-mass motion of the system. This leads to an incorrect ''reported'' value if the system has a proper frame of reference, e.g., when using a [http://lammps.sandia.gov/doc/fix_langevin.html Langevin thermostat] in which all particles interact with a stationary background solvent. In this case it is necessary to ensure <math>n_\text{dof}</math> is used instead of <math>n_\text{dof} - d</math>. To do this, use the command [http://lammps.sandia.gov/doc/compute_modify.html compute_modify] as follows


<pre>
<pre>

Revision as of 16:56, 12 June 2014

Introduction

Assorted topics relevant to programming particle-based simulation codes and to using these codes for the modeling of a wide range of systems, notably complex fluids.

Molecular dynamics simulations

By and large the CSML uses LAMMPS for MD, though depending on the application NAMD, GROMACS, or any of a host of other packages may be useful. Most issues can be resolved by consulting the LAMMPS manual, though some common problems are addressed below.

LAMMPS Special Usage Notes

By default LAMMPS normalizes the temperature by an amount , where is the system's total number of degrees of freedom and is the system's dimensionality. Subtracting accounts for the center-of-mass motion of the system. This leads to an incorrect reported value if the system has a proper frame of reference, e.g., when using a Langevin thermostat in which all particles interact with a stationary background solvent. In this case it is necessary to ensure is used instead of . To do this, use the command compute_modify as follows

compute myTemp all temp
compute_modify myTemp extra 0
thermo_modify temp myTemp

Monte Carlo simulations