Commit 6d759f1b authored by sjplimp's avatar sjplimp
Browse files

sync with GH

git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15782 f3b2605a-c512-4ea7-a41b-209d697bcdaa
parent 2babec1b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ Commands :h1
   dump_image
   dump_modify
   dump_molfile
   dump_nc
   echo
   fix
   fix_modify

doc/src/dump_nc.txt

0 → 100644
+64 −0
Original line number Diff line number Diff line
"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c

:link(lws,http://lammps.sandia.gov)
:link(ld,Manual.html)
:link(lc,Section_commands.html#comm)

:line

dump nc command :h3
dump nc/mpiio command :h3

[Syntax:]

dump ID group-ID nc N file.nc args
dump ID group-ID nc/mpiio N file.nc args :pre

ID = user-assigned name for the dump :ulb,l
group-ID = ID of the group of atoms to be imaged :l
{nc} or {nc/mpiio}  = style of dump command (other styles {atom} or {cfg} or {dcd} or {xtc} or {xyz} or {local} or {custom} are discussed on the "dump"_dump.html doc page) :l
N = dump every this many timesteps :l
file.nc = name of file to write to :l
args = list of per atom data elements to dump, same as for the 'custom' dump style. :l,ule

[Examples:]

dump 1 all nc 100 traj.nc type x y z vx vy vz
dump_modify 1 append yes at -1 global c_thermo_pe c_thermo_temp c_thermo_press :pre

dump 1 all nc/mpiio 1000 traj.nc id type x y z :pre

[Description:]

Dump a snapshot of atom coordinates every N timesteps in Amber-style
NetCDF file format. NetCDF files are binary, portable and self-describing.
This dump style will write only one file on the root node.  The dump
style {nc} uses the "standard NetCDF library"_netcdf-home all data is
collected on one processor and then written to the dump file. Dump style
{nc/mpiio} used the "parallel NetCDF library"_pnetcdf-home and MPI-IO;
it has better performance on a larger number of processors. Note that
'nc' outputs all atoms sorted by atom tag while 'nc/mpiio' outputs in
order of the MPI rank.

In addition to per-atom data, also global (i.e. not per atom, but per frame)
quantities can be included in the dump file. This can be variables, output
from computes or fixes data prefixed with v_, c_ and f_, respectively.
These properties are included via "dump_modify"_dump_modify.html {global}.

:line

[Restrictions:]

The {nc} and {nc/mpiio} dump styles are part of the USER-NC-DUMP package.
It is only enabled if LAMMPS was built with that package. See the "Making
LAMMPS"_Section_start.html#start_3 section for more info.

:link(netcdf-home,http://www.unidata.ucar.edu/software/netcdf/)
:link(pnetcdf-home,http://trac.mcs.anl.gov/projects/parallel-netcdf/)

:line

[Related commands:]

"dump"_dump.html, "dump_modify"_dump_modify.html, "undump"_undump.html
+25 −2
Original line number Diff line number Diff line
@@ -106,8 +106,31 @@ more instructions on how to use the accelerated styles effectively.

[Mixing, shift, table, tail correction, restart, rRESPA info]:

These pair styles do not support mixing. Thus, coefficients for all
I,J pairs must be specified explicitly.
For atom type pairs I,J and I != J, the A, B, H, sigma_h, r_mh
parameters, and the cutoff distance for these pair styles can be mixed:
A (energy units)
sqrt(1/B) (distance units, see below)
H (energy units)
sigma_h (distance units)
r_mh (distance units)
cutoff (distance units):ul

The default mix value is {geometric}.
Only {arithmetic} and {geometric} mix values are supported.
See the "pair_modify" command for details.

The A and H parameters are mixed using the same rules normally
used to mix the "epsilon" parameter in a Lennard Jones interaction.
The sigma_h, r_mh, and the cutoff distance are mixed using the same
rules used to mix the "sigma" parameter in a Lennard Jones interaction.
The B parameter is converted to a distance (sigma), before mixing
(using sigma=B^-0.5), and converted back to a coefficient
afterwards (using B=sigma^2).
Negative A values are converted to positive A values (using abs(A))
before mixing, and converted back after mixing
(by multiplying by sign(Ai)*sign(Aj)).
This way, if either particle is repulsive (if Ai<0 or Aj<0),
then the default interaction between both particles will be repulsive.

The {gauss} style does not support the "pair_modify"_pair_modify.html
shift option. There is no effect due to the Gaussian well beyond the
+3 −3
Original line number Diff line number Diff line
@@ -50,14 +50,14 @@ PACKAGE = asphere body class2 colloid compress coreshell dipole gpu \

PACKUSER = user-atc user-awpmd user-cg-cmm user-colvars \
	   user-diffraction user-dpd user-drude user-eff user-fep user-h5md \
	   user-intel user-lb user-manifold user-mgpt \
	   user-misc user-molfile user-omp user-phonon user-qmmm user-qtb \
	   user-intel user-lb user-manifold user-mgpt user-misc user-molfile \
	   user-nc-dump user-omp user-phonon user-qmmm user-qtb \
	   user-quip user-reaxc user-smd user-smtbq user-sph user-tally \
	   user-vtk

PACKLIB = compress gpu kim kokkos meam mpiio poems python reax voronoi \
	  user-atc user-awpmd user-colvars user-h5md user-lb user-molfile \
	  user-qmmm user-quip user-vtk
	  user-nc-dump user-qmmm user-quip user-smd user-vtk

PACKALL = $(PACKAGE) $(PACKUSER)

+37 −2
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ using namespace MathConst;
PairGaussCut::PairGaussCut(LAMMPS *lmp) : Pair(lmp)
{
  respa_enable = 0;
  writedata = 1;
}

/* ---------------------------------------------------------------------- */
@@ -96,7 +97,6 @@ void PairGaussCut::compute(int eflag, int vflag)

    for (jj = 0; jj < jnum; jj++) {
      j = jlist[jj];

      factor_lj = special_lj[sbmask(j)];
      j &= NEIGHMASK;

@@ -221,7 +221,21 @@ void PairGaussCut::coeff(int narg, char **arg)

double PairGaussCut::init_one(int i, int j)
{
  if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set");
  if (setflag[i][j] == 0) {
    hgauss[i][j] = mix_energy(fabs(hgauss[i][i]), fabs(hgauss[j][j]),
			      fabs(sigmah[i][i]), fabs(sigmah[j][j]));

    // If either of the particles is repulsive (ie, if hgauss > 0),
    // then the interaction between both is repulsive.
    double sign_hi = (hgauss[i][i] >= 0.0) ? 1.0 : -1.0;
    double sign_hj = (hgauss[j][j] >= 0.0) ? 1.0 : -1.0;
    hgauss[i][j] *= MAX(sign_hi, sign_hj);

    sigmah[i][j] = mix_distance(sigmah[i][i], sigmah[j][j]);
    rmh[i][j] = mix_distance(rmh[i][i], rmh[j][j]);
    cut[i][j] = mix_distance(cut[i][i], cut[j][j]);
  }

  pgauss[i][j] = hgauss[i][j] / sqrt(MY_2PI) / sigmah[i][j];

  if (offset_flag) {
@@ -334,6 +348,27 @@ void PairGaussCut::read_restart_settings(FILE *fp)
  MPI_Bcast(&mix_flag,1,MPI_INT,0,world);
}

/* ----------------------------------------------------------------------
   proc 0 writes to data file
------------------------------------------------------------------------- */

void PairGaussCut::write_data(FILE *fp)
{
  for (int i = 1; i <= atom->ntypes; i++)
    fprintf(fp,"%d %g %g %g\n",i,hgauss[i][i],rmh[i][i],sigmah[i][i]);
}

/* ----------------------------------------------------------------------
   proc 0 writes all pairs to data file
------------------------------------------------------------------------- */

void PairGaussCut::write_data_all(FILE *fp)
{
  for (int i = 1; i <= atom->ntypes; i++)
    for (int j = i; j <= atom->ntypes; j++)
      fprintf(fp,"%d %d %g %g %g %g\n",i,j,hgauss[i][j],rmh[i][j],sigmah[i][j],cut[i][j]);
}

/* ---------------------------------------------------------------------- */

double PairGaussCut::single(int i, int j, int itype, int jtype, double rsq,
Loading