diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 9ce8a89b98..8ade4b857a 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -562,11 +562,8 @@ void ReadRestart::force_fields() MPI_Bcast(style,n,MPI_CHAR,0,world); if (force->pair == NULL || strcmp(style,force->pair_style)) { - if (force->pair) { - if (me == 0) - error->warning("Resetting pair_style to restart file value"); - delete force->pair; - } + if (force->pair && me == 0) + error->warning("Resetting pair_style to restart file value"); force->create_pair(style); } @@ -583,11 +580,8 @@ void ReadRestart::force_fields() MPI_Bcast(style,n,MPI_CHAR,0,world); if (force->bond == NULL || strcmp(style,force->bond_style)) { - if (force->bond) { - if (me == 0) - error->warning("Resetting bond_style to restart file value"); - delete force->bond; - } + if (force->bond && me == 0) + error->warning("Resetting bond_style to restart file value"); force->create_bond(style); } @@ -605,11 +599,8 @@ void ReadRestart::force_fields() MPI_Bcast(style,n,MPI_CHAR,0,world); if (force->angle == NULL || strcmp(style,force->angle_style)) { - if (force->angle) { - if (me == 0) - error->warning("Resetting angle_style to restart file value"); - delete force->angle; - } + if (force->angle && me == 0) + error->warning("Resetting angle_style to restart file value"); force->create_angle(style); } @@ -627,11 +618,8 @@ void ReadRestart::force_fields() MPI_Bcast(style,n,MPI_CHAR,0,world); if (force->dihedral == NULL || strcmp(style,force->dihedral_style)) { - if (force->dihedral) { - if (me == 0) - error->warning("Resetting dihedral_style to restart file value"); - delete force->dihedral; - } + if (force->dihedral && me == 0) + error->warning("Resetting dihedral_style to restart file value"); force->create_dihedral(style); } @@ -649,11 +637,8 @@ void ReadRestart::force_fields() MPI_Bcast(style,n,MPI_CHAR,0,world); if (force->improper == NULL || strcmp(style,force->improper_style)) { - if (force->improper) { - if (me == 0) - error->warning("Resetting improper_style to restart file value"); - delete force->improper; - } + if (force->improper && me == 0) + error->warning("Resetting improper_style to restart file value"); force->create_improper(style); } diff --git a/src/style_class2.h b/src/style_class2.h index e69de29bb2..3ba9b32df4 100644 --- a/src/style_class2.h +++ b/src/style_class2.h @@ -0,0 +1,56 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef AngleInclude +#include "angle_class2.h" +#endif + +#ifdef AngleClass +AngleStyle(class2,AngleClass2) +#endif + +#ifdef BondInclude +#include "bond_class2.h" +#endif + +#ifdef BondClass +BondStyle(class2,BondClass2) +#endif + +#ifdef DihedralInclude +#include "dihedral_class2.h" +#endif + +#ifdef DihedralClass +DihedralStyle(class2,DihedralClass2) +#endif + +#ifdef ImproperInclude +#include "improper_class2.h" +#endif + +#ifdef ImproperClass +ImproperStyle(class2,ImproperClass2) +#endif + +#ifdef PairInclude +#include "pair_lj_class2.h" +#include "pair_lj_class2_coul_cut.h" +#include "pair_lj_class2_coul_long.h" +#endif + +#ifdef PairClass +PairStyle(lj/class2,PairLJClass2) +PairStyle(lj/class2/coul/cut,PairLJClass2CoulCut) +PairStyle(lj/class2/coul/long,PairLJClass2CoulLong) +#endif diff --git a/src/style_dpd.h b/src/style_dpd.h index e69de29bb2..8ce617c0c2 100644 --- a/src/style_dpd.h +++ b/src/style_dpd.h @@ -0,0 +1,28 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef AtomInclude +#include "atom_vec_dpd.h" +#endif + +#ifdef AtomClass +AtomStyle(dpd,AtomVecDPD) +#endif + +#ifdef PairInclude +#include "pair_dpd.h" +#endif + +#ifdef PairClass +PairStyle(dpd,PairDPD) +#endif diff --git a/src/style_granular.h b/src/style_granular.h index e69de29bb2..7b0f4b6a71 100644 --- a/src/style_granular.h +++ b/src/style_granular.h @@ -0,0 +1,50 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef AtomInclude +#include "atom_vec_granular.h" +#endif + +#ifdef AtomClass +AtomStyle(granular,AtomVecGranular) +# endif + +#ifdef FixInclude +#include "fix_freeze.h" +#include "fix_gran_diag.h" +#include "fix_nve_gran.h" +#include "fix_pour.h" +#include "fix_shear_history.h" +#include "fix_wall_gran.h" +#endif + +#ifdef FixClass +FixStyle(freeze,FixFreeze) +FixStyle(gran/diag,FixGranDiag) +FixStyle(nve/gran,FixNVEGran) +FixStyle(pour,FixPour) +FixStyle(SHEAR_HISTORY,FixShearHistory) +FixStyle(wall/gran,FixWallGran) +#endif + +#ifdef PairInclude +#include "pair_gran_hertzian.h" +#include "pair_gran_history.h" +#include "pair_gran_no_history.h" +#endif + +#ifdef PairClass +PairStyle(gran/hertzian,PairGranHertzian) +PairStyle(gran/history,PairGranHistory) +PairStyle(gran/no_history,PairGranNoHistory) +#endif diff --git a/src/style_opt.h b/src/style_opt.h index e69de29bb2..061816e136 100644 --- a/src/style_opt.h +++ b/src/style_opt.h @@ -0,0 +1,30 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef PairInclude +#include "pair_eam_opt.h" +#include "pair_eam_alloy_opt.h" +#include "pair_eam_fs_opt.h" +#include "pair_lj_charmm_coul_long_opt.h" +#include "pair_lj_cut_opt.h" +#include "pair_morse_opt.h" +#endif + +#ifdef PairClass +PairStyle(eam/opt,PairEAMOpt) +PairStyle(eam/alloy/opt,PairEAMAlloyOpt) +PairStyle(eam/fs/opt,PairEAMFSOpt) +PairStyle(lj/cut/opt,PairLJCutOpt) +PairStyle(lj/charmm/coul/long/opt,PairLJCharmmCoulLongOpt) +PairStyle(morse/opt,PairMorseOpt) +#endif diff --git a/src/style_xtc.h b/src/style_xtc.h index e69de29bb2..7110dda312 100644 --- a/src/style_xtc.h +++ b/src/style_xtc.h @@ -0,0 +1,20 @@ +/* ---------------------------------------------------------------------- + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + Copyright (2003) Sandia Corporation. Under the terms of Contract + DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains + certain rights in this software. This software is distributed under + the GNU General Public License. + + See the README file in the top-level LAMMPS directory. +------------------------------------------------------------------------- */ + +#ifdef DumpInclude +#include "dump_xtc.h" +#endif + +#ifdef DumpClass +DumpStyle(xtc,DumpXTC) +#endif