<LI><AHREF ="#fix">Fix options</A> which include integrators, temperature and pressure control, force constraints, boundary conditions, diagnostic output, etc
<LI><AHREF ="#atom">Atom options</A>
<LI><AHREF ="#variable">Variable options</A>
<LI><AHREF ="#command">New top-level commands</A>
</UL>
<P>As illustrated by the pairwise example, these options are
referred to in the LAMMPS documentation as the "style" of a particular
command.
</P>
<P>The instructions below for each category will list the header file for
the parent class that these styles are sub-classes of. Public
variables in that file are ones used and set by the sub-classes which
are also used by the parent class. Sometimes they are also used by
the rest of LAMMPS. Virtual functions in the header file which are
set = 0 are ones you must define in your new class to give it the
functionality LAMMPS expects. Virtual functions that are not set to 0
are functions you can optionally define.
</P>
<P>Here are some additional guidelines for modifying LAMMPS and adding
new functionality:
</P>
<P>Think about whether what you want to do would be better as a pre- or
post-processing step. Many computations are more easily and more
quickly done that way.
</P>
<P>Don't do anything within the timestepping of a run that isn't
parallel. E.g. don't accumulate a bunch of data on a single processor
and analyze it. You run the risk of seriously degrading the parallel
efficiency.
</P>
<P>If your new feature reads arguments or writes output, make sure you
follow the unit conventions discussed by the <AHREF ="units.html">units</A>
command.
</P>
<P>If you add something you think is truly useful and doesn't impact
LAMMPS performance when it isn't used, send me an <AHREF ="mailto:sjplimp@sandia.gov">email</A>. We
might be interested in adding it to the LAMMPS distribution.
</P>
<HR>
<ANAME ="pair"></A><H4>Pairwise potentials
</H4>
<P>All classes that compute pairwise interactions are sub-classes of the
Pair class. See the pair.h file for a list of methods this class
defines.
</P>
<P>Pair_lj_cut.cpp and pair_lj_cut.h are the simplest example of a Pair
class. They implement the <I>lj/cut</I> style of the
<AHREF ="pair_style.html">pair_style</A> command.
</P>
<P>Here is a brief description of the class methods in pair.h:
</P>
<DIVALIGN=center><TABLEWIDTH="0%"BORDER=1>
<TR><TD>compute</TD><TD> the workhorse routine that computes the pairwise interactions</TD></TR>
<TR><TD>settings</TD><TD> reads the input script line with any arguments you define</TD></TR>
<TR><TD>coeff</TD><TD> set coefficients for one i,j type pair</TD></TR>
<TR><TD>init_one</TD><TD> perform initialization for one i,j type pair</TD></TR>
<TR><TD>write & read_restart</TD><TD> write/read i,j pair coeffs to restart files</TD></TR>
<TR><TD>write & read_restart_settings</TD><TD> write/read global settings to restart files</TD></TR>
<TR><TD>single</TD><TD> force and energy of a single pairwise interaction between 2 atoms</TD></TR>
<TR><TD>compute_inner/middle/outer</TD><TD> versions of compute used by rRESPA
</TD></TR></TABLE></DIV>
<P>The inner/middle/outer routines are optional. Only a few of the
pairwise potentials use these in conjunction with rRESPA as set by the