From 99430767dfa399dd1b8fd8a0ecf71fdef5544c5d Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Tue, 30 Apr 2019 21:45:21 -0500 Subject: [PATCH 001/236] Start devel of native support for KIM simulator models * CMake change to use KIM-API SimulatorModels branch * Minimal changes to pair_kim to illustrate use of KIM API interface. Only c++ interface is implemented for development. * Added example input: in.kim.simulator-model --- cmake/CMakeLists.txt | 6 +++-- examples/kim/in.kim.simulator-model | 41 +++++++++++++++++++++++++++++ src/KIM/pair_kim.cpp | 21 ++++++++++++++- src/KIM/pair_kim.h | 2 ++ 4 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 examples/kim/in.kim.simulator-model diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index dbbbc7f7ac..6acc61576a 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -738,8 +738,10 @@ if(PKG_KIM) enable_language(Fortran) include(ExternalProject) ExternalProject_Add(kim_build - URL https://s3.openkim.org/kim-api/kim-api-2.0.2.txz - URL_MD5 537d9c0abd30f85b875ebb584f9143fa + GIT_REPOSITORY https://github.com/openkim/kim-api.git + GIT_TAG SimulatorModels + #URL https://s3.openkim.org/kim-api/kim-api-2.0.2.txz + #URL_MD5 537d9c0abd30f85b875ebb584f9143fa BINARY_DIR build CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} diff --git a/examples/kim/in.kim.simulator-model b/examples/kim/in.kim.simulator-model new file mode 100644 index 0000000000..32baf9d78e --- /dev/null +++ b/examples/kim/in.kim.simulator-model @@ -0,0 +1,41 @@ +# 3d Lennard-Jones melt +# +# This example requires that the example models provided with +# the kim-api package are installed. see the ./lib/kim/README or +# ./lib/kim/Install.py files for details on how to install these +# example models. +# + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +units metal +atom_style atomic +newton off + +lattice fcc 4.4300 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box + +#pair_style lj/cut 8.1500 +#pair_coeff 1 1 0.0104 3.4000 + +pair_style kim ex_sim_model_Si_mod_tersoff +pair_coeff * * Ar + +mass 1 39.95 +velocity all create 200.0 232345 loop geom + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 all nve +#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 + +run 100 diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index a1c13ae81f..01b435194e 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -87,6 +87,7 @@ PairKIM::PairKIM(LAMMPS *lmp) : chargeUnit(KIM_CHARGE_UNIT_unused), temperatureUnit(KIM_TEMPERATURE_UNIT_unused), timeUnit(KIM_TIME_UNIT_unused), + simulatorModel(NULL), pkim(NULL), pargs(NULL), kim_model_support_for_energy(KIM_SUPPORT_STATUS_notSupported), @@ -396,8 +397,10 @@ void PairKIM::coeff(int narg, char **arg) // Assume all species arguments are valid // errors will be detected by below + std::string atom_type_sym_list; lmps_num_unique_elements = 0; for (i = 2; i < narg; i++) { + atom_type_sym_list += std::string(" ") + arg[i]; for (j = 0; j < lmps_num_unique_elements; j++) if (strcmp(arg[i],lmps_unique_elements[j]) == 0) break; lmps_map_species_to_unique[i-1] = j; @@ -422,6 +425,15 @@ void PairKIM::coeff(int narg, char **arg) if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); + if (simulatorModel) + { + simulatorModel->AddTemplateMap("atom-type-sym-list", atom_type_sym_list); + simulatorModel->CloseTemplateMap(); + + error->all(FLERR,(simulatorModel->ToString()).c_str()); + } + else + { // setup mapping between LAMMPS unique elements and KIM species codes if (kim_particle_codes_ok) { @@ -449,6 +461,7 @@ void PairKIM::coeff(int narg, char **arg) error->all(FLERR, msg.str().c_str()); } } + } return; } @@ -770,7 +783,13 @@ void PairKIM::kim_init() &requestedUnitsAccepted, &pkim); if (kimerror) - error->all(FLERR,"KIM ModelCreate failed"); + { + kimerror = KIM::SimulatorModel::Create(kim_modelname,&simulatorModel); + if (kimerror) + error->all(FLERR,"KIM ModelCreate failed"); + else + return; + } else { if (!requestedUnitsAccepted) { error->all(FLERR,"KIM Model did not accept the requested unit system"); diff --git a/src/KIM/pair_kim.h b/src/KIM/pair_kim.h index 27bab6c687..dcfb4a8af0 100644 --- a/src/KIM/pair_kim.h +++ b/src/KIM/pair_kim.h @@ -68,6 +68,7 @@ class KIM_API_model; extern "C" { #include "KIM_SimulatorHeaders.h" } +#include "KIM_SimulatorModel.hpp" #include @@ -121,6 +122,7 @@ namespace LAMMPS_NS { KIM_TemperatureUnit temperatureUnit; KIM_TimeUnit timeUnit; + KIM::SimulatorModel * simulatorModel; KIM_Model * pkim; KIM_ComputeArguments * pargs; -- GitLab From 11407a165b1b3d26e09e9f6f3a7c0ac96a6080af Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 7 May 2019 18:21:58 -0400 Subject: [PATCH 002/236] reformat pair style kim to LAMMPS style and add some existing simiulator model code (non-functional) --- src/KIM/pair_kim.cpp | 1465 ++++++++++++++++++++---------------------- src/KIM/pair_kim.h | 201 +++--- 2 files changed, 792 insertions(+), 874 deletions(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 01b435194e..d75d960355 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -55,6 +55,7 @@ #include #include +#include // includes from LAMMPS #include "pair_kim.h" @@ -74,201 +75,187 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ PairKIM::PairKIM(LAMMPS *lmp) : - Pair(lmp), - settings_call_count(0), - init_style_call_count(0), - kim_modelname(NULL), - lmps_map_species_to_unique(NULL), - lmps_unique_elements(NULL), - lmps_num_unique_elements(0), - lmps_units(METAL), - lengthUnit(KIM_LENGTH_UNIT_unused), - energyUnit(KIM_ENERGY_UNIT_unused), - chargeUnit(KIM_CHARGE_UNIT_unused), - temperatureUnit(KIM_TEMPERATURE_UNIT_unused), - timeUnit(KIM_TIME_UNIT_unused), - simulatorModel(NULL), - pkim(NULL), - pargs(NULL), - kim_model_support_for_energy(KIM_SUPPORT_STATUS_notSupported), - kim_model_support_for_forces(KIM_SUPPORT_STATUS_notSupported), - kim_model_support_for_particleEnergy(KIM_SUPPORT_STATUS_notSupported), - kim_model_support_for_particleVirial(KIM_SUPPORT_STATUS_notSupported), - lmps_local_tot_num_atoms(0), - kim_global_influence_distance(0.0), - kim_number_of_neighbor_lists(0), - kim_cutoff_values(NULL), - modelWillNotRequestNeighborsOfNoncontributingParticles(NULL), - neighborLists(NULL), - kim_particle_codes(NULL), - lmps_maxalloc(0), - kim_particleSpecies(NULL), - kim_particleContributing(NULL), - lmps_stripped_neigh_list(NULL), - lmps_stripped_neigh_ptr(NULL) + Pair(lmp), + settings_call_count(0), + init_style_call_count(0), + kim_modelname(NULL), + lmps_map_species_to_unique(NULL), + lmps_unique_elements(NULL), + lmps_num_unique_elements(0), + lmps_units(METAL), + lengthUnit(KIM_LENGTH_UNIT_unused), + energyUnit(KIM_ENERGY_UNIT_unused), + chargeUnit(KIM_CHARGE_UNIT_unused), + temperatureUnit(KIM_TEMPERATURE_UNIT_unused), + timeUnit(KIM_TIME_UNIT_unused), + simulatorModel(NULL), + pkim(NULL), + pargs(NULL), + kim_model_support_for_energy(KIM_SUPPORT_STATUS_notSupported), + kim_model_support_for_forces(KIM_SUPPORT_STATUS_notSupported), + kim_model_support_for_particleEnergy(KIM_SUPPORT_STATUS_notSupported), + kim_model_support_for_particleVirial(KIM_SUPPORT_STATUS_notSupported), + lmps_local_tot_num_atoms(0), + kim_global_influence_distance(0.0), + kim_number_of_neighbor_lists(0), + kim_cutoff_values(NULL), + modelWillNotRequestNeighborsOfNoncontributingParticles(NULL), + neighborLists(NULL), + kim_particle_codes(NULL), + lmps_maxalloc(0), + kim_particleSpecies(NULL), + kim_particleContributing(NULL), + lmps_stripped_neigh_list(NULL), + lmps_stripped_neigh_ptr(NULL), + simulator_class(NULL), + simulator_style(NULL) { - // Initialize Pair data members to appropriate values - single_enable = 0; // We do not provide the Single() function - restartinfo = 0; // We do not write any restart info - one_coeff = 1; // We only allow one coeff * * call - // set to 1, regardless use of fdotr, to avoid ev_set()'s futzing with - // vflag_global - no_virial_fdotr_compute = 1; - - // BEGIN: initial values that determine the KIM state - // (used by kim_free(), etc.) - kim_init_ok = false; - kim_particle_codes_ok = false; - // END - - return; + // Initialize Pair data members to appropriate values + single_enable = 0; // We do not provide the Single() function + restartinfo = 0; // We do not write any restart info + one_coeff = 1; // We only allow one coeff * * call + // set to 1, regardless use of fdotr, to avoid ev_set()'s futzing with + // vflag_global + no_virial_fdotr_compute = 1; + + // BEGIN: initial values that determine the KIM state + // (used by kim_free(), etc.) + kim_init_ok = false; + kim_particle_codes_ok = false; + // END } /* ---------------------------------------------------------------------- */ PairKIM::~PairKIM() { - // clean up kim_modelname - if (kim_modelname != 0) delete [] kim_modelname; + // clean up kim_modelname + if (kim_modelname != 0) delete [] kim_modelname; + + // clean up lammps atom species number to unique particle names mapping + if (lmps_unique_elements) + for (int i = 0; i < lmps_num_unique_elements; i++) + delete [] lmps_unique_elements[i]; + delete [] lmps_unique_elements; + + if (kim_particle_codes_ok) { + delete [] kim_particle_codes; + kim_particle_codes = NULL; + kim_particle_codes_ok = false; + } - // clean up lammps atom species number to unique particle names mapping - if (lmps_unique_elements) - for (int i = 0; i < lmps_num_unique_elements; i++) - delete [] lmps_unique_elements[i]; - delete [] lmps_unique_elements; + // clean up local memory used to support KIM interface + memory->destroy(kim_particleSpecies); + memory->destroy(kim_particleContributing); + memory->destroy(lmps_stripped_neigh_list); + // clean up lmps_stripped_neigh_ptr + if (lmps_stripped_neigh_ptr) { + delete [] lmps_stripped_neigh_ptr; + lmps_stripped_neigh_ptr = 0; + } - if (kim_particle_codes_ok) - { - delete [] kim_particle_codes; - kim_particle_codes = NULL; - kim_particle_codes_ok = false; - } - - // clean up local memory used to support KIM interface - memory->destroy(kim_particleSpecies); - memory->destroy(kim_particleContributing); - memory->destroy(lmps_stripped_neigh_list); - // clean up lmps_stripped_neigh_ptr - if (lmps_stripped_neigh_ptr) - { - delete [] lmps_stripped_neigh_ptr; - lmps_stripped_neigh_ptr = 0; - } - - // clean up allocated memory for standard Pair class usage - // also, we allocate lmps_map_species_to_uniuqe in the allocate() function - if (allocated) { - memory->destroy(setflag); - memory->destroy(cutsq); - delete [] lmps_map_species_to_unique; - } - - // clean up neighborlist pointers - if (neighborLists) - { - delete [] neighborLists; - neighborLists = 0; - } - - // clean up KIM interface (if necessary) - kim_free(); - - return; + // clean up allocated memory for standard Pair class usage + // also, we allocate lmps_map_species_to_uniuqe in the allocate() function + if (allocated) { + memory->destroy(setflag); + memory->destroy(cutsq); + delete [] lmps_map_species_to_unique; + } + + // clean up neighborlist pointers + if (neighborLists) { + delete [] neighborLists; + neighborLists = 0; + } + + // clean up KIM interface (if necessary) + kim_free(); } /* ---------------------------------------------------------------------- */ + void PairKIM::set_contributing() { int const nall = atom->nlocal + atom->nghost; for (int i = 0; i < nall; ++i) - { kim_particleContributing[i] = ( (i < atom->nlocal) ? 1 : 0 ); - } } /* ---------------------------------------------------------------------- */ -void PairKIM::compute(int eflag , int vflag) +void PairKIM::compute(int eflag, int vflag) { - ev_init(eflag,vflag); - - // grow kim_particleSpecies and kim_particleContributing array if necessary - // needs to be atom->nmax in length - if (atom->nmax > lmps_maxalloc) { - memory->destroy(kim_particleSpecies); - memory->destroy(kim_particleContributing); - - lmps_maxalloc = atom->nmax; - memory->create(kim_particleSpecies,lmps_maxalloc, - "pair:kim_particleSpecies"); - int kimerror = KIM_ComputeArguments_SetArgumentPointerInteger(pargs, - KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes, - kim_particleSpecies); - memory->create(kim_particleContributing,lmps_maxalloc, - "pair:kim_particleContributing"); - kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerInteger( - pargs, - KIM_COMPUTE_ARGUMENT_NAME_particleContributing, - kim_particleContributing); - if (kimerror) - error->all( - FLERR, - "Unable to set KIM particle species codes and/or contributing"); - } - - // kim_particleSpecies = KIM atom species for each LAMMPS atom - - int *species = atom->type; - int nall = atom->nlocal + atom->nghost; - int ielement; - - for (int i = 0; i < nall; i++) { - ielement = lmps_map_species_to_unique[species[i]]; - kim_particleSpecies[i] = kim_particle_codes[ielement]; - } - - // Set kim contributing flags - set_contributing(); - - // pass current atom pointers to KIM - set_argument_pointers(); - - // set number of particles - lmps_local_tot_num_atoms = (int) nall; - - // compute via KIM model - int kimerror = KIM_Model_Compute(pkim, pargs); - if (kimerror) error->all(FLERR,"KIM Compute returned error"); - - // compute virial before reverse comm! - if (vflag_global) - { - virial_fdotr_compute(); - } - - // if newton is off, perform reverse comm - if (!lmps_using_newton) - { - comm->reverse_comm_pair(this); - } - - if ((vflag_atom) && - KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported) - ) - { // flip sign and order of virial if KIM is computing it - double tmp; - for (int i = 0; i < nall; ++i) - { - for (int j = 0; j < 3; ++j) vatom[i][j] = -1.0*vatom[i][j]; - tmp = vatom[i][3]; - vatom[i][3] = -vatom[i][5]; - vatom[i][4] = -vatom[i][4]; - vatom[i][5] = -tmp; - } - } + ev_init(eflag,vflag); + + // grow kim_particleSpecies and kim_particleContributing array if necessary + // needs to be atom->nmax in length + if (atom->nmax > lmps_maxalloc) { + memory->destroy(kim_particleSpecies); + memory->destroy(kim_particleContributing); + + lmps_maxalloc = atom->nmax; + memory->create(kim_particleSpecies,lmps_maxalloc, + "pair:kim_particleSpecies"); + int kimerror = KIM_ComputeArguments_SetArgumentPointerInteger(pargs, + KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes, + kim_particleSpecies); + memory->create(kim_particleContributing,lmps_maxalloc, + "pair:kim_particleContributing"); + kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerInteger( + pargs, + KIM_COMPUTE_ARGUMENT_NAME_particleContributing, + kim_particleContributing); + if (kimerror) + error->all(FLERR, + "Unable to set KIM particle species codes and/or contributing"); + } + + // kim_particleSpecies = KIM atom species for each LAMMPS atom - return; + int *species = atom->type; + int nall = atom->nlocal + atom->nghost; + int ielement; + + for (int i = 0; i < nall; i++) { + ielement = lmps_map_species_to_unique[species[i]]; + kim_particleSpecies[i] = kim_particle_codes[ielement]; + } + + // Set kim contributing flags + set_contributing(); + + // pass current atom pointers to KIM + set_argument_pointers(); + + // set number of particles + lmps_local_tot_num_atoms = (int) nall; + + // compute via KIM model + int kimerror = KIM_Model_Compute(pkim, pargs); + if (kimerror) error->all(FLERR,"KIM Compute returned error"); + + // compute virial before reverse comm! + if (vflag_global) + virial_fdotr_compute(); + + // if newton is off, perform reverse comm + if (!lmps_using_newton) { + comm->reverse_comm_pair(this); + } + + if ((vflag_atom) && + KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported)) { + // flip sign and order of virial if KIM is computing it + double tmp; + for (int i = 0; i < nall; ++i) { + for (int j = 0; j < 3; ++j) vatom[i][j] = -1.0*vatom[i][j]; + tmp = vatom[i][3]; + vatom[i][3] = -vatom[i][5]; + vatom[i][4] = -vatom[i][4]; + vatom[i][5] = -tmp; + } + } } /* ---------------------------------------------------------------------- @@ -277,22 +264,20 @@ void PairKIM::compute(int eflag , int vflag) void PairKIM::allocate() { - int n = atom->ntypes; + int n = atom->ntypes; - // allocate standard Pair class arrays - memory->create(setflag,n+1,n+1,"pair:setflag"); - for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - setflag[i][j] = 0; + // allocate standard Pair class arrays + memory->create(setflag,n+1,n+1,"pair:setflag"); + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + setflag[i][j] = 0; - memory->create(cutsq,n+1,n+1,"pair:cutsq"); + memory->create(cutsq,n+1,n+1,"pair:cutsq"); - // allocate mapping array - lmps_map_species_to_unique = new int[n+1]; + // allocate mapping array + lmps_map_species_to_unique = new int[n+1]; - allocated = 1; - - return; + allocated = 1; } /* ---------------------------------------------------------------------- @@ -301,56 +286,54 @@ void PairKIM::allocate() void PairKIM::settings(int narg, char **arg) { - // This is called when "pair_style kim ..." is read from input - // may be called multiple times - ++settings_call_count; - init_style_call_count = 0; - - if (narg != 1) - { - if ((narg > 0) && ((0 == strcmp("KIMvirial", arg[0])) || - (0 == strcmp("LAMMPSvirial", arg[0])))) - { - error->all(FLERR,"'KIMvirial' or 'LAMMPSvirial' not supported with " - "kim-api."); - } - else - error->all(FLERR,"Illegal pair_style command"); - } - // arg[0] is the KIM Model name - - lmps_using_molecular = (atom->molecular > 0); - - // ensure we are in a clean state for KIM (needed on repeated call) - // first time called will do nothing... - kim_free(); - - // make sure things are allocated - if (allocated != 1) allocate(); - - // clear setflag to ensure coeff() is called after settings() - int n = atom->ntypes; - for (int i = 1; i <= n; i++) - for (int j = i; j <= n; j++) - setflag[i][j] = 0; - - // set lmps_* bool flags - set_lmps_flags(); - - // set KIM Model name - int nmlen = strlen(arg[0]); - if (kim_modelname != 0) - { - delete [] kim_modelname; - kim_modelname = 0; - } - kim_modelname = new char[nmlen+1]; - strcpy(kim_modelname, arg[0]); - - // initialize KIM Model - kim_init(); - - return; + // This is called when "pair_style kim ..." is read from input + // may be called multiple times + ++settings_call_count; + init_style_call_count = 0; + + if (narg != 1) { + if ((narg > 0) && ((0 == strcmp("KIMvirial", arg[0])) || + (0 == strcmp("LAMMPSvirial", arg[0])))) { + error->all(FLERR,"'KIMvirial' or 'LAMMPSvirial' not supported with " + "kim-api."); + } else error->all(FLERR,"Illegal pair_style command"); + } + // arg[0] is the KIM Model name + + lmps_using_molecular = (atom->molecular > 0); + + // ensure we are in a clean state for KIM (needed on repeated call) + // first time called will do nothing... + kim_free(); + + // make sure things are allocated + if (allocated != 1) allocate(); + + // clear setflag to ensure coeff() is called after settings() + int n = atom->ntypes; + for (int i = 1; i <= n; i++) + for (int j = i; j <= n; j++) + setflag[i][j] = 0; + + // set lmps_* bool flags + set_lmps_flags(); + + // set KIM Model name + int nmlen = strlen(arg[0]); + if (kim_modelname != 0) { + delete [] kim_modelname; + kim_modelname = 0; + } + kim_modelname = new char[nmlen+1]; + strcpy(kim_modelname, arg[0]); + + // initialize KIM Model + kim_init(); + + // initialize LAMMPS Simulator model + if (simulatorModel) { + printf("LAMMPS simulator model: %s\n",kim_modelname); + } } /* ---------------------------------------------------------------------- @@ -359,91 +342,85 @@ void PairKIM::settings(int narg, char **arg) void PairKIM::coeff(int narg, char **arg) { - // This is called when "pair_coeff ..." is read from input - // may be called multiple times - - int i,j,n; - - if (!allocated) allocate(); - - if (narg != 2 + atom->ntypes) - error->all(FLERR,"Incorrect args for pair coefficients"); - - // insure I,J args are * * - - if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) - error->all(FLERR,"Incorrect args for pair coefficients"); - - - int ilo,ihi,jlo,jhi; - force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi); - force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi); - - // read args that map atom species to KIM elements - // lmps_map_species_to_unique[i] = - // which element the Ith atom type is - // lmps_num_unique_elements = # of unique elements - // lmps_unique_elements = list of element names - - // if called multiple times: update lmps_unique_elements - if (lmps_unique_elements) { - for (i = 0; i < lmps_num_unique_elements; i++) - delete [] lmps_unique_elements[i]; - delete [] lmps_unique_elements; - } - lmps_unique_elements = new char*[atom->ntypes]; - for (i = 0; i < atom->ntypes; i++) lmps_unique_elements[i] = 0; - - - // Assume all species arguments are valid - // errors will be detected by below - std::string atom_type_sym_list; - lmps_num_unique_elements = 0; - for (i = 2; i < narg; i++) { - atom_type_sym_list += std::string(" ") + arg[i]; - for (j = 0; j < lmps_num_unique_elements; j++) - if (strcmp(arg[i],lmps_unique_elements[j]) == 0) break; - lmps_map_species_to_unique[i-1] = j; - if (j == lmps_num_unique_elements) { - n = strlen(arg[i]) + 1; - lmps_unique_elements[j] = new char[n]; - strcpy(lmps_unique_elements[j],arg[i]); - lmps_num_unique_elements++; - } - } - - int count = 0; - for (int i = ilo; i <= ihi; i++) { - for (int j = MAX(jlo,i); j <= jhi; j++) { - if (lmps_map_species_to_unique[i] >= 0 && - lmps_map_species_to_unique[j] >= 0) { - setflag[i][j] = 1; - count++; - } - } - } - - if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); - - if (simulatorModel) - { - simulatorModel->AddTemplateMap("atom-type-sym-list", atom_type_sym_list); - simulatorModel->CloseTemplateMap(); - - error->all(FLERR,(simulatorModel->ToString()).c_str()); - } - else - { - // setup mapping between LAMMPS unique elements and KIM species codes - if (kim_particle_codes_ok) - { - delete [] kim_particle_codes; - kim_particle_codes = NULL; - kim_particle_codes_ok = false; - } - kim_particle_codes = new int[lmps_num_unique_elements]; - kim_particle_codes_ok = true; - for(int i = 0; i < lmps_num_unique_elements; i++){ + // This is called when "pair_coeff ..." is read from input + // may be called multiple times + + int i,j,n; + + if (!allocated) allocate(); + + if (narg != 2 + atom->ntypes) + error->all(FLERR,"Incorrect args for pair coefficients"); + + // insure I,J args are * * + + if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) + error->all(FLERR,"Incorrect args for pair coefficients"); + + int ilo,ihi,jlo,jhi; + force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi); + force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi); + + // read args that map atom species to KIM elements + // lmps_map_species_to_unique[i] = + // which element the Ith atom type is + // lmps_num_unique_elements = # of unique elements + // lmps_unique_elements = list of element names + + // if called multiple times: update lmps_unique_elements + if (lmps_unique_elements) { + for (i = 0; i < lmps_num_unique_elements; i++) + delete [] lmps_unique_elements[i]; + delete [] lmps_unique_elements; + } + lmps_unique_elements = new char*[atom->ntypes]; + for (i = 0; i < atom->ntypes; i++) lmps_unique_elements[i] = 0; + + // Assume all species arguments are valid + // errors will be detected by below + std::string atom_type_sym_list; + lmps_num_unique_elements = 0; + for (i = 2; i < narg; i++) { + atom_type_sym_list += std::string(" ") + arg[i]; + for (j = 0; j < lmps_num_unique_elements; j++) + if (strcmp(arg[i],lmps_unique_elements[j]) == 0) break; + lmps_map_species_to_unique[i-1] = j; + if (j == lmps_num_unique_elements) { + n = strlen(arg[i]) + 1; + lmps_unique_elements[j] = new char[n]; + strcpy(lmps_unique_elements[j],arg[i]); + lmps_num_unique_elements++; + } + } + + int count = 0; + for (int i = ilo; i <= ihi; i++) { + for (int j = MAX(jlo,i); j <= jhi; j++) { + if (lmps_map_species_to_unique[i] >= 0 && + lmps_map_species_to_unique[j] >= 0) { + setflag[i][j] = 1; + count++; + } + } + } + + if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); + + if (simulatorModel) { + simulatorModel->AddTemplateMap("atom-type-sym-list", atom_type_sym_list); + simulatorModel->CloseTemplateMap(); + + error->all(FLERR,(simulatorModel->ToString()).c_str()); + } else { + // setup mapping between LAMMPS unique elements and KIM species codes + if (kim_particle_codes_ok) { + delete [] kim_particle_codes; + kim_particle_codes = NULL; + kim_particle_codes_ok = false; + } + kim_particle_codes = new int[lmps_num_unique_elements]; + kim_particle_codes_ok = true; + for(int i = 0; i < lmps_num_unique_elements; i++) { int supported; int code; KIM_Model_GetSpeciesSupportAndCode( @@ -451,19 +428,15 @@ void PairKIM::coeff(int narg, char **arg) KIM_SpeciesName_FromString(lmps_unique_elements[i]), &supported, &code); - if (supported) + if (supported) { kim_particle_codes[i] = code; - else - { - std::stringstream msg; - msg << "create_kim_particle_codes: symbol not found: " - << lmps_unique_elements[i]; - error->all(FLERR, msg.str().c_str()); + } else { + std::string msg("create_kim_particle_codes: symbol not found: "); + msg += lmps_unique_elements[i]; + error->all(FLERR, msg.c_str()); } - } - } - - return; + } + } } /* ---------------------------------------------------------------------- @@ -472,57 +445,48 @@ void PairKIM::coeff(int narg, char **arg) void PairKIM::init_style() { - // This is called for each "run ...", "minimize ...", etc. read from input - ++init_style_call_count; - - if (domain->dimension != 3) - error->all(FLERR,"PairKIM only works with 3D problems"); - - // setup lmps_stripped_neigh_list for neighbors of one atom, if needed - if (lmps_using_molecular) { - memory->destroy(lmps_stripped_neigh_list); - memory->create(lmps_stripped_neigh_list, - kim_number_of_neighbor_lists*neighbor->oneatom, - "pair:lmps_stripped_neigh_list"); - delete [] lmps_stripped_neigh_ptr; - lmps_stripped_neigh_ptr = new int*[kim_number_of_neighbor_lists]; - for (int i = 0; i < kim_number_of_neighbor_lists; ++i) - { - lmps_stripped_neigh_ptr[i] - = &(lmps_stripped_neigh_list[i*(neighbor->oneatom)]); - } + // This is called for each "run ...", "minimize ...", etc. read from input + ++init_style_call_count; + + if (domain->dimension != 3) + error->all(FLERR,"PairKIM only works with 3D problems"); + + // setup lmps_stripped_neigh_list for neighbors of one atom, if needed + if (lmps_using_molecular) { + memory->destroy(lmps_stripped_neigh_list); + memory->create(lmps_stripped_neigh_list, + kim_number_of_neighbor_lists*neighbor->oneatom, + "pair:lmps_stripped_neigh_list"); + delete [] lmps_stripped_neigh_ptr; + lmps_stripped_neigh_ptr = new int*[kim_number_of_neighbor_lists]; + for (int i = 0; i < kim_number_of_neighbor_lists; ++i) + lmps_stripped_neigh_ptr[i] + = &(lmps_stripped_neigh_list[i*(neighbor->oneatom)]); + } + + // make sure comm_reverse expects (at most) 9 values when newton is off + if (!lmps_using_newton) comm_reverse_off = 9; + + // request full neighbor + for (int i = 0; i < kim_number_of_neighbor_lists; ++i) { + int irequest = neighbor->request(this,instance_me); + neighbor->requests[irequest]->id = i; + neighbor->requests[irequest]->half = 0; + neighbor->requests[irequest]->full = 1; + + if (modelWillNotRequestNeighborsOfNoncontributingParticles[i]) + neighbor->requests[irequest]->ghost = 0; + else + neighbor->requests[irequest]->ghost = 1; + + // always want all owned/ghost pairs + neighbor->requests[irequest]->newton = 2; - } - - // make sure comm_reverse expects (at most) 9 values when newton is off - if (!lmps_using_newton) comm_reverse_off = 9; - - // request full neighbor - for (int i = 0; i < kim_number_of_neighbor_lists; ++i) - { - int irequest = neighbor->request(this,instance_me); - neighbor->requests[irequest]->id = i; - neighbor->requests[irequest]->half = 0; - neighbor->requests[irequest]->full = 1; - - if (modelWillNotRequestNeighborsOfNoncontributingParticles[i]) - { - neighbor->requests[irequest]->ghost = 0; - } - else - { - neighbor->requests[irequest]->ghost = 1; - - } - // always want all owned/ghost pairs - neighbor->requests[irequest]->newton = 2; - // set cutoff - neighbor->requests[irequest]->cut = 1; - neighbor->requests[irequest]->cutoff - = kim_cutoff_values[i] + neighbor->skin; - } - - return; + // set cutoff + neighbor->requests[irequest]->cut = 1; + neighbor->requests[irequest]->cutoff + = kim_cutoff_values[i] + neighbor->skin; + } } /* ---------------------------------------------------------------------- @@ -541,154 +505,134 @@ void PairKIM::init_list(int id, NeighList *ptr) double PairKIM::init_one(int i, int j) { - // This is called once of each (unordered) i,j pair for each - // "run ...", "minimize ...", etc. read from input + // This is called once of each (unordered) i,j pair for each + // "run ...", "minimize ...", etc. read from input - if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); + if (setflag[i][j] == 0) error->all(FLERR,"All pair coeffs are not set"); - return kim_global_influence_distance; + return kim_global_influence_distance; } /* ---------------------------------------------------------------------- */ int PairKIM::pack_reverse_comm(int n, int first, double *buf) { - int i,m,last; - double *fp; - fp = &(atom->f[0][0]); - - m = 0; - last = first + n; - if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported) - && - ((vflag_atom == 0) || - KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported))) - { - for (i = first; i < last; i++) - { - buf[m++] = fp[3*i+0]; - buf[m++] = fp[3*i+1]; - buf[m++] = fp[3*i+2]; - } - return m; - } - else if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported) && - (vflag_atom == 1) && - KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported)) - { - double *va=&(vatom[0][0]); - for (i = first; i < last; i++) - { - buf[m++] = fp[3*i+0]; - buf[m++] = fp[3*i+1]; - buf[m++] = fp[3*i+2]; - - buf[m++] = va[6*i+0]; - buf[m++] = va[6*i+1]; - buf[m++] = va[6*i+2]; - buf[m++] = va[6*i+3]; - buf[m++] = va[6*i+4]; - buf[m++] = va[6*i+5]; - } - return m; - } - else if (KIM_SupportStatus_Equal(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported) - && - (vflag_atom == 1) && - KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported)) - { - double *va=&(vatom[0][0]); - for (i = first; i < last; i++) - { - buf[m++] = va[6*i+0]; - buf[m++] = va[6*i+1]; - buf[m++] = va[6*i+2]; - buf[m++] = va[6*i+3]; - buf[m++] = va[6*i+4]; - buf[m++] = va[6*i+5]; - } - return m; - } - else - return 0; + int i,m,last; + double *fp; + fp = &(atom->f[0][0]); + + m = 0; + last = first + n; + if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, + KIM_SUPPORT_STATUS_notSupported) + && + ((vflag_atom == 0) || + KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported))) { + for (i = first; i < last; i++) { + buf[m++] = fp[3*i+0]; + buf[m++] = fp[3*i+1]; + buf[m++] = fp[3*i+2]; + } + return m; + } else if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, + KIM_SUPPORT_STATUS_notSupported) && + (vflag_atom == 1) && + KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported)) { + double *va=&(vatom[0][0]); + for (i = first; i < last; i++) { + buf[m++] = fp[3*i+0]; + buf[m++] = fp[3*i+1]; + buf[m++] = fp[3*i+2]; + + buf[m++] = va[6*i+0]; + buf[m++] = va[6*i+1]; + buf[m++] = va[6*i+2]; + buf[m++] = va[6*i+3]; + buf[m++] = va[6*i+4]; + buf[m++] = va[6*i+5]; + } + return m; + } else if (KIM_SupportStatus_Equal(kim_model_support_for_forces, + KIM_SUPPORT_STATUS_notSupported) + && + (vflag_atom == 1) && + KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported)) { + double *va=&(vatom[0][0]); + for (i = first; i < last; i++) { + buf[m++] = va[6*i+0]; + buf[m++] = va[6*i+1]; + buf[m++] = va[6*i+2]; + buf[m++] = va[6*i+3]; + buf[m++] = va[6*i+4]; + buf[m++] = va[6*i+5]; + } + return m; + } else return 0; } /* ---------------------------------------------------------------------- */ void PairKIM::unpack_reverse_comm(int n, int *list, double *buf) { - int i,j,m; - double *fp; - fp = &(atom->f[0][0]); - - m = 0; - if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported) - && - ((vflag_atom == 0) || - KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported))) - { - for (i = 0; i < n; i++) - { - j = list[i]; - fp[3*j+0]+= buf[m++]; - fp[3*j+1]+= buf[m++]; - fp[3*j+2]+= buf[m++]; - } - } - else if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported) - && - (vflag_atom == 1) && - KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported)) - { - double *va=&(vatom[0][0]); - for (i = 0; i < n; i++) - { - j = list[i]; - fp[3*j+0]+= buf[m++]; - fp[3*j+1]+= buf[m++]; - fp[3*j+2]+= buf[m++]; - - va[j*6+0]+=buf[m++]; - va[j*6+1]+=buf[m++]; - va[j*6+2]+=buf[m++]; - va[j*6+3]+=buf[m++]; - va[j*6+4]+=buf[m++]; - va[j*6+5]+=buf[m++]; - } - } - else if (KIM_SupportStatus_Equal(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported) - && - (vflag_atom == 1) && - KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported)) - { - double *va=&(vatom[0][0]); - for (i = 0; i < n; i++) - { - j = list[i]; - va[j*6+0]+=buf[m++]; - va[j*6+1]+=buf[m++]; - va[j*6+2]+=buf[m++]; - va[j*6+3]+=buf[m++]; - va[j*6+4]+=buf[m++]; - va[j*6+5]+=buf[m++]; - } - } else { - ; // do nothing - } - - return; + int i,j,m; + double *fp; + fp = &(atom->f[0][0]); + + m = 0; + if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, + KIM_SUPPORT_STATUS_notSupported) + && + ((vflag_atom == 0) || + KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported))) { + for (i = 0; i < n; i++) { + j = list[i]; + fp[3*j+0]+= buf[m++]; + fp[3*j+1]+= buf[m++]; + fp[3*j+2]+= buf[m++]; + } + } else if (KIM_SupportStatus_NotEqual(kim_model_support_for_forces, + KIM_SUPPORT_STATUS_notSupported) + && + (vflag_atom == 1) && + KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported)) { + double *va=&(vatom[0][0]); + for (i = 0; i < n; i++) { + j = list[i]; + fp[3*j+0]+= buf[m++]; + fp[3*j+1]+= buf[m++]; + fp[3*j+2]+= buf[m++]; + + va[j*6+0]+=buf[m++]; + va[j*6+1]+=buf[m++]; + va[j*6+2]+=buf[m++]; + va[j*6+3]+=buf[m++]; + va[j*6+4]+=buf[m++]; + va[j*6+5]+=buf[m++]; + } + } else if (KIM_SupportStatus_Equal(kim_model_support_for_forces, + KIM_SUPPORT_STATUS_notSupported) + && + (vflag_atom == 1) && + KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported)) { + double *va=&(vatom[0][0]); + for (i = 0; i < n; i++) { + j = list[i]; + va[j*6+0]+=buf[m++]; + va[j*6+1]+=buf[m++]; + va[j*6+2]+=buf[m++]; + va[j*6+3]+=buf[m++]; + va[j*6+4]+=buf[m++]; + va[j*6+5]+=buf[m++]; + } + } else { + ; // do nothing + } } /* ---------------------------------------------------------------------- @@ -697,8 +641,34 @@ void PairKIM::unpack_reverse_comm(int n, int *list, double *buf) double PairKIM::memory_usage() { - double bytes = 2 * lmps_maxalloc * sizeof(int); - return bytes; + double bytes = 2 * lmps_maxalloc * sizeof(int); + return bytes; +} + +/* ---------------------------------------------------------------------- + simulator model support functions +------------------------------------------------------------------------- */ + +void PairKIM::simulator_init() +{ + int dummy; + // do not try with suffixes for now. + simulator_class = force->new_pair("lj/cut",1,dummy); + force->store_style(simulator_style,"lj/cut",1); + printf("Simulator model init: %s -> %s\n", kim_modelname, simulator_style); + char **args = new char*[1]; + args[0] = (char *)"8.1500"; + simulator_class->settings(1,args); + delete[] args; +} + +void PairKIM::simulator_free() +{ + printf("Simulator model free: %s -> %s\n", kim_modelname, simulator_style); + delete[] simulator_style; + simulator_style = NULL; + delete simulator_class; + simulator_class = NULL; } /* ---------------------------------------------------------------------- @@ -708,148 +678,128 @@ double PairKIM::memory_usage() int PairKIM::get_neigh(void const * const dataObject, int const numberOfNeighborLists, double const * const cutoffs, - int const neighborListIndex, int const particleNumber, + int const neighborListIndex, + int const particleNumber, int * const numberOfNeighbors, int const ** const neighborsOfParticle) { - PairKIM const * const Model - = reinterpret_cast(dataObject); - - if (numberOfNeighborLists != Model->kim_number_of_neighbor_lists) - return true; - for (int i = 0; i < numberOfNeighborLists; ++i) - { - if (Model->kim_cutoff_values[i] < cutoffs[i]) return true; - } - - // neighborListIndex and particleNumber are validated by KIM API - - // initialize numNeigh - *numberOfNeighbors = 0; - - NeighList * neiobj = Model->neighborLists[neighborListIndex]; - - int *numneigh, **firstneigh; - numneigh = neiobj->numneigh; // # of J neighbors for each I atom - firstneigh = neiobj->firstneigh; // ptr to 1st J int value of each I atom - - *numberOfNeighbors = numneigh[particleNumber]; - - // strip off neighbor mask for molecular systems - if (!Model->lmps_using_molecular) - *neighborsOfParticle = firstneigh[particleNumber]; - else - { - int n = *numberOfNeighbors; - int *ptr = firstneigh[particleNumber]; - int *lmps_stripped_neigh_list - = Model->lmps_stripped_neigh_ptr[neighborListIndex]; - for (int i = 0; i < n; i++) - lmps_stripped_neigh_list[i] = *(ptr++) & NEIGHMASK; - *neighborsOfParticle = lmps_stripped_neigh_list; - } - return false; + PairKIM const * const Model + = reinterpret_cast(dataObject); + + if (numberOfNeighborLists != Model->kim_number_of_neighbor_lists) + return true; + for (int i = 0; i < numberOfNeighborLists; ++i) { + if (Model->kim_cutoff_values[i] < cutoffs[i]) return true; + } + + // neighborListIndex and particleNumber are validated by KIM API + + // initialize numNeigh + *numberOfNeighbors = 0; + + NeighList * neiobj = Model->neighborLists[neighborListIndex]; + + int *numneigh, **firstneigh; + numneigh = neiobj->numneigh; // # of J neighbors for each I atom + firstneigh = neiobj->firstneigh; // ptr to 1st J int value of each I atom + + *numberOfNeighbors = numneigh[particleNumber]; + + // strip off neighbor mask for molecular systems + if (!Model->lmps_using_molecular) + *neighborsOfParticle = firstneigh[particleNumber]; + else { + int n = *numberOfNeighbors; + int *ptr = firstneigh[particleNumber]; + int *lmps_stripped_neigh_list + = Model->lmps_stripped_neigh_ptr[neighborListIndex]; + for (int i = 0; i < n; i++) + lmps_stripped_neigh_list[i] = *(ptr++) & NEIGHMASK; + *neighborsOfParticle = lmps_stripped_neigh_list; + } + return false; } /* ---------------------------------------------------------------------- */ void PairKIM::kim_free() { - if (kim_init_ok) - { - int kimerror = KIM_Model_ComputeArgumentsDestroy(pkim, &pargs); - if (kimerror) - error->all(FLERR,"Unable to destroy Compute Arguments Object"); - - KIM_Model_Destroy(&pkim); - } - kim_init_ok = false; + if (kim_init_ok) { + int kimerror = KIM_Model_ComputeArgumentsDestroy(pkim, &pargs); + if (kimerror) + error->all(FLERR,"Unable to destroy Compute Arguments Object"); - return; + KIM_Model_Destroy(&pkim); + } + kim_init_ok = false; } /* ---------------------------------------------------------------------- */ void PairKIM::kim_init() { - int kimerror; - - // initialize KIM model - int requestedUnitsAccepted; - kimerror = KIM_Model_Create( - KIM_NUMBERING_zeroBased, - lengthUnit, energyUnit, chargeUnit, temperatureUnit, timeUnit, - kim_modelname, - &requestedUnitsAccepted, - &pkim); - if (kimerror) - { - kimerror = KIM::SimulatorModel::Create(kim_modelname,&simulatorModel); - if (kimerror) - error->all(FLERR,"KIM ModelCreate failed"); - else - return; - } - else { - if (!requestedUnitsAccepted) { - error->all(FLERR,"KIM Model did not accept the requested unit system"); - } - - // check that the model does not require unknown capabilities - kimerror = check_for_routine_compatibility(); - if (kimerror) - { - error->all(FLERR, - "KIM Model requires unknown Routines. Unable to proceed."); - } - - kimerror = KIM_Model_ComputeArgumentsCreate(pkim, &pargs); - if (kimerror) - { - KIM_Model_Destroy(&pkim); - error->all(FLERR,"KIM ComputeArgumentsCreate failed"); - } - else - { - kim_init_ok = true; - } - } - - // determine KIM Model capabilities (used in this function below) - set_kim_model_has_flags(); - - KIM_Model_GetInfluenceDistance(pkim, &kim_global_influence_distance); - KIM_Model_GetNeighborListPointers( - pkim, - &kim_number_of_neighbor_lists, - &kim_cutoff_values, - &modelWillNotRequestNeighborsOfNoncontributingParticles); - if (neighborLists) - { - delete [] neighborLists; - neighborLists = 0; - } - neighborLists = new NeighList*[kim_number_of_neighbor_lists]; - - kimerror = KIM_ComputeArguments_SetArgumentPointerInteger(pargs, - KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles, - &lmps_local_tot_num_atoms); - if (KIM_SupportStatus_NotEqual(kim_model_support_for_energy, - KIM_SUPPORT_STATUS_notSupported)) - kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble(pargs, - KIM_COMPUTE_ARGUMENT_NAME_partialEnergy, - &(eng_vdwl)); - - kimerror = KIM_ComputeArguments_SetCallbackPointer(pargs, - KIM_COMPUTE_CALLBACK_NAME_GetNeighborList, - KIM_LANGUAGE_NAME_cpp, - reinterpret_cast(get_neigh), - reinterpret_cast(this)); - - if (kimerror) - error->all(FLERR,"Unable to register KIM pointers"); - - return; + int kimerror; + + // initialize KIM model + int requestedUnitsAccepted; + kimerror = KIM_Model_Create( + KIM_NUMBERING_zeroBased, + lengthUnit, energyUnit, chargeUnit, temperatureUnit, timeUnit, + kim_modelname, + &requestedUnitsAccepted, + &pkim); + if (kimerror) { + kimerror = KIM::SimulatorModel::Create(kim_modelname,&simulatorModel); + if (kimerror) error->all(FLERR,"KIM ModelCreate failed"); + else return; + } else { + if (!requestedUnitsAccepted) + error->all(FLERR,"KIM Model did not accept the requested unit system"); + + // check that the model does not require unknown capabilities + kimerror = check_for_routine_compatibility(); + if (kimerror) + error->all(FLERR, + "KIM Model requires unknown Routines. Unable to proceed."); + + kimerror = KIM_Model_ComputeArgumentsCreate(pkim, &pargs); + if (kimerror) { + KIM_Model_Destroy(&pkim); + error->all(FLERR,"KIM ComputeArgumentsCreate failed"); + } else kim_init_ok = true; + } + + // determine KIM Model capabilities (used in this function below) + set_kim_model_has_flags(); + + KIM_Model_GetInfluenceDistance(pkim, &kim_global_influence_distance); + KIM_Model_GetNeighborListPointers( + pkim, + &kim_number_of_neighbor_lists, + &kim_cutoff_values, + &modelWillNotRequestNeighborsOfNoncontributingParticles); + if (neighborLists) { + delete [] neighborLists; + neighborLists = 0; + } + neighborLists = new NeighList*[kim_number_of_neighbor_lists]; + + kimerror = KIM_ComputeArguments_SetArgumentPointerInteger(pargs, + KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles, + &lmps_local_tot_num_atoms); + if (KIM_SupportStatus_NotEqual(kim_model_support_for_energy, + KIM_SUPPORT_STATUS_notSupported)) + kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble(pargs, + KIM_COMPUTE_ARGUMENT_NAME_partialEnergy, + &(eng_vdwl)); + + kimerror = KIM_ComputeArguments_SetCallbackPointer(pargs, + KIM_COMPUTE_CALLBACK_NAME_GetNeighborList, + KIM_LANGUAGE_NAME_cpp, + reinterpret_cast(get_neigh), + reinterpret_cast(this)); + + if (kimerror) error->all(FLERR,"Unable to register KIM pointers"); } /* ---------------------------------------------------------------------- */ @@ -858,16 +808,14 @@ void PairKIM::set_argument_pointers() { int kimerror; kimerror = KIM_ComputeArguments_SetArgumentPointerDouble( - pargs, KIM_COMPUTE_ARGUMENT_NAME_coordinates, &(atom->x[0][0])); + pargs, KIM_COMPUTE_ARGUMENT_NAME_coordinates, &(atom->x[0][0])); // Set KIM pointer appropriately for particalEnergy if (KIM_SupportStatus_Equal(kim_model_support_for_particleEnergy, KIM_SUPPORT_STATUS_required) - && (eflag_atom != 1)) - { + && (eflag_atom != 1)) { // reallocate per-atom energy array if necessary - if (atom->nmax > maxeatom) - { + if (atom->nmax > maxeatom) { maxeatom = atom->nmax; memory->destroy(eatom); memory->create(eatom,comm->nthreads*maxeatom,"pair:eatom"); @@ -875,31 +823,25 @@ void PairKIM::set_argument_pointers() } if (KIM_SupportStatus_Equal(kim_model_support_for_particleEnergy, KIM_SUPPORT_STATUS_optional) - && (eflag_atom != 1)) - { + && (eflag_atom != 1)) { kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble( - pargs, - KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy, - reinterpret_cast(NULL)); - } - else if (KIM_SupportStatus_NotEqual(kim_model_support_for_particleEnergy, - KIM_SUPPORT_STATUS_notSupported)) - { + pargs, + KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy, + reinterpret_cast(NULL)); + } else if (KIM_SupportStatus_NotEqual(kim_model_support_for_particleEnergy, + KIM_SUPPORT_STATUS_notSupported)) { kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble( pargs, KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy, eatom); } // Set KIM pointer appropriately for forces if (KIM_SupportStatus_Equal(kim_model_support_for_forces, - KIM_SUPPORT_STATUS_notSupported)) - { + KIM_SUPPORT_STATUS_notSupported)) { kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble( - pargs, - KIM_COMPUTE_ARGUMENT_NAME_partialForces, - reinterpret_cast(NULL)); - } - else - { + pargs, + KIM_COMPUTE_ARGUMENT_NAME_partialForces, + reinterpret_cast(NULL)); + } else { kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble( pargs, KIM_COMPUTE_ARGUMENT_NAME_partialForces, &(atom->f[0][0])); } @@ -907,11 +849,9 @@ void PairKIM::set_argument_pointers() // Set KIM pointer appropriately for particleVirial if (KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, KIM_SUPPORT_STATUS_required) - && (vflag_atom != 1)) - { + && (vflag_atom != 1)) { // reallocate per-atom virial array if necessary - if (atom->nmax > maxeatom) - { + if (atom->nmax > maxeatom) { maxvatom = atom->nmax; memory->destroy(vatom); memory->create(vatom,comm->nthreads*maxvatom,6,"pair:vatom"); @@ -919,84 +859,72 @@ void PairKIM::set_argument_pointers() } if (KIM_SupportStatus_Equal(kim_model_support_for_particleVirial, KIM_SUPPORT_STATUS_optional) - && (vflag_atom != 1)) - { + && (vflag_atom != 1)) { kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble( - pargs, - KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial, - reinterpret_cast(NULL)); - } - else if (KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, - KIM_SUPPORT_STATUS_notSupported)) - { + pargs, + KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial, + reinterpret_cast(NULL)); + } else if (KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, + KIM_SUPPORT_STATUS_notSupported)) { kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble( - pargs, KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy, &(vatom[0][0])); + pargs, KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy, &(vatom[0][0])); } - if (kimerror) - { - error->all(FLERR,"Unable to set KIM argument pointers"); - } - - return; + if (kimerror) error->all(FLERR,"Unable to set KIM argument pointers"); } /* ---------------------------------------------------------------------- */ void PairKIM::set_lmps_flags() { - // determint if newton is on or off - lmps_using_newton = (force->newton_pair == 1); - - // determine if running with pair hybrid - if (force->pair_match("hybrid",0)) - { - error->all(FLERR,"pair_kim does not support hybrid"); - } - - // determine unit system and set lmps_units flag - if ((strcmp(update->unit_style,"real")==0)) { - lmps_units = REAL; - lengthUnit = KIM_LENGTH_UNIT_A; - energyUnit = KIM_ENERGY_UNIT_kcal_mol; - chargeUnit = KIM_CHARGE_UNIT_e; - temperatureUnit = KIM_TEMPERATURE_UNIT_K; - timeUnit = KIM_TIME_UNIT_fs; - } else if ((strcmp(update->unit_style,"metal")==0)) { - lmps_units = METAL; - lengthUnit = KIM_LENGTH_UNIT_A; - energyUnit = KIM_ENERGY_UNIT_eV; - chargeUnit = KIM_CHARGE_UNIT_e; - temperatureUnit = KIM_TEMPERATURE_UNIT_K; - timeUnit = KIM_TIME_UNIT_ps; - } else if ((strcmp(update->unit_style,"si")==0)) { - lmps_units = SI; - lengthUnit = KIM_LENGTH_UNIT_m; - energyUnit = KIM_ENERGY_UNIT_J; - chargeUnit = KIM_CHARGE_UNIT_C; - temperatureUnit = KIM_TEMPERATURE_UNIT_K; - timeUnit = KIM_TIME_UNIT_s; - } else if ((strcmp(update->unit_style,"cgs")==0)) { - lmps_units = CGS; - lengthUnit = KIM_LENGTH_UNIT_cm; - energyUnit = KIM_ENERGY_UNIT_erg; - chargeUnit = KIM_CHARGE_UNIT_statC; - temperatureUnit = KIM_TEMPERATURE_UNIT_K; - timeUnit = KIM_TIME_UNIT_s; - } else if ((strcmp(update->unit_style,"electron")==0)) { - lmps_units = ELECTRON; - lengthUnit = KIM_LENGTH_UNIT_Bohr; - energyUnit = KIM_ENERGY_UNIT_Hartree; - chargeUnit = KIM_CHARGE_UNIT_e; - temperatureUnit = KIM_TEMPERATURE_UNIT_K; - timeUnit = KIM_TIME_UNIT_fs; - } else if ((strcmp(update->unit_style,"lj")==0)) { - error->all(FLERR,"LAMMPS unit_style lj not supported by KIM models"); - } else { - error->all(FLERR,"Unknown unit_style"); - } - - return; + // determint if newton is on or off + lmps_using_newton = (force->newton_pair == 1); + + // determine if running with pair hybrid + if (force->pair_match("hybrid",0)) + error->all(FLERR,"pair_kim does not support hybrid"); + + // determine unit system and set lmps_units flag + if ((strcmp(update->unit_style,"real")==0)) { + lmps_units = REAL; + lengthUnit = KIM_LENGTH_UNIT_A; + energyUnit = KIM_ENERGY_UNIT_kcal_mol; + chargeUnit = KIM_CHARGE_UNIT_e; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_fs; + } else if ((strcmp(update->unit_style,"metal")==0)) { + lmps_units = METAL; + lengthUnit = KIM_LENGTH_UNIT_A; + energyUnit = KIM_ENERGY_UNIT_eV; + chargeUnit = KIM_CHARGE_UNIT_e; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_ps; + } else if ((strcmp(update->unit_style,"si")==0)) { + lmps_units = SI; + lengthUnit = KIM_LENGTH_UNIT_m; + energyUnit = KIM_ENERGY_UNIT_J; + chargeUnit = KIM_CHARGE_UNIT_C; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_s; + } else if ((strcmp(update->unit_style,"cgs")==0)) { + lmps_units = CGS; + lengthUnit = KIM_LENGTH_UNIT_cm; + energyUnit = KIM_ENERGY_UNIT_erg; + chargeUnit = KIM_CHARGE_UNIT_statC; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_s; + } else if ((strcmp(update->unit_style,"electron")==0)) { + lmps_units = ELECTRON; + lengthUnit = KIM_LENGTH_UNIT_Bohr; + energyUnit = KIM_ENERGY_UNIT_Hartree; + chargeUnit = KIM_CHARGE_UNIT_e; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_fs; + } else if ((strcmp(update->unit_style,"lj")==0)) { + error->all(FLERR,"LAMMPS unit_style lj not supported by KIM models"); + } else { + error->all(FLERR,"Unknown unit_style"); + } } /* ---------------------------------------------------------------------- */ @@ -1007,8 +935,7 @@ int PairKIM::check_for_routine_compatibility() int numberOfModelRoutineNames; KIM_MODEL_ROUTINE_NAME_GetNumberOfModelRoutineNames( &numberOfModelRoutineNames); - for (int i = 0; i < numberOfModelRoutineNames; ++i) - { + for (int i = 0; i < numberOfModelRoutineNames; ++i) { KIM_ModelRoutineName modelRoutineName; KIM_MODEL_ROUTINE_NAME_GetModelRoutineName(i, &modelRoutineName); @@ -1016,10 +943,9 @@ int PairKIM::check_for_routine_compatibility() int required; int error = KIM_Model_IsRoutinePresent( pkim, modelRoutineName, &present, &required); - if (error) { return true; } + if (error) return true; - if ((present == true) && (required == true)) - { + if ((present == true) && (required == true)) { if (!(KIM_ModelRoutineName_Equal(modelRoutineName, KIM_MODEL_ROUTINE_NAME_Create) || KIM_ModelRoutineName_Equal( @@ -1033,8 +959,9 @@ int PairKIM::check_for_routine_compatibility() modelRoutineName, KIM_MODEL_ROUTINE_NAME_ComputeArgumentsDestroy) || KIM_ModelRoutineName_Equal(modelRoutineName, - KIM_MODEL_ROUTINE_NAME_Destroy))) - { return true; } + KIM_MODEL_ROUTINE_NAME_Destroy))) { + return true; + } } } @@ -1049,8 +976,7 @@ void PairKIM::set_kim_model_has_flags() int numberOfComputeArgumentNames; KIM_COMPUTE_ARGUMENT_NAME_GetNumberOfComputeArgumentNames( &numberOfComputeArgumentNames); - for (int i = 0; i < numberOfComputeArgumentNames; ++i) - { + for (int i = 0; i < numberOfComputeArgumentNames; ++i) { KIM_ComputeArgumentName computeArgumentName; KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentName( i, &computeArgumentName); @@ -1059,32 +985,24 @@ void PairKIM::set_kim_model_has_flags() pargs, computeArgumentName, &supportStatus); if (KIM_ComputeArgumentName_Equal(computeArgumentName, - KIM_COMPUTE_ARGUMENT_NAME_partialEnergy) - ) + KIM_COMPUTE_ARGUMENT_NAME_partialEnergy)) kim_model_support_for_energy = supportStatus; else if (KIM_ComputeArgumentName_Equal( - computeArgumentName, KIM_COMPUTE_ARGUMENT_NAME_partialForces) - ) + computeArgumentName, KIM_COMPUTE_ARGUMENT_NAME_partialForces)) kim_model_support_for_forces = supportStatus; - else if - (KIM_ComputeArgumentName_Equal( - computeArgumentName, - KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy)\ - ) + else if (KIM_ComputeArgumentName_Equal( + computeArgumentName, + KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy)) kim_model_support_for_particleEnergy = supportStatus; - else if - (KIM_ComputeArgumentName_Equal( - computeArgumentName, - KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial) - ) + else if (KIM_ComputeArgumentName_Equal( + computeArgumentName, + KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial)) kim_model_support_for_particleVirial = supportStatus; - else if (KIM_SupportStatus_Equal(supportStatus, KIM_SUPPORT_STATUS_required) - ) - { - std::stringstream msg; - msg << "KIM Model requires unsupported compute argument: " - << KIM_ComputeArgumentName_ToString(computeArgumentName); - error->all(FLERR, msg.str().c_str()); + else if (KIM_SupportStatus_Equal(supportStatus, + KIM_SUPPORT_STATUS_required)) { + std::string msg("KIM Model requires unsupported compute argument: "); + msg += KIM_ComputeArgumentName_ToString(computeArgumentName); + error->all(FLERR, msg.c_str()); } } @@ -1111,20 +1029,15 @@ void PairKIM::set_kim_model_has_flags() int numberOfComputeCallbackNames; KIM_COMPUTE_CALLBACK_NAME_GetNumberOfComputeCallbackNames( &numberOfComputeCallbackNames); - for (int i = 0; i < numberOfComputeCallbackNames; ++i) - { + for (int i = 0; i < numberOfComputeCallbackNames; ++i) { KIM_ComputeCallbackName computeCallbackName; - KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName( - i, &computeCallbackName); + KIM_COMPUTE_CALLBACK_NAME_GetComputeCallbackName(i, &computeCallbackName); KIM_SupportStatus supportStatus; - KIM_ComputeArguments_GetCallbackSupportStatus( - pargs, computeCallbackName, &supportStatus); + KIM_ComputeArguments_GetCallbackSupportStatus(pargs, + computeCallbackName, + &supportStatus); if (KIM_SupportStatus_Equal(supportStatus, KIM_SUPPORT_STATUS_required)) - { error->all(FLERR,"KIM Model requires unsupported compute callback"); - } } - - return; } diff --git a/src/KIM/pair_kim.h b/src/KIM/pair_kim.h index dcfb4a8af0..37a6be1e5b 100644 --- a/src/KIM/pair_kim.h +++ b/src/KIM/pair_kim.h @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Contributing authors: Ryan S. Elliott (UMinn) + Contributing authors: Ryan S. Elliott (UMinn), Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- @@ -65,110 +65,115 @@ PairStyle(kim,PairKIM) // includes from KIM & LAMMPS class KIM_API_model; #include "pair.h" + extern "C" { #include "KIM_SimulatorHeaders.h" } #include "KIM_SimulatorModel.hpp" -#include - namespace LAMMPS_NS { - class PairKIM : public Pair { - public: - PairKIM(class LAMMPS*); - ~PairKIM(); - - // LAMMPS Pair class virtual function prototypes - virtual void compute(int, int); - virtual void settings(int, char**); - virtual void coeff(int, char**); - virtual void init_style(); - virtual void init_list(int id, NeighList *ptr); - virtual double init_one(int, int); - virtual int pack_reverse_comm(int, int, double*); - virtual void unpack_reverse_comm(int, int*, double*); - virtual double memory_usage(); - - protected: - // (nearly) all bool flags are not initialized in constructor, but set - // explicitly in the indicated function. All other data members are - // initialized in constructor - int settings_call_count; - int init_style_call_count; - - // values set in settings() - char* kim_modelname; - - // values set in coeff() - - // values set in allocate(), called by coeff() - virtual void allocate(); - int* lmps_map_species_to_unique; - - // values set in coeff(), after calling allocate() - char** lmps_unique_elements; // names of unique elements given - // in pair_coeff command - int lmps_num_unique_elements; - - // values set in set_lmps_flags(), called from init_style() - bool lmps_using_newton; - bool lmps_using_molecular; - enum unit_sys {REAL, METAL, SI, CGS, ELECTRON}; - unit_sys lmps_units; - KIM_LengthUnit lengthUnit; - KIM_EnergyUnit energyUnit; - KIM_ChargeUnit chargeUnit; - KIM_TemperatureUnit temperatureUnit; - KIM_TimeUnit timeUnit; - - KIM::SimulatorModel * simulatorModel; - KIM_Model * pkim; - KIM_ComputeArguments * pargs; - - // values set in set_kim_model_has_flags(), called by kim_init() - KIM_SupportStatus kim_model_support_for_energy; - KIM_SupportStatus kim_model_support_for_forces; - KIM_SupportStatus kim_model_support_for_particleEnergy; - KIM_SupportStatus kim_model_support_for_particleVirial; - - // values set in kim_init() - bool kim_init_ok; - int lmps_local_tot_num_atoms; - double kim_global_influence_distance; // KIM Model cutoff value - int kim_number_of_neighbor_lists; - double const * kim_cutoff_values; - int const * modelWillNotRequestNeighborsOfNoncontributingParticles; - class NeighList ** neighborLists; - - // values set in init_style() - bool kim_particle_codes_ok; - int *kim_particle_codes; - - // values set in compute() - int lmps_maxalloc; // max allocated memory value - int* kim_particleSpecies; // array of KIM particle species - int* kim_particleContributing; // array of KIM particle contributing - int* lmps_stripped_neigh_list; // neighbors of one atom, used when LAMMPS - // is in molecular mode - int** lmps_stripped_neigh_ptr; // pointer into lists - - // KIM specific helper functions - virtual void set_contributing(); - virtual void kim_init(); - virtual void kim_free(); - virtual void set_argument_pointers(); - virtual void set_lmps_flags(); - virtual void set_kim_model_has_flags(); - virtual int check_for_routine_compatibility(); - // static methods used as callbacks from KIM - static int get_neigh( - void const * const dataObject, - int const numberOfCutoffs, double const * const cutoffs, - int const neighborListIndex, int const particleNumber, - int * const numberOfNeighbors, - int const ** const neighborsOfParticle); - }; +class PairKIM : public Pair { + public: + PairKIM(class LAMMPS*); + ~PairKIM(); + + // LAMMPS Pair class virtual function prototypes + virtual void compute(int, int); + virtual void settings(int, char**); + virtual void coeff(int, char**); + virtual void init_style(); + virtual void init_list(int id, NeighList *ptr); + virtual double init_one(int, int); + virtual int pack_reverse_comm(int, int, double*); + virtual void unpack_reverse_comm(int, int*, double*); + virtual double memory_usage(); + + protected: + // (nearly) all bool flags are not initialized in constructor, but set + // explicitly in the indicated function. All other data members are + // initialized in constructor + int settings_call_count; + int init_style_call_count; + + // values set in settings() + char* kim_modelname; + + // values set in coeff() + + // values set in allocate(), called by coeff() + virtual void allocate(); + int* lmps_map_species_to_unique; + + // values set in coeff(), after calling allocate() + char** lmps_unique_elements; // names of unique elements given + // in pair_coeff command + int lmps_num_unique_elements; + + // values set in set_lmps_flags(), called from init_style() + bool lmps_using_newton; + bool lmps_using_molecular; + enum unit_sys {REAL, METAL, SI, CGS, ELECTRON}; + unit_sys lmps_units; + KIM_LengthUnit lengthUnit; + KIM_EnergyUnit energyUnit; + KIM_ChargeUnit chargeUnit; + KIM_TemperatureUnit temperatureUnit; + KIM_TimeUnit timeUnit; + + KIM::SimulatorModel * simulatorModel; + KIM_Model * pkim; + KIM_ComputeArguments * pargs; + + // values set in set_kim_model_has_flags(), called by kim_init() + KIM_SupportStatus kim_model_support_for_energy; + KIM_SupportStatus kim_model_support_for_forces; + KIM_SupportStatus kim_model_support_for_particleEnergy; + KIM_SupportStatus kim_model_support_for_particleVirial; + + // values set in kim_init() + bool kim_init_ok; + int lmps_local_tot_num_atoms; + double kim_global_influence_distance; // KIM Model cutoff value + int kim_number_of_neighbor_lists; + double const * kim_cutoff_values; + int const * modelWillNotRequestNeighborsOfNoncontributingParticles; + class NeighList ** neighborLists; + + // values set in init_style() + bool kim_particle_codes_ok; + int *kim_particle_codes; + + // values set in compute() + int lmps_maxalloc; // max allocated memory value + int* kim_particleSpecies; // array of KIM particle species + int* kim_particleContributing; // array of KIM particle contributing + int* lmps_stripped_neigh_list; // neighbors of one atom, used when LAMMPS + // is in molecular mode + int** lmps_stripped_neigh_ptr; // pointer into lists + + // LAMMPS Simulator model support + Pair *simulator_class; + char *simulator_style; + virtual void simulator_init(); + virtual void simulator_free(); + + // KIM specific helper functions + virtual void set_contributing(); + virtual void kim_init(); + virtual void kim_free(); + virtual void set_argument_pointers(); + virtual void set_lmps_flags(); + virtual void set_kim_model_has_flags(); + virtual int check_for_routine_compatibility(); + // static methods used as callbacks from KIM + static int get_neigh( + void const * const dataObject, + int const numberOfCutoffs, double const * const cutoffs, + int const neighborListIndex, int const particleNumber, + int * const numberOfNeighbors, + int const ** const neighborsOfParticle); +}; } #endif -- GitLab From 32379d2d840a7b5421823ba1f01aed68028d5c6b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 18 May 2019 21:07:15 -0400 Subject: [PATCH 003/236] add JSON tokenizer to utils library --- src/utils.cpp | 376 +++++++++++++++++++++++++++++++++++++++++++++++++- src/utils.h | 2 + 2 files changed, 376 insertions(+), 2 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index c3c173a73f..77ff8ef749 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -12,6 +12,8 @@ ------------------------------------------------------------------------- */ #include +#include +#include #include "utils.h" #include "error.h" @@ -46,9 +48,68 @@ extern "C" { - /** Match text against a (simplified) regular expression - * (regexp will be compiled automatically). */ +/** Match text against a (simplified) regular expression + * (regexp will be compiled automatically). */ static int re_match(const char *text, const char *pattern); + +/** + * JSON type identifier. Basic types are: + * o Object + * o Array + * o String + * o Other primitive: number, boolean (true/false) or null + */ + typedef enum { + JSMN_UNDEFINED = 0, + JSMN_OBJECT = 1, + JSMN_ARRAY = 2, + JSMN_STRING = 3, + JSMN_PRIMITIVE = 4 + } jsmntype_t; + + enum jsmnerr { + /* Not enough tokens were provided */ + JSMN_ERROR_NOMEM = -1, + /* Invalid character inside JSON string */ + JSMN_ERROR_INVAL = -2, + /* The string is not a full JSON packet, more bytes expected */ + JSMN_ERROR_PART = -3 + }; + +/** + * JSON token description. + * type type (object, array, string etc.) + * start start position in JSON data string + * end end position in JSON data string + */ + typedef struct { + jsmntype_t type; + int start; + int end; + int size; + } jsmntok_t; + +/** + * JSON parser. Contains an array of token blocks available. Also stores + * the string being parsed now and current position in that string + */ + typedef struct { + unsigned int pos; /* offset in the JSON string */ + unsigned int toknext; /* next token to allocate */ + int toksuper; /* superior token node, e.g parent object or array */ + } jsmn_parser; + +/** + * Create JSON parser over an array of tokens + */ + static void jsmn_init(jsmn_parser *parser); + +/** + * Run JSON parser. It parses a JSON data string into and array of tokens, each describing + * a single JSON object. + */ + static int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, + jsmntok_t *tokens, unsigned int num_tokens); } using namespace LAMMPS_NS; @@ -121,6 +182,72 @@ void utils::sfgets(const char *srcname, int srcline, char *s, int size, return; } + + +int utils::kim_simulator_json_parse(int argc, char **argv) +{ + FILE *fp; + jsmn_parser p; + jsmntok_t *tok; + char *buf; + size_t nbytes; + + if (argc != 2) { + printf("usage: %s \n",argv[0]); + return 1; + } + + // open JSON file + + fp = fopen(argv[1],"rb"); + if (!fp) { + perror("Error opening JSON file"); + return 2; + } + + // determine file size and allocate suitable buffer + + fseek(fp,0,SEEK_END); + long int flen = ftell(fp); + rewind(fp); + buf = new char[flen]; + nbytes = fread(buf,1,flen,fp); + fclose(fp); + + // parse once to count number of tokens + + jsmn_init(&p); + int ntok = jsmn_parse(&p,buf,nbytes,NULL,1); + if (ntok < 0) { + printf("failed to parse JSON: %d\n",ntok); + return 3; + } + + // allocate token storage and parse again + + jsmn_init(&p); + tok = new jsmntok_t[ntok]; + int retval = jsmn_parse(&p,buf,nbytes,tok,ntok); + if ((retval < 1) || (tok[0].type != JSMN_OBJECT)) { + printf("failed to parse JSON: no root object\n"); + return 4; + } + + for (int i=1; i < retval; ++i) { + printf("key: %.*s\n",tok[i].end-tok[i].start,buf+tok[i].start); + if (tok[i+1].type == JSMN_ARRAY) { + printf("value is array of size %d\n",tok[i+1].size); + i += tok[i+1].size + 1; + } else { + ++i; + } + } + + delete [] buf; + delete [] tok; + return 0; +} + /* ------------------------------------------------------------------ */ extern "C" { @@ -437,4 +564,249 @@ extern "C" { return 0; } + + +/** + * Allocates a fresh unused token from the token pool. + */ + static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, + jsmntok_t *tokens, size_t num_tokens) { + jsmntok_t *tok; + if (parser->toknext >= num_tokens) { + return NULL; + } + tok = &tokens[parser->toknext++]; + tok->start = tok->end = -1; + tok->size = 0; + return tok; + } + +/** + * Fills token type and boundaries. + */ + static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, + int start, int end) { + token->type = type; + token->start = start; + token->end = end; + token->size = 0; + } + +/** + * Fills next available token with JSON primitive. + */ + static int jsmn_parse_primitive(jsmn_parser *parser, const char *js, + size_t len, jsmntok_t *tokens, size_t num_tokens) { + jsmntok_t *token; + int start; + + start = parser->pos; + + for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { + switch (js[parser->pos]) { + case '\t' : case '\r' : case '\n' : case ' ' : + case ',' : case ']' : case '}' : + goto found; + } + if (js[parser->pos] < 32 || js[parser->pos] >= 127) { + parser->pos = start; + return JSMN_ERROR_INVAL; + } + } + + found: + if (tokens == NULL) { + parser->pos--; + return 0; + } + token = jsmn_alloc_token(parser, tokens, num_tokens); + if (token == NULL) { + parser->pos = start; + return JSMN_ERROR_NOMEM; + } + jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); + parser->pos--; + return 0; + } + +/** + * Fills next token with JSON string. + */ + static int jsmn_parse_string(jsmn_parser *parser, const char *js, + size_t len, jsmntok_t *tokens, size_t num_tokens) { + jsmntok_t *token; + + int start = parser->pos; + + parser->pos++; + + /* Skip starting quote */ + for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { + char c = js[parser->pos]; + + /* Quote: end of string */ + if (c == '\"') { + if (tokens == NULL) { + return 0; + } + token = jsmn_alloc_token(parser, tokens, num_tokens); + if (token == NULL) { + parser->pos = start; + return JSMN_ERROR_NOMEM; + } + jsmn_fill_token(token, JSMN_STRING, start+1, parser->pos); + return 0; + } + + /* Backslash: Quoted symbol expected */ + if (c == '\\' && parser->pos + 1 < len) { + int i; + parser->pos++; + switch (js[parser->pos]) { + /* Allowed escaped symbols */ + case '\"': case '/' : case '\\' : case 'b' : + case 'f' : case 'r' : case 'n' : case 't' : + break; + /* Allows escaped symbol \uXXXX */ + case 'u': + parser->pos++; + for(i = 0; i < 4 && parser->pos < len && js[parser->pos] != '\0'; i++) { + /* If it isn't a hex character we have an error */ + if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */ + (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */ + (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */ + parser->pos = start; + return JSMN_ERROR_INVAL; + } + parser->pos++; + } + parser->pos--; + break; + /* Unexpected symbol */ + default: + parser->pos = start; + return JSMN_ERROR_INVAL; + } + } + } + parser->pos = start; + return JSMN_ERROR_PART; + } + +/** + * Parse JSON string and fill tokens. + */ + int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, + jsmntok_t *tokens, unsigned int num_tokens) { + int r; + int i; + jsmntok_t *token; + int count = parser->toknext; + + for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { + char c; + jsmntype_t type; + + c = js[parser->pos]; + switch (c) { + case '{': case '[': + count++; + if (tokens == NULL) { + break; + } + token = jsmn_alloc_token(parser, tokens, num_tokens); + if (token == NULL) + return JSMN_ERROR_NOMEM; + if (parser->toksuper != -1) { + tokens[parser->toksuper].size++; + } + token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); + token->start = parser->pos; + parser->toksuper = parser->toknext - 1; + break; + case '}': case ']': + if (tokens == NULL) + break; + type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); + for (i = parser->toknext - 1; i >= 0; i--) { + token = &tokens[i]; + if (token->start != -1 && token->end == -1) { + if (token->type != type) { + return JSMN_ERROR_INVAL; + } + parser->toksuper = -1; + token->end = parser->pos + 1; + break; + } + } + /* Error if unmatched closing bracket */ + if (i == -1) return JSMN_ERROR_INVAL; + for (; i >= 0; i--) { + token = &tokens[i]; + if (token->start != -1 && token->end == -1) { + parser->toksuper = i; + break; + } + } + break; + case '\"': + r = jsmn_parse_string(parser, js, len, tokens, num_tokens); + if (r < 0) return r; + count++; + if (parser->toksuper != -1 && tokens != NULL) + tokens[parser->toksuper].size++; + break; + case '\t' : case '\r' : case '\n' : case ' ': + break; + case ':': + parser->toksuper = parser->toknext - 1; + break; + case ',': + if (tokens != NULL && parser->toksuper != -1 && + tokens[parser->toksuper].type != JSMN_ARRAY && + tokens[parser->toksuper].type != JSMN_OBJECT) { + for (i = parser->toknext - 1; i >= 0; i--) { + if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { + if (tokens[i].start != -1 && tokens[i].end == -1) { + parser->toksuper = i; + break; + } + } + } + } + break; + /* In non-strict mode every unquoted value is a primitive */ + default: + r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); + if (r < 0) return r; + count++; + if (parser->toksuper != -1 && tokens != NULL) + tokens[parser->toksuper].size++; + break; + + } + } + + if (tokens != NULL) { + for (i = parser->toknext - 1; i >= 0; i--) { + /* Unmatched opened object or array */ + if (tokens[i].start != -1 && tokens[i].end == -1) { + return JSMN_ERROR_PART; + } + } + } + + return count; + } + +/** + * Creates a new parser based over a given buffer with an array of tokens + * available. + */ + void jsmn_init(jsmn_parser *parser) { + parser->pos = 0; + parser->toknext = 0; + parser->toksuper = -1; + } } + diff --git a/src/utils.h b/src/utils.h index 2596fcd774..e908dcae81 100644 --- a/src/utils.h +++ b/src/utils.h @@ -66,6 +66,8 @@ namespace LAMMPS_NS { */ void sfgets(const char *srcname, int srcline, char *s, int size, FILE *fp, const char *filename, Error *error); + + int kim_simulator_json_parse(int argc, char **argv); } } -- GitLab From b779bf524afaf41e95ad4f9fb4fe7c622022825e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 19 May 2019 10:09:25 -0400 Subject: [PATCH 004/236] use KIM-API calls to query simulator model info --- src/KIM/pair_kim.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index d75d960355..fff84a1821 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -13,6 +13,7 @@ /* ---------------------------------------------------------------------- Contributing authors: Ryan S. Elliott (UMinn) + Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- @@ -61,6 +62,7 @@ #include "pair_kim.h" #include "atom.h" #include "comm.h" +#include "universe.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" @@ -132,6 +134,14 @@ PairKIM::~PairKIM() // clean up kim_modelname if (kim_modelname != 0) delete [] kim_modelname; + if (simulatorModel) { + KIM::SimulatorModel::Destroy(&simulatorModel); + + // clean up KIM interface (if necessary) + kim_free(); + return; + } + // clean up lammps atom species number to unique particle names mapping if (lmps_unique_elements) for (int i = 0; i < lmps_num_unique_elements; i++) @@ -330,9 +340,40 @@ void PairKIM::settings(int narg, char **arg) // initialize KIM Model kim_init(); - // initialize LAMMPS Simulator model + // Set up and initialize LAMMPS Simulator model + if (simulatorModel) { - printf("LAMMPS simulator model: %s\n",kim_modelname); + const std::string *sim_name, *sim_version; + simulatorModel->GetSimulatorName(&sim_name); + simulatorModel->GetSimulatorVersion(&sim_version); + + if (comm->me == 0) { + std::string mesg("Using KIM Simulator Model : "); + mesg += kim_modelname; + mesg += "\n"; + mesg += "For Simulator : "; + mesg += *sim_name + " " + *sim_version + "\n"; + mesg += "Running on : LAMMPS "; + mesg += universe->version; + mesg += "\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } + + if (*sim_name != "LAMMPS") + error->all(FLERR,"Incompatible KIM Simulator Model"); + + int sim_fields, sim_lines; + const std::string *sim_field, *sim_value; + simulatorModel->GetNumberOfSimulatorFields(&sim_fields); + printf("sim_fields=%d\n",sim_fields); + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + printf("i=%d: %s (%d)\n",i,sim_field->c_str(),sim_lines); +// for (int j=0; j < +// simulatorModel->GetSimulatorFieldLine(i, + } } } -- GitLab From 56cf97e4970508b42ef4842e6f0de9ecfc1a9618 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 20 May 2019 13:53:17 -0400 Subject: [PATCH 005/236] hard code creation of simulator model pair style for now --- src/KIM/pair_kim.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index fff84a1821..87a6d636d2 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -371,9 +371,25 @@ void PairKIM::settings(int narg, char **arg) for (int i=0; i < sim_fields; ++i) { simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); printf("i=%d: %s (%d)\n",i,sim_field->c_str(),sim_lines); -// for (int j=0; j < -// simulatorModel->GetSimulatorFieldLine(i, } + // hard code result for now: + + int dummy; + const char *simulator_style = (const char*)"tersoff/mod"; + simulator_class = force->new_pair(simulator_style,1,dummy); + if (simulator_class) { + if (comm->me == 0) { + std::string mesg("Created simulator pair style: "); + mesg += simulator_style; + mesg += "\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } + } else { + error->all(FLERR,"Failure to create simulator model pair style"); + } + simulator_class->settings(0,NULL); } } -- GitLab From 38a8c765f0974799a82cee1a185adff5f3eb06fc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 20 May 2019 22:54:20 -0400 Subject: [PATCH 006/236] add support species checking --- examples/kim/in.kim.simulator-model | 6 +-- src/KIM/pair_kim.cpp | 79 +++++++++++++++++++---------- 2 files changed, 54 insertions(+), 31 deletions(-) diff --git a/examples/kim/in.kim.simulator-model b/examples/kim/in.kim.simulator-model index 32baf9d78e..109711fffc 100644 --- a/examples/kim/in.kim.simulator-model +++ b/examples/kim/in.kim.simulator-model @@ -20,16 +20,16 @@ newton off lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} -create_box 1 box +create_box 2 box create_atoms 1 box #pair_style lj/cut 8.1500 #pair_coeff 1 1 0.0104 3.4000 pair_style kim ex_sim_model_Si_mod_tersoff -pair_coeff * * Ar +pair_coeff * * Si Si -mass 1 39.95 +mass * 39.95 velocity all create 200.0 232345 loop geom neighbor 0.3 bin diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 87a6d636d2..2ed9df0aed 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -344,6 +344,8 @@ void PairKIM::settings(int narg, char **arg) if (simulatorModel) { const std::string *sim_name, *sim_version; + std::string atom_type_sym_list; + simulatorModel->GetSimulatorName(&sim_name); simulatorModel->GetSimulatorVersion(&sim_version); @@ -363,33 +365,6 @@ void PairKIM::settings(int narg, char **arg) if (*sim_name != "LAMMPS") error->all(FLERR,"Incompatible KIM Simulator Model"); - - int sim_fields, sim_lines; - const std::string *sim_field, *sim_value; - simulatorModel->GetNumberOfSimulatorFields(&sim_fields); - printf("sim_fields=%d\n",sim_fields); - for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - printf("i=%d: %s (%d)\n",i,sim_field->c_str(),sim_lines); - } - // hard code result for now: - - int dummy; - const char *simulator_style = (const char*)"tersoff/mod"; - simulator_class = force->new_pair(simulator_style,1,dummy); - if (simulator_class) { - if (comm->me == 0) { - std::string mesg("Created simulator pair style: "); - mesg += simulator_style; - mesg += "\n"; - - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); - } - } else { - error->all(FLERR,"Failure to create simulator model pair style"); - } - simulator_class->settings(0,NULL); } } @@ -464,9 +439,57 @@ void PairKIM::coeff(int narg, char **arg) if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); if (simulatorModel) { - simulatorModel->AddTemplateMap("atom-type-sym-list", atom_type_sym_list); + simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); simulatorModel->CloseTemplateMap(); + int len = strlen(atom_type_sym_list.c_str())+1; + char *strbuf = new char[len]; + char *strword; + + int sim_num_species; + const std::string *sim_species; + simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); + for (int i=0; i < sim_num_species; ++i) { + simulatorModel->GetSupportedSpecies(i, &sim_species); + strcpy(strbuf,atom_type_sym_list.c_str()); + strword = strtok(strbuf," \t"); + while (strword) { + if (strcmp(sim_species->c_str(),strword) != 0) + error->all(FLERR,"Species not supported by KIM Simulator Model"); + strword = strtok(NULL," \t"); + } + } + + int sim_fields, sim_lines; + const std::string *sim_field, *sim_value; + simulatorModel->GetNumberOfSimulatorFields(&sim_fields); + if (comm->me==0) printf("sim_fields=%d\n",sim_fields); + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (comm->me==0) printf("field[%d]=%s\n",i,sim_field->c_str()); + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); + if (comm->me==0) printf("line %d: %s\n",j,sim_value->c_str()); + } + } + // hard code result for now: + + int dummy; + const char *simulator_style = (const char*)"tersoff/mod"; + simulator_class = force->new_pair(simulator_style,1,dummy); + if (simulator_class) { + if (comm->me == 0) { + std::string mesg("Created simulator pair style: "); + mesg += simulator_style; + mesg += "\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } + } else { + error->all(FLERR,"Failure to create simulator model pair style"); + } + simulator_class->settings(0,NULL); error->all(FLERR,(simulatorModel->ToString()).c_str()); } else { // setup mapping between LAMMPS unique elements and KIM species codes -- GitLab From 92b042552e4de87631b5a6a848209a24945f2cac Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 20 May 2019 22:54:33 -0400 Subject: [PATCH 007/236] Revert "add JSON tokenizer to utils library" This reverts commit 32379d2d840a7b5421823ba1f01aed68028d5c6b. --- src/utils.cpp | 376 +------------------------------------------------- src/utils.h | 2 - 2 files changed, 2 insertions(+), 376 deletions(-) diff --git a/src/utils.cpp b/src/utils.cpp index 77ff8ef749..c3c173a73f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include -#include #include "utils.h" #include "error.h" @@ -48,68 +46,9 @@ extern "C" { -/** Match text against a (simplified) regular expression - * (regexp will be compiled automatically). */ + /** Match text against a (simplified) regular expression + * (regexp will be compiled automatically). */ static int re_match(const char *text, const char *pattern); - -/** - * JSON type identifier. Basic types are: - * o Object - * o Array - * o String - * o Other primitive: number, boolean (true/false) or null - */ - typedef enum { - JSMN_UNDEFINED = 0, - JSMN_OBJECT = 1, - JSMN_ARRAY = 2, - JSMN_STRING = 3, - JSMN_PRIMITIVE = 4 - } jsmntype_t; - - enum jsmnerr { - /* Not enough tokens were provided */ - JSMN_ERROR_NOMEM = -1, - /* Invalid character inside JSON string */ - JSMN_ERROR_INVAL = -2, - /* The string is not a full JSON packet, more bytes expected */ - JSMN_ERROR_PART = -3 - }; - -/** - * JSON token description. - * type type (object, array, string etc.) - * start start position in JSON data string - * end end position in JSON data string - */ - typedef struct { - jsmntype_t type; - int start; - int end; - int size; - } jsmntok_t; - -/** - * JSON parser. Contains an array of token blocks available. Also stores - * the string being parsed now and current position in that string - */ - typedef struct { - unsigned int pos; /* offset in the JSON string */ - unsigned int toknext; /* next token to allocate */ - int toksuper; /* superior token node, e.g parent object or array */ - } jsmn_parser; - -/** - * Create JSON parser over an array of tokens - */ - static void jsmn_init(jsmn_parser *parser); - -/** - * Run JSON parser. It parses a JSON data string into and array of tokens, each describing - * a single JSON object. - */ - static int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, - jsmntok_t *tokens, unsigned int num_tokens); } using namespace LAMMPS_NS; @@ -182,72 +121,6 @@ void utils::sfgets(const char *srcname, int srcline, char *s, int size, return; } - - -int utils::kim_simulator_json_parse(int argc, char **argv) -{ - FILE *fp; - jsmn_parser p; - jsmntok_t *tok; - char *buf; - size_t nbytes; - - if (argc != 2) { - printf("usage: %s \n",argv[0]); - return 1; - } - - // open JSON file - - fp = fopen(argv[1],"rb"); - if (!fp) { - perror("Error opening JSON file"); - return 2; - } - - // determine file size and allocate suitable buffer - - fseek(fp,0,SEEK_END); - long int flen = ftell(fp); - rewind(fp); - buf = new char[flen]; - nbytes = fread(buf,1,flen,fp); - fclose(fp); - - // parse once to count number of tokens - - jsmn_init(&p); - int ntok = jsmn_parse(&p,buf,nbytes,NULL,1); - if (ntok < 0) { - printf("failed to parse JSON: %d\n",ntok); - return 3; - } - - // allocate token storage and parse again - - jsmn_init(&p); - tok = new jsmntok_t[ntok]; - int retval = jsmn_parse(&p,buf,nbytes,tok,ntok); - if ((retval < 1) || (tok[0].type != JSMN_OBJECT)) { - printf("failed to parse JSON: no root object\n"); - return 4; - } - - for (int i=1; i < retval; ++i) { - printf("key: %.*s\n",tok[i].end-tok[i].start,buf+tok[i].start); - if (tok[i+1].type == JSMN_ARRAY) { - printf("value is array of size %d\n",tok[i+1].size); - i += tok[i+1].size + 1; - } else { - ++i; - } - } - - delete [] buf; - delete [] tok; - return 0; -} - /* ------------------------------------------------------------------ */ extern "C" { @@ -564,249 +437,4 @@ extern "C" { return 0; } - - -/** - * Allocates a fresh unused token from the token pool. - */ - static jsmntok_t *jsmn_alloc_token(jsmn_parser *parser, - jsmntok_t *tokens, size_t num_tokens) { - jsmntok_t *tok; - if (parser->toknext >= num_tokens) { - return NULL; - } - tok = &tokens[parser->toknext++]; - tok->start = tok->end = -1; - tok->size = 0; - return tok; - } - -/** - * Fills token type and boundaries. - */ - static void jsmn_fill_token(jsmntok_t *token, jsmntype_t type, - int start, int end) { - token->type = type; - token->start = start; - token->end = end; - token->size = 0; - } - -/** - * Fills next available token with JSON primitive. - */ - static int jsmn_parse_primitive(jsmn_parser *parser, const char *js, - size_t len, jsmntok_t *tokens, size_t num_tokens) { - jsmntok_t *token; - int start; - - start = parser->pos; - - for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { - switch (js[parser->pos]) { - case '\t' : case '\r' : case '\n' : case ' ' : - case ',' : case ']' : case '}' : - goto found; - } - if (js[parser->pos] < 32 || js[parser->pos] >= 127) { - parser->pos = start; - return JSMN_ERROR_INVAL; - } - } - - found: - if (tokens == NULL) { - parser->pos--; - return 0; - } - token = jsmn_alloc_token(parser, tokens, num_tokens); - if (token == NULL) { - parser->pos = start; - return JSMN_ERROR_NOMEM; - } - jsmn_fill_token(token, JSMN_PRIMITIVE, start, parser->pos); - parser->pos--; - return 0; - } - -/** - * Fills next token with JSON string. - */ - static int jsmn_parse_string(jsmn_parser *parser, const char *js, - size_t len, jsmntok_t *tokens, size_t num_tokens) { - jsmntok_t *token; - - int start = parser->pos; - - parser->pos++; - - /* Skip starting quote */ - for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { - char c = js[parser->pos]; - - /* Quote: end of string */ - if (c == '\"') { - if (tokens == NULL) { - return 0; - } - token = jsmn_alloc_token(parser, tokens, num_tokens); - if (token == NULL) { - parser->pos = start; - return JSMN_ERROR_NOMEM; - } - jsmn_fill_token(token, JSMN_STRING, start+1, parser->pos); - return 0; - } - - /* Backslash: Quoted symbol expected */ - if (c == '\\' && parser->pos + 1 < len) { - int i; - parser->pos++; - switch (js[parser->pos]) { - /* Allowed escaped symbols */ - case '\"': case '/' : case '\\' : case 'b' : - case 'f' : case 'r' : case 'n' : case 't' : - break; - /* Allows escaped symbol \uXXXX */ - case 'u': - parser->pos++; - for(i = 0; i < 4 && parser->pos < len && js[parser->pos] != '\0'; i++) { - /* If it isn't a hex character we have an error */ - if(!((js[parser->pos] >= 48 && js[parser->pos] <= 57) || /* 0-9 */ - (js[parser->pos] >= 65 && js[parser->pos] <= 70) || /* A-F */ - (js[parser->pos] >= 97 && js[parser->pos] <= 102))) { /* a-f */ - parser->pos = start; - return JSMN_ERROR_INVAL; - } - parser->pos++; - } - parser->pos--; - break; - /* Unexpected symbol */ - default: - parser->pos = start; - return JSMN_ERROR_INVAL; - } - } - } - parser->pos = start; - return JSMN_ERROR_PART; - } - -/** - * Parse JSON string and fill tokens. - */ - int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, - jsmntok_t *tokens, unsigned int num_tokens) { - int r; - int i; - jsmntok_t *token; - int count = parser->toknext; - - for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { - char c; - jsmntype_t type; - - c = js[parser->pos]; - switch (c) { - case '{': case '[': - count++; - if (tokens == NULL) { - break; - } - token = jsmn_alloc_token(parser, tokens, num_tokens); - if (token == NULL) - return JSMN_ERROR_NOMEM; - if (parser->toksuper != -1) { - tokens[parser->toksuper].size++; - } - token->type = (c == '{' ? JSMN_OBJECT : JSMN_ARRAY); - token->start = parser->pos; - parser->toksuper = parser->toknext - 1; - break; - case '}': case ']': - if (tokens == NULL) - break; - type = (c == '}' ? JSMN_OBJECT : JSMN_ARRAY); - for (i = parser->toknext - 1; i >= 0; i--) { - token = &tokens[i]; - if (token->start != -1 && token->end == -1) { - if (token->type != type) { - return JSMN_ERROR_INVAL; - } - parser->toksuper = -1; - token->end = parser->pos + 1; - break; - } - } - /* Error if unmatched closing bracket */ - if (i == -1) return JSMN_ERROR_INVAL; - for (; i >= 0; i--) { - token = &tokens[i]; - if (token->start != -1 && token->end == -1) { - parser->toksuper = i; - break; - } - } - break; - case '\"': - r = jsmn_parse_string(parser, js, len, tokens, num_tokens); - if (r < 0) return r; - count++; - if (parser->toksuper != -1 && tokens != NULL) - tokens[parser->toksuper].size++; - break; - case '\t' : case '\r' : case '\n' : case ' ': - break; - case ':': - parser->toksuper = parser->toknext - 1; - break; - case ',': - if (tokens != NULL && parser->toksuper != -1 && - tokens[parser->toksuper].type != JSMN_ARRAY && - tokens[parser->toksuper].type != JSMN_OBJECT) { - for (i = parser->toknext - 1; i >= 0; i--) { - if (tokens[i].type == JSMN_ARRAY || tokens[i].type == JSMN_OBJECT) { - if (tokens[i].start != -1 && tokens[i].end == -1) { - parser->toksuper = i; - break; - } - } - } - } - break; - /* In non-strict mode every unquoted value is a primitive */ - default: - r = jsmn_parse_primitive(parser, js, len, tokens, num_tokens); - if (r < 0) return r; - count++; - if (parser->toksuper != -1 && tokens != NULL) - tokens[parser->toksuper].size++; - break; - - } - } - - if (tokens != NULL) { - for (i = parser->toknext - 1; i >= 0; i--) { - /* Unmatched opened object or array */ - if (tokens[i].start != -1 && tokens[i].end == -1) { - return JSMN_ERROR_PART; - } - } - } - - return count; - } - -/** - * Creates a new parser based over a given buffer with an array of tokens - * available. - */ - void jsmn_init(jsmn_parser *parser) { - parser->pos = 0; - parser->toknext = 0; - parser->toksuper = -1; - } } - diff --git a/src/utils.h b/src/utils.h index e908dcae81..2596fcd774 100644 --- a/src/utils.h +++ b/src/utils.h @@ -66,8 +66,6 @@ namespace LAMMPS_NS { */ void sfgets(const char *srcname, int srcline, char *s, int size, FILE *fp, const char *filename, Error *error); - - int kim_simulator_json_parse(int argc, char **argv); } } -- GitLab From 1e2ceb88daa631e50d68d79c581193a8bd52bdad Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 21 May 2019 15:57:14 -0400 Subject: [PATCH 008/236] complete basic simulator model proxy class creation and setup. --- src/KIM/pair_kim.cpp | 118 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 96 insertions(+), 22 deletions(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 2ed9df0aed..626b7ccb1c 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -64,6 +64,7 @@ #include "comm.h" #include "universe.h" #include "force.h" +#include "input.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" @@ -71,6 +72,7 @@ #include "memory.h" #include "domain.h" #include "error.h" +#include "utils.h" using namespace LAMMPS_NS; @@ -136,6 +138,7 @@ PairKIM::~PairKIM() if (simulatorModel) { KIM::SimulatorModel::Destroy(&simulatorModel); + delete simulator_class; // clean up KIM interface (if necessary) kim_free(); @@ -446,6 +449,8 @@ void PairKIM::coeff(int narg, char **arg) char *strbuf = new char[len]; char *strword; + // validate species selection + int sim_num_species; const std::string *sim_species; simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); @@ -454,7 +459,7 @@ void PairKIM::coeff(int narg, char **arg) strcpy(strbuf,atom_type_sym_list.c_str()); strword = strtok(strbuf," \t"); while (strword) { - if (strcmp(sim_species->c_str(),strword) != 0) + if ((strcmp(strword,"NULL") != 0) && (strcmp(sim_species->c_str(),strword) != 0)) error->all(FLERR,"Species not supported by KIM Simulator Model"); strword = strtok(NULL," \t"); } @@ -463,33 +468,102 @@ void PairKIM::coeff(int narg, char **arg) int sim_fields, sim_lines; const std::string *sim_field, *sim_value; simulatorModel->GetNumberOfSimulatorFields(&sim_fields); - if (comm->me==0) printf("sim_fields=%d\n",sim_fields); for (int i=0; i < sim_fields; ++i) { simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (comm->me==0) printf("field[%d]=%s\n",i,sim_field->c_str()); - for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); - if (comm->me==0) printf("line %d: %s\n",j,sim_value->c_str()); + if (*sim_field == "units") { + simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); + if (*sim_value != update->unit_style) + error->all(FLERR,"Incompatible units for KIM Simulator Model"); + break; + } + } + + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "model-init") { + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); + input->one(sim_value->c_str()); + } + break; + } + } + + int sim_model_idx=-1; + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "model-defn") { + sim_model_idx = i; + break; } } - // hard code result for now: - - int dummy; - const char *simulator_style = (const char*)"tersoff/mod"; - simulator_class = force->new_pair(simulator_style,1,dummy); - if (simulator_class) { - if (comm->me == 0) { - std::string mesg("Created simulator pair style: "); - mesg += simulator_style; - mesg += "\n"; - - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); + + if (sim_model_idx < 0) + error->all(FLERR,"KIM Simulator Model has no Model definition"); + else { + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); + if (utils::strmatch(*sim_value,"^pair_style")) { + char *ptr,*sim_style; + char *style_args[64]; + int style_narg = 0; + int len = strlen(sim_value->c_str())+1; + char *stylecmd = new char[len]; + strcpy(stylecmd,sim_value->c_str()); + + // ignore first word (pair_style) + strtok(stylecmd," \t"); + ptr = sim_style = strtok(NULL," \t"); + while (ptr && (style_narg < 63)) { + ptr = strtok(NULL," \t"); + if (!ptr) break; + style_args[style_narg] = ptr; + ++style_narg; + } + + int dummy; + delete simulator_class; + simulator_class = force->new_pair(sim_style,1,dummy); + if (simulator_class) { + if (comm->me == 0) { + std::string mesg("Created KIM Simulator Model pair style: "); + mesg += sim_style; + mesg += "\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } + } else { + error->all(FLERR,"Failure to create simulator model pair style"); + } + simulator_class->settings(style_narg,style_args); + delete[] stylecmd; + } + } + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); + if (utils::strmatch(*sim_value,"^pair_coeff")) { + char *ptr; + char *coeff_args[64]; + int coeff_narg = 0; + int len = strlen(sim_value->c_str())+1; + char *coeffcmd = new char[len]; + strcpy(coeffcmd,sim_value->c_str()); + + // ignore first word (pair_coeff) + strtok(coeffcmd," \t"); + ptr = strtok(NULL," \t"); + while (ptr && (coeff_narg < 63)) { + coeff_args[coeff_narg] = ptr; + ++coeff_narg; + ptr = strtok(NULL," \t"); + } + + simulator_class->coeff(coeff_narg,coeff_args); + delete[] coeffcmd; + } } - } else { - error->all(FLERR,"Failure to create simulator model pair style"); } - simulator_class->settings(0,NULL); error->all(FLERR,(simulatorModel->ToString()).c_str()); } else { // setup mapping between LAMMPS unique elements and KIM species codes -- GitLab From ce46d52c8a9ab27383d797fc29c9108f4ed59ccd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 May 2019 10:23:26 -0400 Subject: [PATCH 009/236] add new 'kim_style' command as front end for KIM simulator (and regular) models --- examples/kim/in.kim.simulator-model | 4 +- src/KIM/fix_store_kim.cpp | 127 ++++++++++++ src/KIM/fix_store_kim.h | 98 ++++++++++ src/KIM/kim_query.cpp | 1 - src/KIM/kim_style.cpp | 286 ++++++++++++++++++++++++++++ src/KIM/kim_style.h | 87 +++++++++ src/modify.cpp | 2 +- 7 files changed, 600 insertions(+), 5 deletions(-) create mode 100644 src/KIM/fix_store_kim.cpp create mode 100644 src/KIM/fix_store_kim.h create mode 100644 src/KIM/kim_style.cpp create mode 100644 src/KIM/kim_style.h diff --git a/examples/kim/in.kim.simulator-model b/examples/kim/in.kim.simulator-model index 109711fffc..1e6e9dec89 100644 --- a/examples/kim/in.kim.simulator-model +++ b/examples/kim/in.kim.simulator-model @@ -16,7 +16,6 @@ variable zz equal 20*$z units metal atom_style atomic -newton off lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} @@ -26,8 +25,7 @@ create_atoms 1 box #pair_style lj/cut 8.1500 #pair_coeff 1 1 0.0104 3.4000 -pair_style kim ex_sim_model_Si_mod_tersoff -pair_coeff * * Si Si +kim_style define ex_sim_model_Si_mod_tersoff Si Si mass * 39.95 velocity all create 200.0 232345 loop geom diff --git a/src/KIM/fix_store_kim.cpp b/src/KIM/fix_store_kim.cpp new file mode 100644 index 0000000000..8e9946c20d --- /dev/null +++ b/src/KIM/fix_store_kim.cpp @@ -0,0 +1,127 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Axel Kohlmeyer (Temple U), + Ryan S. Elliott (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.0.2 (and newer) package +------------------------------------------------------------------------- */ + +#include +#include "fix_store_kim.h" +#include "KIM_SimulatorModel.hpp" +#include "error.h" + +using namespace LAMMPS_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- */ + +FixStoreKIM::FixStoreKIM(LAMMPS *lmp, int narg, char **arg) + : Fix(lmp, narg, arg), simulator_model(NULL), model_name(NULL) +{ + if (narg != 3) error->all(FLERR,"Illegal fix STORE/KIM command"); +} + +/* ---------------------------------------------------------------------- */ + +FixStoreKIM::~FixStoreKIM() +{ + // free associated storage + + if (simulator_model) { + KIM::SimulatorModel *sm = (KIM::SimulatorModel *)simulator_model; + KIM::SimulatorModel::Destroy(&sm); + simulator_model = NULL; + } + + if (model_name) { + char *mn = (char *)model_name; + delete[] mn; + model_name = NULL; + } +} + +/* ---------------------------------------------------------------------- */ + +int FixStoreKIM::setmask() +{ + int mask = 0; + return mask; +} + + +/* ---------------------------------------------------------------------- */ + +void FixStoreKIM::setptr(const char *name, void *ptr) +{ + if (strcmp(name,"simulator_model") == 0) { + if (simulator_model) { + KIM::SimulatorModel *sm = (KIM::SimulatorModel *)simulator_model; + KIM::SimulatorModel::Destroy(&sm); + } + simulator_model = ptr; + } else if (strcmp(name,"model_name") == 0) { + if (model_name) { + char *mn = (char *)model_name; + delete[] mn; + } + model_name = ptr; + } +} + +/* ---------------------------------------------------------------------- */ + +void *FixStoreKIM::getptr(const char *name) +{ + if (strcmp(name,"simulator_model") == 0) return simulator_model; + else if (strcmp(name,"model_name") == 0) return model_name; + else return NULL; +} diff --git a/src/KIM/fix_store_kim.h b/src/KIM/fix_store_kim.h new file mode 100644 index 0000000000..04081fd6dc --- /dev/null +++ b/src/KIM/fix_store_kim.h @@ -0,0 +1,98 @@ +/* -*- c++ -*- ---------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Axel Kohlmeyer (Temple U), + Ryan S. Elliott (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.0.2 (and newer) package +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(STORE/KIM,FixStoreKIM) + +#else + +#ifndef LMP_FIX_STORE_KIM_H +#define LMP_FIX_STORE_KIM_H + +#include +#include "fix.h" + +namespace LAMMPS_NS { + +class FixStoreKIM : public Fix { + public: + FixStoreKIM(class LAMMPS *, int, char **); + ~FixStoreKIM(); + int setmask(); + + void setptr(const char *, void *); + void *getptr(const char *); + + private: + void *simulator_model; // pointer to KIM simulator model class + void *model_name; // string of KIM model name +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index fedc976110..e4818abc94 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - /* ---------------------------------------------------------------------- Contributing authors: Axel Kohlmeyer (Temple U), Ryan S. Elliott (UMN) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp new file mode 100644 index 0000000000..865f6827ab --- /dev/null +++ b/src/KIM/kim_style.cpp @@ -0,0 +1,286 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Axel Kohlmeyer (Temple U), + Ryan S. Elliott (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.0.2 (and newer) package +------------------------------------------------------------------------- */ + +#include +#include +#include "kim_style.h" +#include "error.h" +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "modify.h" +#include "update.h" +#include "universe.h" +#include "input.h" +#include "fix_store_kim.h" + +#include "KIM_SimulatorModel.hpp" + + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void KimStyle::command(int narg, char **arg) +{ + if (narg < 2) error->all(FLERR,"Illegal kim_style command"); + + if (strcmp(arg[0],"init") == 0) { + if (narg > 2) error->all(FLERR,"Illegal kim_style init command"); + if (domain->box_exist) + error->all(FLERR,"Must use 'kim_style init' command before " + "simulation box is defined"); + int len = strlen(arg[1])+1; + char *model = new char[len]; + strcpy(model,arg[1]); + do_init(model); + } else if (strcmp(arg[0],"define") == 0) { + if (!domain->box_exist) + error->all(FLERR,"Must use 'kim_style define' command after " + "simulation box is defined"); + do_defn(narg-1,arg+1); + } else error->all(FLERR,"Illegal kim_style command"); +} + + +/* ---------------------------------------------------------------------- */ + +void KimStyle::do_init(char *model) +{ + // create storage proxy fix. delete existing fix, if needed. + + int ifix = modify->find_fix("KIM_MODEL_STORE"); + if (ifix >= 0) modify->delete_fix(ifix); + input->one("fix KIM_MODEL_STORE all STORE/KIM"); + ifix = modify->find_fix("KIM_MODEL_STORE"); + + FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; + fix_store->setptr("model_name", (void *) model); + + int kimerror; + KIM::SimulatorModel * simulatorModel; + kimerror = KIM::SimulatorModel::Create(model,&simulatorModel); + + // not a Kim Simulator Model; nothing else to do here. + if (kimerror) return; + + fix_store->setptr("simulator_model", (void *) simulatorModel); + + // need to call this to have access to (some) simulator model init data. + simulatorModel->CloseTemplateMap(); + + int sim_fields, sim_lines; + const std::string *sim_field, *sim_value; + simulatorModel->GetNumberOfSimulatorFields(&sim_fields); + + // set units + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "units") { + simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); + std::string cmd("units "); + cmd += *sim_value; + input->one(cmd.c_str()); + break; + } + } + + // init model + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "model-init") { + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); + input->one(sim_value->c_str()); + } + break; + } + } + + // reset template map. + simulatorModel->ClearTemplateMap(); +} + +/* ---------------------------------------------------------------------- */ + +void KimStyle::do_defn(int narg, char **arg) +{ + if (narg != atom->ntypes + 1) + error->all(FLERR,"Incorrect number of arguments for kim_style define command"); + + char *model = arg[0]; + KIM::SimulatorModel *simulatorModel(NULL); + int kimerror; + + // check if we had a kim_style init command by finding fix STORE/KIM + // retrieve model name and pointer to simulator model class instance. + // validate model name if not given as NULL. + // if kim_style init wasn't run try to initialize simulator model now. + + int ifix = modify->find_fix("KIM_MODEL_STORE"); + if (ifix >= 0) { + FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; + if (strcmp(model,"NULL") == 0) + model = (char *)fix_store->getptr("model_name"); + else if (strcmp(model,(const char*)fix_store->getptr("model_name")) != 0) + error->all(FLERR,"Inconsistent KIM model name"); + + simulatorModel = (KIM::SimulatorModel *)fix_store->getptr("simulator_model"); + } else { + + kimerror = KIM::SimulatorModel::Create(model,&simulatorModel); + if (kimerror) simulatorModel = NULL; + } + + if (simulatorModel) { + + const std::string *sim_name, *sim_version; + std::string atom_type_sym_list; + + simulatorModel->GetSimulatorName(&sim_name); + simulatorModel->GetSimulatorVersion(&sim_version); + + if (comm->me == 0) { + std::string mesg("Using KIM Simulator Model : "); + mesg += model; + mesg += "\n"; + mesg += "For Simulator : "; + mesg += *sim_name + " " + *sim_version + "\n"; + mesg += "Running on : LAMMPS "; + mesg += universe->version; + mesg += "\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } + + if (*sim_name != "LAMMPS") + error->all(FLERR,"Incompatible KIM Simulator Model"); + + for (int i = 1; i < narg; i++) + atom_type_sym_list += std::string(" ") + arg[i]; + + simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); + simulatorModel->CloseTemplateMap(); + + int len = strlen(atom_type_sym_list.c_str())+1; + char *strbuf = new char[len]; + char *strword; + + // validate species selection + + int sim_num_species; + const std::string *sim_species; + simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); + for (int i=0; i < sim_num_species; ++i) { + simulatorModel->GetSupportedSpecies(i, &sim_species); + strcpy(strbuf,atom_type_sym_list.c_str()); + strword = strtok(strbuf," \t"); + while (strword) { + if ((strcmp(strword,"NULL") != 0) && (strcmp(sim_species->c_str(),strword) != 0)) + error->all(FLERR,"Species not supported by KIM Simulator Model"); + strword = strtok(NULL," \t"); + } + } + delete[] strbuf; + + int sim_fields, sim_lines; + const std::string *sim_field, *sim_value; + simulatorModel->GetNumberOfSimulatorFields(&sim_fields); + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "units") { + simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); + if (*sim_value != update->unit_style) + error->all(FLERR,"Incompatible units for KIM Simulator Model"); + break; + } + } + + int sim_model_idx=-1; + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "model-defn") { + sim_model_idx = i; + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); + input->one(sim_value->c_str()); + } + } + } + + if (sim_model_idx < 0) + error->all(FLERR,"KIM Simulator Model has no Model definition"); + + } else { + + // not a simulator model. issue pair_style and pair_coeff commands. + // NOTE: all references to arg must appear before calls to input->one() + // as that will reset the argument vector. + + std::string cmd1("pair_style kim "); + cmd1 += model; + + std::string cmd2("pair_coeff * * "); + for (int i=1; i < narg; ++i) { + cmd2 += arg[i]; + cmd2 += " "; + } + + input->one(cmd1.c_str()); + input->one(cmd2.c_str()); + } +} diff --git a/src/KIM/kim_style.h b/src/KIM/kim_style.h new file mode 100644 index 0000000000..588de6e620 --- /dev/null +++ b/src/KIM/kim_style.h @@ -0,0 +1,87 @@ +/* -*- c++ -*- ---------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Axel Kohlmeyer (Temple U), + Ryan S. Elliott (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.0.2 (and newer) package +------------------------------------------------------------------------- */ + +#ifdef COMMAND_CLASS + +CommandStyle(kim_style,KimStyle) + +#else + +#ifndef LMP_KIM_STYLE_H +#define LMP_KIM_STYLE_H + +#include "pointers.h" + +namespace LAMMPS_NS { + +class KimStyle : protected Pointers { + public: + KimStyle(class LAMMPS *lmp) : Pointers(lmp) {}; + void command(int, char **); + private: + void do_init(char *); + void do_defn(int, char **); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + + +*/ diff --git a/src/modify.cpp b/src/modify.cpp index 7f43f035d2..9f0457c9d0 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -793,7 +793,7 @@ void Modify::add_fix(int narg, char **arg, int trysuffix) const char *exceptions[] = {"GPU", "OMP", "INTEL", "property/atom", "cmap", "cmap3", "rx", - "deprecated", NULL}; + "deprecated", "STORE/KIM", NULL}; if (domain->box_exist == 0) { int m; -- GitLab From b91b3c18cffff347ca58f2d5cdef7052adf5875b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 May 2019 11:52:38 -0400 Subject: [PATCH 010/236] remove references to simulator models from pair style kim --- src/KIM/pair_kim.cpp | 269 ++++++------------------------------------- src/KIM/pair_kim.h | 13 +-- 2 files changed, 41 insertions(+), 241 deletions(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 626b7ccb1c..6251ebb6c7 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -92,7 +92,6 @@ PairKIM::PairKIM(LAMMPS *lmp) : chargeUnit(KIM_CHARGE_UNIT_unused), temperatureUnit(KIM_TEMPERATURE_UNIT_unused), timeUnit(KIM_TIME_UNIT_unused), - simulatorModel(NULL), pkim(NULL), pargs(NULL), kim_model_support_for_energy(KIM_SUPPORT_STATUS_notSupported), @@ -110,9 +109,7 @@ PairKIM::PairKIM(LAMMPS *lmp) : kim_particleSpecies(NULL), kim_particleContributing(NULL), lmps_stripped_neigh_list(NULL), - lmps_stripped_neigh_ptr(NULL), - simulator_class(NULL), - simulator_style(NULL) + lmps_stripped_neigh_ptr(NULL) { // Initialize Pair data members to appropriate values single_enable = 0; // We do not provide the Single() function @@ -136,15 +133,6 @@ PairKIM::~PairKIM() // clean up kim_modelname if (kim_modelname != 0) delete [] kim_modelname; - if (simulatorModel) { - KIM::SimulatorModel::Destroy(&simulatorModel); - delete simulator_class; - - // clean up KIM interface (if necessary) - kim_free(); - return; - } - // clean up lammps atom species number to unique particle names mapping if (lmps_unique_elements) for (int i = 0; i < lmps_num_unique_elements; i++) @@ -342,33 +330,6 @@ void PairKIM::settings(int narg, char **arg) // initialize KIM Model kim_init(); - - // Set up and initialize LAMMPS Simulator model - - if (simulatorModel) { - const std::string *sim_name, *sim_version; - std::string atom_type_sym_list; - - simulatorModel->GetSimulatorName(&sim_name); - simulatorModel->GetSimulatorVersion(&sim_version); - - if (comm->me == 0) { - std::string mesg("Using KIM Simulator Model : "); - mesg += kim_modelname; - mesg += "\n"; - mesg += "For Simulator : "; - mesg += *sim_name + " " + *sim_version + "\n"; - mesg += "Running on : LAMMPS "; - mesg += universe->version; - mesg += "\n"; - - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); - } - - if (*sim_name != "LAMMPS") - error->all(FLERR,"Incompatible KIM Simulator Model"); - } } /* ---------------------------------------------------------------------- @@ -441,154 +402,29 @@ void PairKIM::coeff(int narg, char **arg) if (count == 0) error->all(FLERR,"Incorrect args for pair coefficients"); - if (simulatorModel) { - simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); - simulatorModel->CloseTemplateMap(); - - int len = strlen(atom_type_sym_list.c_str())+1; - char *strbuf = new char[len]; - char *strword; - - // validate species selection - - int sim_num_species; - const std::string *sim_species; - simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); - for (int i=0; i < sim_num_species; ++i) { - simulatorModel->GetSupportedSpecies(i, &sim_species); - strcpy(strbuf,atom_type_sym_list.c_str()); - strword = strtok(strbuf," \t"); - while (strword) { - if ((strcmp(strword,"NULL") != 0) && (strcmp(sim_species->c_str(),strword) != 0)) - error->all(FLERR,"Species not supported by KIM Simulator Model"); - strword = strtok(NULL," \t"); - } - } - - int sim_fields, sim_lines; - const std::string *sim_field, *sim_value; - simulatorModel->GetNumberOfSimulatorFields(&sim_fields); - for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "units") { - simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); - if (*sim_value != update->unit_style) - error->all(FLERR,"Incompatible units for KIM Simulator Model"); - break; - } - } - - for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "model-init") { - for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); - input->one(sim_value->c_str()); - } - break; - } - } - - int sim_model_idx=-1; - for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "model-defn") { - sim_model_idx = i; - break; - } - } - - if (sim_model_idx < 0) - error->all(FLERR,"KIM Simulator Model has no Model definition"); - else { - for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); - if (utils::strmatch(*sim_value,"^pair_style")) { - char *ptr,*sim_style; - char *style_args[64]; - int style_narg = 0; - int len = strlen(sim_value->c_str())+1; - char *stylecmd = new char[len]; - strcpy(stylecmd,sim_value->c_str()); - - // ignore first word (pair_style) - strtok(stylecmd," \t"); - ptr = sim_style = strtok(NULL," \t"); - while (ptr && (style_narg < 63)) { - ptr = strtok(NULL," \t"); - if (!ptr) break; - style_args[style_narg] = ptr; - ++style_narg; - } - - int dummy; - delete simulator_class; - simulator_class = force->new_pair(sim_style,1,dummy); - if (simulator_class) { - if (comm->me == 0) { - std::string mesg("Created KIM Simulator Model pair style: "); - mesg += sim_style; - mesg += "\n"; - - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); - } - } else { - error->all(FLERR,"Failure to create simulator model pair style"); - } - simulator_class->settings(style_narg,style_args); - delete[] stylecmd; - } - } - for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); - if (utils::strmatch(*sim_value,"^pair_coeff")) { - char *ptr; - char *coeff_args[64]; - int coeff_narg = 0; - int len = strlen(sim_value->c_str())+1; - char *coeffcmd = new char[len]; - strcpy(coeffcmd,sim_value->c_str()); - - // ignore first word (pair_coeff) - strtok(coeffcmd," \t"); - ptr = strtok(NULL," \t"); - while (ptr && (coeff_narg < 63)) { - coeff_args[coeff_narg] = ptr; - ++coeff_narg; - ptr = strtok(NULL," \t"); - } - - simulator_class->coeff(coeff_narg,coeff_args); - delete[] coeffcmd; - } - } - } - error->all(FLERR,(simulatorModel->ToString()).c_str()); - } else { - // setup mapping between LAMMPS unique elements and KIM species codes - if (kim_particle_codes_ok) { - delete [] kim_particle_codes; - kim_particle_codes = NULL; - kim_particle_codes_ok = false; - } - kim_particle_codes = new int[lmps_num_unique_elements]; - kim_particle_codes_ok = true; - for(int i = 0; i < lmps_num_unique_elements; i++) { - int supported; - int code; - KIM_Model_GetSpeciesSupportAndCode( - pkim, - KIM_SpeciesName_FromString(lmps_unique_elements[i]), - &supported, - &code); - if (supported) { - kim_particle_codes[i] = code; - } else { - std::string msg("create_kim_particle_codes: symbol not found: "); - msg += lmps_unique_elements[i]; - error->all(FLERR, msg.c_str()); - } + // setup mapping between LAMMPS unique elements and KIM species codes + if (kim_particle_codes_ok) { + delete [] kim_particle_codes; + kim_particle_codes = NULL; + kim_particle_codes_ok = false; + } + kim_particle_codes = new int[lmps_num_unique_elements]; + kim_particle_codes_ok = true; + + for(int i = 0; i < lmps_num_unique_elements; i++) { + int supported; + int code; + KIM_Model_GetSpeciesSupportAndCode( + pkim, + KIM_SpeciesName_FromString(lmps_unique_elements[i]), + &supported, + &code); + if (supported) { + kim_particle_codes[i] = code; + } else { + std::string msg("create_kim_particle_codes: symbol not found: "); + msg += lmps_unique_elements[i]; + error->all(FLERR, msg.c_str()); } } } @@ -799,32 +635,6 @@ double PairKIM::memory_usage() return bytes; } -/* ---------------------------------------------------------------------- - simulator model support functions -------------------------------------------------------------------------- */ - -void PairKIM::simulator_init() -{ - int dummy; - // do not try with suffixes for now. - simulator_class = force->new_pair("lj/cut",1,dummy); - force->store_style(simulator_style,"lj/cut",1); - printf("Simulator model init: %s -> %s\n", kim_modelname, simulator_style); - char **args = new char*[1]; - args[0] = (char *)"8.1500"; - simulator_class->settings(1,args); - delete[] args; -} - -void PairKIM::simulator_free() -{ - printf("Simulator model free: %s -> %s\n", kim_modelname, simulator_style); - delete[] simulator_style; - simulator_style = NULL; - delete simulator_class; - simulator_class = NULL; -} - /* ---------------------------------------------------------------------- KIM-specific interface ------------------------------------------------------------------------- */ @@ -902,26 +712,21 @@ void PairKIM::kim_init() kim_modelname, &requestedUnitsAccepted, &pkim); - if (kimerror) { - kimerror = KIM::SimulatorModel::Create(kim_modelname,&simulatorModel); - if (kimerror) error->all(FLERR,"KIM ModelCreate failed"); - else return; - } else { - if (!requestedUnitsAccepted) - error->all(FLERR,"KIM Model did not accept the requested unit system"); + if (kimerror) error->all(FLERR,"KIM ModelCreate failed"); + else if (!requestedUnitsAccepted) + error->all(FLERR,"KIM Model did not accept the requested unit system"); - // check that the model does not require unknown capabilities - kimerror = check_for_routine_compatibility(); - if (kimerror) - error->all(FLERR, - "KIM Model requires unknown Routines. Unable to proceed."); + // check that the model does not require unknown capabilities + kimerror = check_for_routine_compatibility(); + if (kimerror) + error->all(FLERR, + "KIM Model requires unknown Routines. Unable to proceed."); - kimerror = KIM_Model_ComputeArgumentsCreate(pkim, &pargs); - if (kimerror) { - KIM_Model_Destroy(&pkim); - error->all(FLERR,"KIM ComputeArgumentsCreate failed"); - } else kim_init_ok = true; - } + kimerror = KIM_Model_ComputeArgumentsCreate(pkim, &pargs); + if (kimerror) { + KIM_Model_Destroy(&pkim); + error->all(FLERR,"KIM ComputeArgumentsCreate failed"); + } else kim_init_ok = true; // determine KIM Model capabilities (used in this function below) set_kim_model_has_flags(); diff --git a/src/KIM/pair_kim.h b/src/KIM/pair_kim.h index 37a6be1e5b..aa33b9b271 100644 --- a/src/KIM/pair_kim.h +++ b/src/KIM/pair_kim.h @@ -69,7 +69,6 @@ class KIM_API_model; extern "C" { #include "KIM_SimulatorHeaders.h" } -#include "KIM_SimulatorModel.hpp" namespace LAMMPS_NS { @@ -121,7 +120,6 @@ class PairKIM : public Pair { KIM_TemperatureUnit temperatureUnit; KIM_TimeUnit timeUnit; - KIM::SimulatorModel * simulatorModel; KIM_Model * pkim; KIM_ComputeArguments * pargs; @@ -152,12 +150,6 @@ class PairKIM : public Pair { // is in molecular mode int** lmps_stripped_neigh_ptr; // pointer into lists - // LAMMPS Simulator model support - Pair *simulator_class; - char *simulator_style; - virtual void simulator_init(); - virtual void simulator_free(); - // KIM specific helper functions virtual void set_contributing(); virtual void kim_init(); @@ -191,7 +183,10 @@ The KIM model was unable, for some reason, to complete the computation. E: 'KIMvirial' or 'LAMMPSvirial' not supported with kim-api. -"KIMvirial or "LAMMPSvirial" found on the pair_style line. These keys are not supported kim-api. (The virial computation is always performed by LAMMPS.) Please remove these keys, make sure the KIM model you are using supports kim-api, and rerun. +"KIMvirial or "LAMMPSvirial" found on the pair_style line. These keys +are not supported kim-api. (The virial computation is always performed +by LAMMPS.) Please remove these keys, make sure the KIM model you are +using supports kim-api, and rerun. E: Illegal pair_style command -- GitLab From fc8a639d585c7325eb08e2044a274a3b514043d8 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 May 2019 19:39:15 -0400 Subject: [PATCH 011/236] add documentation for kim_style command. update a few KIM related doc files --- doc/src/Commands_all.txt | 1 + doc/src/Packages_details.txt | 11 +++-- doc/src/commands_list.txt | 1 + doc/src/kim_query.txt | 3 +- doc/src/kim_style.txt | 81 ++++++++++++++++++++++++++++++++++++ doc/src/lammps.book | 1 + doc/src/pair_kim.txt | 3 +- src/KIM/README | 6 +-- 8 files changed, 99 insertions(+), 8 deletions(-) create mode 100644 doc/src/kim_style.txt diff --git a/doc/src/Commands_all.txt b/doc/src/Commands_all.txt index 52c2e67e2e..d76ffac14c 100644 --- a/doc/src/Commands_all.txt +++ b/doc/src/Commands_all.txt @@ -69,6 +69,7 @@ An alphabetic list of all general LAMMPS commands. "include"_include.html, "jump"_jump.html, "kim_query"_kim_query.html, +"kim_style"_kim_style.html, "kspace_modify"_kspace_modify.html, "kspace_style"_kspace_style.html, "label"_label.html, diff --git a/doc/src/Packages_details.txt b/doc/src/Packages_details.txt index 352a38af84..19c7e96fe9 100644 --- a/doc/src/Packages_details.txt +++ b/doc/src/Packages_details.txt @@ -342,7 +342,10 @@ A "pair_style kim"_pair_kim.html command which is a wrapper on the Knowledge Base for Interatomic Models (KIM) repository of interatomic potentials, enabling any of them to be used in LAMMPS simulations. Also a "kim_query"_kim_query.html command, which allows to query -the OpenKIM database for stored properties. +the OpenKIM database for stored properties, and a +"kim_style"_kim_style.html command, which serves as a front end to +generating LAMMPS input on-the-fly for KIM simulator models and native +KIM models. To use this package you must have the KIM library available on your system. @@ -352,8 +355,10 @@ https://openkim.org. The KIM project is led by Ellad Tadmor and Ryan Elliott (U Minnesota). [Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM -API which the "pair_style kim"_pair_kim.html command uses. He -developed the pair style. +API which the "pair_style kim"_pair_kim.html command uses. He developed +the pair style. Axel Kohlmeyer (Temple U) contributed the +"kim_query"_kim_query.html and "kim_style"_kim_style.html commands in +close collaboration with Ryan. [Install:] diff --git a/doc/src/commands_list.txt b/doc/src/commands_list.txt index cf716df9ac..39d2f7c7d0 100644 --- a/doc/src/commands_list.txt +++ b/doc/src/commands_list.txt @@ -54,6 +54,7 @@ Commands :h1 info jump kim_query + kim_style kspace_modify kspace_style label diff --git a/doc/src/kim_query.txt b/doc/src/kim_query.txt index c581de0ebb..84eca6e676 100644 --- a/doc/src/kim_query.txt +++ b/doc/src/kim_query.txt @@ -43,4 +43,5 @@ See the "Build package"_Build_package.html doc page for more info. [Related commands:] -"pair_style kim"_pair_kim.html, "variable"_variable.html +"pair_style kim"_pair_kim.html, "kim_style"_kim_style.html, +"variable"_variable.html diff --git a/doc/src/kim_style.txt b/doc/src/kim_style.txt new file mode 100644 index 0000000000..ab605c017a --- /dev/null +++ b/doc/src/kim_style.txt @@ -0,0 +1,81 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Commands_all.html) + +:line + +kim_style command :h3 + +[Syntax:] + +kim_style mode model args :pre + +mode = {init} or {define} +model = name of the KIM model (potential or simulator model) or NULL +args = atom type to species mapping ({define} option only, one entry per atom type) :ul + +[Examples:] + +kim_style init ex_sim_model_Si_mod_tersoff +kim_style define NULL Si Si +kim_style define LennardJones_Ar Ar :pre + +[Description:] + +The kim_style command is a high-level wrapper around the +"Knowledge Base for Interatomic Models (OpenKIM)"_https://openkim.org +repository of interatomic potentials, so that they can be used by +LAMMPS scripts. It does not implement any computations directly, but +rather will generate LAMMPS input commands based on the information +retrieved from the OpenKIM repository. It is primarily meant to realize +so-called "KIM Simulator Models", which are OpenKIM repository entries +of models using native features of the simulation engine, i.e. LAMMPS +in this case, but it also supports realizing conventional KIM models +via the "pair_style kim"_pair_kim.html command. + +The kim_style command has two modes, {init} and {define}, indicated by +the first argument to the kim_style command. An {init} mode command +must be issued [before] the simulation box is created, while the {define} +mode version may only be used [after] the simulation box exists. The +{init} mode version is only required, if the KIM model requires it. +The second argument to the kim_style command is the KIM model ID. It +can be set to NULL in the kim_style define command, if it was already +set in a kim_style init command. Otherwise, the two model IDs must match. + +Only the kim_style define command allows additional arguments. Those +are used to map the atom types in LAMMPS to the available species in +the KIM model. This is equivalent to the arguments following +"pair_coeff * *" in a "kim"_pair_kim.html pair style. Thus the command + +kim_style define LennardJones_Ar Ar :pre + +will generate the LAMMPS input commands: + +pair_style kim LennardJones_Ar +pair_coeff * * Ar :pre + +For simulator models, the generated input commands may be more complex +and require that LAMMPS is built with the required packages included. +The commands generated by the kim_style command, can be copied to the +screen or log file, through the "echo"_echo.html command. +The kim_style command will also validate, that the selected simulator +model was generated for the LAMMPS MD code and not some other software. +In addition, the version strings for LAMMPS version used for defining +the simulator model and the LAMMPS version being currently run are +printed, so that it can be tracked down, if there are any incompatible +changes to input script or command syntax between the two LAMMPS versions. + +[Restrictions:] + +This command is part of the KIM package. It is only enabled if +LAMMPS was built with that package. Furthermore, its correct +functioning depends on compiling LAMMPS with all required packages +installed that are required by the commands embedded in any KIM +simulator models used. +See the "Build package"_Build_package.html doc page for more info. + +[Related commands:] + +"pair_style kim"_pair_kim.html, "kim_query"_kim_query.html diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 500690597d..cedb6ea709 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -168,6 +168,7 @@ include.html info.html jump.html kim_query.html +kim_style.html label.html lattice.html log.html diff --git a/doc/src/pair_kim.txt b/doc/src/pair_kim.txt index a415ac606b..523bd89d7c 100644 --- a/doc/src/pair_kim.txt +++ b/doc/src/pair_kim.txt @@ -112,6 +112,7 @@ kim-api package version 2.0.0 and higher. [Related commands:] -"pair_coeff"_pair_coeff.html +"pair_coeff"_pair_coeff.html, "kim_style"_kim_style.html, +"kim_query"_kim_query.html [Default:] none diff --git a/src/KIM/README b/src/KIM/README index a69206596f..4f52d69a67 100644 --- a/src/KIM/README +++ b/src/KIM/README @@ -13,8 +13,8 @@ Using this package requires the KIM library and its models system. The library can be downloaded and built in lib/kim or elsewhere on your system, which must be done before bulding LAMMPS with this package. Details of the download, build, and install -process for KIM are given in the lib/kim/README file, and scripts will -soon be provided to help automate the process. Also see the LAMMPS +process for KIM are given in the lib/kim/README file, and scripts +are provided to help automate the process. Also see the LAMMPS manual for general information on building LAMMPS with external libraries. The settings in the Makefile.lammps file in lib/kim must be correct for LAMMPS to build correctly with this package installed. @@ -24,6 +24,6 @@ Makefile.lammps file usually will not need to be changed. Once you have successfully built LAMMPS with this package and the KIM library you can test it using an input file from the examples dir: -./lmp_serial < lammps/examples/kim/in.kim.lj +./lmp_serial -in lammps/examples/kim/in.kim.lj This pair_style was written by Ryan S. Elliott (U Minn). -- GitLab From ee5fa04732588646047111488bd5f4fec2870772 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 May 2019 22:41:28 -0400 Subject: [PATCH 012/236] create internal fix via modify->add_fix() so it does not get logged --- src/KIM/kim_style.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index 865f6827ab..53bf2958b3 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -104,7 +104,11 @@ void KimStyle::do_init(char *model) int ifix = modify->find_fix("KIM_MODEL_STORE"); if (ifix >= 0) modify->delete_fix(ifix); - input->one("fix KIM_MODEL_STORE all STORE/KIM"); + char *fixarg[3]; + fixarg[0] = (char *)"KIM_MODEL_STORE"; + fixarg[1] = (char *)"all"; + fixarg[2] = (char *)"STORE/KIM"; + modify->add_fix(3,fixarg); ifix = modify->find_fix("KIM_MODEL_STORE"); FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; -- GitLab From 5a929aff6ed77043341a396ecf30b25d14add523 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 May 2019 22:42:40 -0400 Subject: [PATCH 013/236] error out if kim_style init is required but wasn't called --- src/KIM/kim_style.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index 53bf2958b3..d906d56041 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -240,17 +240,27 @@ void KimStyle::do_defn(int narg, char **arg) } } delete[] strbuf; - + + // check if units are unchanged, and if kim_style init was required + int sim_fields, sim_lines; const std::string *sim_field, *sim_value; simulatorModel->GetNumberOfSimulatorFields(&sim_fields); for (int i=0; i < sim_fields; ++i) { simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "units") { simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); if (*sim_value != update->unit_style) error->all(FLERR,"Incompatible units for KIM Simulator Model"); - break; + } + + if ((ifix < 0) && ( *sim_field == "model-init")) { + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); + if (*sim_value != "") + error->all(FLERR,"Must use 'kim_style init' with this model"); + } } } -- GitLab From c3897212e2fe7531c6cd37d0165b2c7a419f54da Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 May 2019 22:44:03 -0400 Subject: [PATCH 014/236] must call ClearTemplateMap(), so kim_style define may be called multiple times --- src/KIM/kim_style.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index d906d56041..323832fbad 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -279,6 +279,7 @@ void KimStyle::do_defn(int narg, char **arg) if (sim_model_idx < 0) error->all(FLERR,"KIM Simulator Model has no Model definition"); + simulatorModel->ClearTemplateMap(); } else { // not a simulator model. issue pair_style and pair_coeff commands. -- GitLab From 264f6e1630e3d4730953c9ca4b169a5631de3d34 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 24 May 2019 22:44:41 -0400 Subject: [PATCH 015/236] whitespace cleanup --- src/KIM/kim_style.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index 323832fbad..e8aee77b66 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -113,17 +113,19 @@ void KimStyle::do_init(char *model) FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; fix_store->setptr("model_name", (void *) model); - + int kimerror; KIM::SimulatorModel * simulatorModel; kimerror = KIM::SimulatorModel::Create(model,&simulatorModel); // not a Kim Simulator Model; nothing else to do here. + if (kimerror) return; fix_store->setptr("simulator_model", (void *) simulatorModel); // need to call this to have access to (some) simulator model init data. + simulatorModel->CloseTemplateMap(); int sim_fields, sim_lines; @@ -131,6 +133,7 @@ void KimStyle::do_init(char *model) simulatorModel->GetNumberOfSimulatorFields(&sim_fields); // set units + for (int i=0; i < sim_fields; ++i) { simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); if (*sim_field == "units") { @@ -143,6 +146,7 @@ void KimStyle::do_init(char *model) } // init model + for (int i=0; i < sim_fields; ++i) { simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); if (*sim_field == "model-init") { @@ -155,6 +159,7 @@ void KimStyle::do_init(char *model) } // reset template map. + simulatorModel->ClearTemplateMap(); } @@ -281,7 +286,7 @@ void KimStyle::do_defn(int narg, char **arg) simulatorModel->ClearTemplateMap(); } else { - + // not a simulator model. issue pair_style and pair_coeff commands. // NOTE: all references to arg must appear before calls to input->one() // as that will reset the argument vector. -- GitLab From 4619018eadc0f9e23bc347d5df53b745a15b60d0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 27 May 2019 23:26:26 -0400 Subject: [PATCH 016/236] provide more simulator model variant input examples --- examples/kim/data.VOH | 118 ++++++++++++++++++ examples/kim/in.kim.VOH.simulator.model | 24 ++++ examples/kim/in.kim.ex_si_1.simulator_model | 69 ++++++++++ examples/kim/in.kim.ex_si_2.simulator_model | 69 ++++++++++ ...ulator-model => in.kim.lj.simulator-model} | 7 +- 5 files changed, 284 insertions(+), 3 deletions(-) create mode 100644 examples/kim/data.VOH create mode 100644 examples/kim/in.kim.VOH.simulator.model create mode 100644 examples/kim/in.kim.ex_si_1.simulator_model create mode 100644 examples/kim/in.kim.ex_si_2.simulator_model rename examples/kim/{in.kim.simulator-model => in.kim.lj.simulator-model} (88%) diff --git a/examples/kim/data.VOH b/examples/kim/data.VOH new file mode 100644 index 0000000000..c093705adc --- /dev/null +++ b/examples/kim/data.VOH @@ -0,0 +1,118 @@ +# VOH example + +100 atoms +4 atom types + +0 25.000 xlo xhi +0 25.000 ylo yhi +0 25.000 zlo zhi + +Masses + +1 1.0080 +2 12.0107 +3 15.9994 +4 50.9415 + +Atoms + + 1 2 0.0 12.35333 12.56112 11.08925 + 2 4 0.0 12.32916 12.62071 13.13099 + 3 3 0.0 14.09425 12.56218 13.76130 + 4 3 0.0 11.42814 11.10330 13.76732 + 5 3 0.0 11.63260 13.89286 13.64097 + 6 1 0.0 10.61647 11.29221 14.30535 + 7 1 0.0 14.38026 13.34626 14.29055 + 8 1 0.0 11.32479 12.58820 10.70253 + 9 1 0.0 12.90918 13.42567 10.69612 + 10 1 0.0 12.84043 11.63643 10.74688 + 11 2 0.0 0.93670 23.74637 24.45218 + 12 4 0.0 2.18151 24.36876 0.94725 + 13 3 0.0 3.93452 24.44779 0.28384 + 14 3 0.0 2.13668 23.10529 2.33362 + 15 3 0.0 1.76108 0.74666 1.48323 + 16 1 0.0 1.82070 23.45305 3.20745 + 17 1 0.0 4.35555 0.34186 0.31083 + 18 1 0.0 24.90472 23.68735 24.82586 + 19 1 0.0 0.97611 24.45631 23.61244 + 20 1 0.0 1.24583 22.75250 24.09589 + 21 2 0.0 2.25730 12.18969 18.74792 + 22 4 0.0 0.67140 13.31162 19.37385 + 23 3 0.0 0.71106 13.43250 21.24545 + 24 3 0.0 24.08603 12.44025 18.87949 + 25 3 0.0 0.70486 14.71920 18.75808 + 26 1 0.0 23.49516 12.95430 18.26686 + 27 1 0.0 0.79723 14.34808 21.60818 + 28 1 0.0 2.24383 12.10285 17.65239 + 29 1 0.0 3.19860 12.66607 19.06030 + 30 1 0.0 2.20214 11.18299 19.18774 + 31 2 0.0 9.32237 8.16220 23.74501 + 32 4 0.0 9.41775 7.26178 21.91463 + 33 3 0.0 8.54752 8.34565 20.65588 + 34 3 0.0 8.50942 5.62151 22.00137 + 35 3 0.0 10.87539 7.02683 21.48455 + 36 1 0.0 9.06507 4.82324 21.80615 + 37 1 0.0 9.11458 8.67119 19.91477 + 38 1 0.0 9.82196 7.53487 24.49616 + 39 1 0.0 9.81855 9.14254 23.70532 + 40 1 0.0 8.27176 8.30387 24.03831 + 41 2 0.0 9.10113 13.98748 23.44281 + 42 4 0.0 8.84954 12.89163 21.73780 + 43 3 0.0 10.01387 13.54293 20.42005 + 44 3 0.0 7.08992 13.11522 21.12954 + 45 3 0.0 9.12937 11.39982 21.99065 + 46 1 0.0 6.55309 12.28287 21.08224 + 47 1 0.0 10.67858 12.89258 20.08249 + 48 1 0.0 8.42108 13.62252 24.22498 + 49 1 0.0 10.13926 13.89766 23.79639 + 50 1 0.0 8.88118 15.04646 23.24289 + 51 2 0.0 17.73225 3.40708 8.28945 + 52 4 0.0 18.49877 5.29835 8.37599 + 53 3 0.0 19.48472 5.62627 6.81505 + 54 3 0.0 19.66498 5.40961 9.84118 + 55 3 0.0 17.38120 6.34466 8.51889 + 56 1 0.0 19.41208 6.07779 10.52927 + 57 1 0.0 19.15960 6.37609 6.25924 + 58 1 0.0 17.15579 3.19557 9.20103 + 59 1 0.0 17.07197 3.31049 7.41454 + 60 1 0.0 18.54903 2.67524 8.20436 + 61 2 0.0 5.18346 20.97409 24.28840 + 62 4 0.0 7.06396 20.17968 24.34847 + 63 3 0.0 7.63220 19.82889 22.59578 + 64 3 0.0 7.00272 18.55243 0.28036 + 65 3 0.0 8.05085 21.13715 0.03620 + 66 1 0.0 7.56109 18.51690 1.09952 + 67 1 0.0 8.44257 20.31624 22.30833 + 68 1 0.0 4.83239 21.17976 0.30904 + 69 1 0.0 5.19182 21.91237 23.71419 + 70 1 0.0 4.49282 20.26573 23.80772 + 71 2 0.0 21.82701 12.79861 20.63056 + 72 4 0.0 21.27646 11.09990 19.63611 + 73 3 0.0 19.52930 10.64327 20.13923 + 74 3 0.0 22.41924 9.70346 20.14638 + 75 3 0.0 21.34556 11.30206 18.11274 + 76 1 0.0 22.94464 9.30084 19.40876 + 77 1 0.0 18.86743 10.62817 19.40629 + 78 1 0.0 22.85378 13.07853 20.35349 + 79 1 0.0 21.14666 13.62206 20.37063 + 80 1 0.0 21.78702 12.62668 21.71522 + 81 2 0.0 4.84801 10.63893 5.85720 + 82 4 0.0 2.99668 11.06158 5.10490 + 83 3 0.0 3.09505 11.09458 3.23258 + 84 3 0.0 2.48053 12.76555 5.69567 + 85 3 0.0 1.96195 10.01780 5.55634 + 86 1 0.0 1.65323 12.78746 6.24245 + 87 1 0.0 2.52753 10.43264 2.76734 + 88 1 0.0 4.80984 10.62196 6.95551 + 89 1 0.0 5.18492 9.65688 5.49273 + 90 1 0.0 5.56737 11.40648 5.53568 + 91 2 0.0 13.58126 9.47098 19.40329 + 92 4 0.0 14.17691 10.17243 21.22692 + 93 3 0.0 14.44428 12.02521 21.10583 + 94 3 0.0 15.81206 9.37183 21.67632 + 95 3 0.0 13.12907 9.86545 22.30960 + 96 1 0.0 15.80034 8.83149 22.50703 + 97 1 0.0 13.87232 12.57457 21.69672 + 98 1 0.0 13.42563 8.38456 19.45392 + 99 1 0.0 12.63978 9.95672 19.10431 + 100 1 0.0 14.35123 9.68789 18.64825 diff --git a/examples/kim/in.kim.VOH.simulator.model b/examples/kim/in.kim.VOH.simulator.model new file mode 100644 index 0000000000..3803ceceba --- /dev/null +++ b/examples/kim/in.kim.VOH.simulator.model @@ -0,0 +1,24 @@ +# REAX potential for VOH system +# ..... + +units real +atom_style charge + +kim_style init Sim_LAMMPS_ReaxFF_ChenowethVanDuinPersson_2008_CHOV__SM_429148913211_000 + +read_data data.VOH + +kim_style define NULL H C O V + +neighbor 2 bin +neigh_modify every 10 delay 0 check no + +fix 1 all nve +fix 2 all qeq/reax 1 0.0 10.0 1e-6 param.qeq +fix 3 all temp/berendsen 500.0 500.0 100.0 + +timestep 0.25 + +#dump 1 all atom 30 dump.reax.voh + +run 300 diff --git a/examples/kim/in.kim.ex_si_1.simulator_model b/examples/kim/in.kim.ex_si_1.simulator_model new file mode 100644 index 0000000000..03f9c25a33 --- /dev/null +++ b/examples/kim/in.kim.ex_si_1.simulator_model @@ -0,0 +1,69 @@ + +units metal +kim_style init ex_sim_model_Si_mod_tersoff + +atom_style atomic +atom_modify map array +boundary p p p + +# temperatures +variable tlo equal 1800.0 +variable thi equal 2400.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a & + a1 1.0 0.0 0.0 & + a2 0.0 1.0 0.0 & + a3 0.0 0.0 1.0 & + basis 0.0 0.0 0.0 & + basis 0.0 0.5 0.5 & + basis 0.5 0.0 0.5 & + basis 0.5 0.5 0.0 & + basis 0.25 0.25 0.25 & + basis 0.25 0.75 0.75 & + basis 0.75 0.25 0.75 & + basis 0.75 0.75 0.25 + +region myreg block 0 4 & + 0 4 & + 0 4 +create_box 1 myreg +create_atoms 1 region myreg + +mass 1 28.06 + +group Si type 1 + +velocity all create ${thi} 5287286 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +delete_atoms group del +kim_style define ex_sim_model_Si_mod_tersoff Si + +thermo 10 + +fix 1 all nve +fix 2 all langevin ${thi} ${thi} 0.1 48278 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +run 100 + diff --git a/examples/kim/in.kim.ex_si_2.simulator_model b/examples/kim/in.kim.ex_si_2.simulator_model new file mode 100644 index 0000000000..18efd94222 --- /dev/null +++ b/examples/kim/in.kim.ex_si_2.simulator_model @@ -0,0 +1,69 @@ + +units metal +kim_style init ex_sim_model_Si_mod_tersoff + +atom_style atomic +atom_modify map array +boundary p p p + +# temperatures +variable tlo equal 1800.0 +variable thi equal 2400.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a & + a1 1.0 0.0 0.0 & + a2 0.0 1.0 0.0 & + a3 0.0 0.0 1.0 & + basis 0.0 0.0 0.0 & + basis 0.0 0.5 0.5 & + basis 0.5 0.0 0.5 & + basis 0.5 0.5 0.0 & + basis 0.25 0.25 0.25 & + basis 0.25 0.75 0.75 & + basis 0.75 0.25 0.75 & + basis 0.75 0.75 0.25 + +region myreg block 0 4 & + 0 4 & + 0 4 +create_box 1 myreg +create_atoms 1 region myreg + +mass 1 28.06 + +group Si type 1 + +velocity all create ${thi} 5287286 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +delete_atoms group del +kim_style define NULL Si + +thermo 10 + +fix 1 all nve +fix 2 all langevin ${thi} ${thi} 0.1 48278 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +run 100 + diff --git a/examples/kim/in.kim.simulator-model b/examples/kim/in.kim.lj.simulator-model similarity index 88% rename from examples/kim/in.kim.simulator-model rename to examples/kim/in.kim.lj.simulator-model index 1e6e9dec89..21d60a48d9 100644 --- a/examples/kim/in.kim.simulator-model +++ b/examples/kim/in.kim.lj.simulator-model @@ -16,18 +16,19 @@ variable zz equal 20*$z units metal atom_style atomic +newton on lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} -create_box 2 box +create_box 1 box create_atoms 1 box #pair_style lj/cut 8.1500 #pair_coeff 1 1 0.0104 3.4000 -kim_style define ex_sim_model_Si_mod_tersoff Si Si +kim_style define LennardJones_Ar Ar -mass * 39.95 +mass 1 39.95 velocity all create 200.0 232345 loop geom neighbor 0.3 bin -- GitLab From eb6287d2e8877c3b56af90b89a692c64d9a00036 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 27 May 2019 23:26:46 -0400 Subject: [PATCH 017/236] correctly check for supported species --- src/KIM/kim_style.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index e8aee77b66..eac16f1a8a 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -232,17 +232,26 @@ void KimStyle::do_defn(int narg, char **arg) // validate species selection int sim_num_species; + bool species_is_supported; const std::string *sim_species; simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); - for (int i=0; i < sim_num_species; ++i) { - simulatorModel->GetSupportedSpecies(i, &sim_species); - strcpy(strbuf,atom_type_sym_list.c_str()); - strword = strtok(strbuf," \t"); - while (strword) { - if ((strcmp(strword,"NULL") != 0) && (strcmp(sim_species->c_str(),strword) != 0)) - error->all(FLERR,"Species not supported by KIM Simulator Model"); - strword = strtok(NULL," \t"); + strcpy(strbuf,atom_type_sym_list.c_str()); + strword = strtok(strbuf," \t"); + while (strword) { + species_is_supported = false; + if (strcmp(strword,"NULL") == 0) continue; + for (int i=0; i < sim_num_species; ++i) { + simulatorModel->GetSupportedSpecies(i, &sim_species); + if (strcmp(sim_species->c_str(),strword) == 0) + species_is_supported = true; } + if (!species_is_supported) { + std::string msg("Species '"); + msg += strword; + msg += "' is not supported by this KIM Simulator Model"; + error->all(FLERR,msg.c_str()); + } + strword = strtok(NULL," \t"); } delete[] strbuf; -- GitLab From b3a01694b7312989554f24817bd94e8ccca2a83d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 27 May 2019 23:34:05 -0400 Subject: [PATCH 018/236] remove leftover fix qeq/reax command --- examples/kim/in.kim.VOH.simulator.model | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/kim/in.kim.VOH.simulator.model b/examples/kim/in.kim.VOH.simulator.model index 3803ceceba..a2dd6983c0 100644 --- a/examples/kim/in.kim.VOH.simulator.model +++ b/examples/kim/in.kim.VOH.simulator.model @@ -14,7 +14,6 @@ neighbor 2 bin neigh_modify every 10 delay 0 check no fix 1 all nve -fix 2 all qeq/reax 1 0.0 10.0 1e-6 param.qeq fix 3 all temp/berendsen 500.0 500.0 100.0 timestep 0.25 -- GitLab From 24a63f0f31446f5a98a32325248cced2d1c6d21a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 30 May 2019 21:51:13 -0400 Subject: [PATCH 019/236] update kim_style command semantics as discussed in PR #1440 this also adds documentation of error messages in the kim_style header --- doc/src/kim_style.txt | 54 ++++++++------- ...lator.model => in.kim.VOH.simulator_model} | 2 +- ...tor_model => in.kim.ex_si.simulator_model} | 2 +- examples/kim/in.kim.ex_si_1.simulator_model | 69 ------------------- ...ulator-model => in.kim.lj.simulator_model} | 4 +- src/KIM/kim_style.cpp | 33 +++------ src/KIM/kim_style.h | 36 ++++++++++ 7 files changed, 81 insertions(+), 119 deletions(-) rename examples/kim/{in.kim.VOH.simulator.model => in.kim.VOH.simulator_model} (92%) rename examples/kim/{in.kim.ex_si_2.simulator_model => in.kim.ex_si.simulator_model} (98%) delete mode 100644 examples/kim/in.kim.ex_si_1.simulator_model rename examples/kim/{in.kim.lj.simulator-model => in.kim.lj.simulator_model} (92%) diff --git a/doc/src/kim_style.txt b/doc/src/kim_style.txt index ab605c017a..dcdfae1cdc 100644 --- a/doc/src/kim_style.txt +++ b/doc/src/kim_style.txt @@ -10,17 +10,18 @@ kim_style command :h3 [Syntax:] -kim_style mode model args :pre +kim_style mode args :pre -mode = {init} or {define} -model = name of the KIM model (potential or simulator model) or NULL -args = atom type to species mapping ({define} option only, one entry per atom type) :ul +mode = {init model} or {define typeargs} +model = name of the KIM model (KIM potential or KIM simulator model) +typeargs = atom type to species mapping (one entry per atom type) :ul [Examples:] kim_style init ex_sim_model_Si_mod_tersoff -kim_style define NULL Si Si -kim_style define LennardJones_Ar Ar :pre +kim_style define Si Si +kim_style init LennardJones_Ar +kim_style define Ar :pre [Description:] @@ -29,27 +30,34 @@ The kim_style command is a high-level wrapper around the repository of interatomic potentials, so that they can be used by LAMMPS scripts. It does not implement any computations directly, but rather will generate LAMMPS input commands based on the information -retrieved from the OpenKIM repository. It is primarily meant to realize -so-called "KIM Simulator Models", which are OpenKIM repository entries -of models using native features of the simulation engine, i.e. LAMMPS +retrieved from the OpenKIM repository. It is able to realize so-called +"KIM Simulator Models", which are OpenKIM repository entries of models +using native features of the simulation engine in use, i.e. LAMMPS in this case, but it also supports realizing conventional KIM models -via the "pair_style kim"_pair_kim.html command. +implicitly via generating a "pair_style kim"_pair_kim.html command +followed by a suitable "pair_coeff"_pair_coeff.html command. The kim_style command has two modes, {init} and {define}, indicated by the first argument to the kim_style command. An {init} mode command must be issued [before] the simulation box is created, while the {define} -mode version may only be used [after] the simulation box exists. The -{init} mode version is only required, if the KIM model requires it. -The second argument to the kim_style command is the KIM model ID. It -can be set to NULL in the kim_style define command, if it was already -set in a kim_style init command. Otherwise, the two model IDs must match. - -Only the kim_style define command allows additional arguments. Those -are used to map the atom types in LAMMPS to the available species in -the KIM model. This is equivalent to the arguments following -"pair_coeff * *" in a "kim"_pair_kim.html pair style. Thus the command - -kim_style define LennardJones_Ar Ar :pre +mode version may only be used [after] the simulation box exists. Both +are required. The {init} mode version sets the model name and may issue +additional commands changing LAMMPS default settings that are required +for using a selected simulator model. If needed, those settings can be +overridden. The second argument to the {kim_style init} command is the +KIM model ID. + +The {kim_style define} command will issue commands that will realize +the selected model (through generating pair_style and pair_coeff commands, +but also other commands, as required). It has to be issued [after] the +the simulation box is defined. The {kim_style define} command allows a +varying numbver of additional arguments. Those are used to map the atom +types in LAMMPS to the available species in the KIM model. This is +equivalent to the arguments following "pair_coeff * *" in a +"kim"_pair_kim.html pair style. Thus the commands: + +kim_style init LennardJones_Ar +kim_style define Ar :pre will generate the LAMMPS input commands: @@ -60,7 +68,7 @@ For simulator models, the generated input commands may be more complex and require that LAMMPS is built with the required packages included. The commands generated by the kim_style command, can be copied to the screen or log file, through the "echo"_echo.html command. -The kim_style command will also validate, that the selected simulator +The kim_style command will also validate, that a selected simulator model was generated for the LAMMPS MD code and not some other software. In addition, the version strings for LAMMPS version used for defining the simulator model and the LAMMPS version being currently run are diff --git a/examples/kim/in.kim.VOH.simulator.model b/examples/kim/in.kim.VOH.simulator_model similarity index 92% rename from examples/kim/in.kim.VOH.simulator.model rename to examples/kim/in.kim.VOH.simulator_model index a2dd6983c0..8696cf265a 100644 --- a/examples/kim/in.kim.VOH.simulator.model +++ b/examples/kim/in.kim.VOH.simulator_model @@ -8,7 +8,7 @@ kim_style init Sim_LAMMPS_ReaxFF_ChenowethVanDuinPersson_2008_CHOV__SM_429148913 read_data data.VOH -kim_style define NULL H C O V +kim_style define H C O V neighbor 2 bin neigh_modify every 10 delay 0 check no diff --git a/examples/kim/in.kim.ex_si_2.simulator_model b/examples/kim/in.kim.ex_si.simulator_model similarity index 98% rename from examples/kim/in.kim.ex_si_2.simulator_model rename to examples/kim/in.kim.ex_si.simulator_model index 18efd94222..2f9e79ef4e 100644 --- a/examples/kim/in.kim.ex_si_2.simulator_model +++ b/examples/kim/in.kim.ex_si.simulator_model @@ -54,7 +54,7 @@ velocity all create ${thi} 5287286 mom yes rot yes dist gaussian group del id 300 delete_atoms group del -kim_style define NULL Si +kim_style define Si thermo 10 diff --git a/examples/kim/in.kim.ex_si_1.simulator_model b/examples/kim/in.kim.ex_si_1.simulator_model deleted file mode 100644 index 03f9c25a33..0000000000 --- a/examples/kim/in.kim.ex_si_1.simulator_model +++ /dev/null @@ -1,69 +0,0 @@ - -units metal -kim_style init ex_sim_model_Si_mod_tersoff - -atom_style atomic -atom_modify map array -boundary p p p - -# temperatures -variable tlo equal 1800.0 -variable thi equal 2400.0 - -# coordination number cutoff - -variable r equal 2.835 - -# minimization parameters - -variable etol equal 1.0e-5 -variable ftol equal 1.0e-5 -variable maxiter equal 100 -variable maxeval equal 100 -variable dmax equal 1.0e-1 - -# diamond unit cell - -variable a equal 5.431 -lattice custom $a & - a1 1.0 0.0 0.0 & - a2 0.0 1.0 0.0 & - a3 0.0 0.0 1.0 & - basis 0.0 0.0 0.0 & - basis 0.0 0.5 0.5 & - basis 0.5 0.0 0.5 & - basis 0.5 0.5 0.0 & - basis 0.25 0.25 0.25 & - basis 0.25 0.75 0.75 & - basis 0.75 0.25 0.75 & - basis 0.75 0.75 0.25 - -region myreg block 0 4 & - 0 4 & - 0 4 -create_box 1 myreg -create_atoms 1 region myreg - -mass 1 28.06 - -group Si type 1 - -velocity all create ${thi} 5287286 mom yes rot yes dist gaussian - -# make a vacancy - -group del id 300 -delete_atoms group del -kim_style define ex_sim_model_Si_mod_tersoff Si - -thermo 10 - -fix 1 all nve -fix 2 all langevin ${thi} ${thi} 0.1 48278 - -timestep 1.0e-3 -neighbor 1.0 bin -neigh_modify every 1 delay 10 check yes - -run 100 - diff --git a/examples/kim/in.kim.lj.simulator-model b/examples/kim/in.kim.lj.simulator_model similarity index 92% rename from examples/kim/in.kim.lj.simulator-model rename to examples/kim/in.kim.lj.simulator_model index 21d60a48d9..15b26c3c64 100644 --- a/examples/kim/in.kim.lj.simulator-model +++ b/examples/kim/in.kim.lj.simulator_model @@ -18,6 +18,8 @@ units metal atom_style atomic newton on +kim_style init LennardJones_Ar + lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} create_box 1 box @@ -26,7 +28,7 @@ create_atoms 1 box #pair_style lj/cut 8.1500 #pair_coeff 1 1 0.0104 3.4000 -kim_style define LennardJones_Ar Ar +kim_style define Ar mass 1 39.95 velocity all create 200.0 232345 loop geom diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index eac16f1a8a..856fb94c9e 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -79,7 +79,7 @@ void KimStyle::command(int narg, char **arg) if (narg < 2) error->all(FLERR,"Illegal kim_style command"); if (strcmp(arg[0],"init") == 0) { - if (narg > 2) error->all(FLERR,"Illegal kim_style init command"); + if (narg > 2) error->all(FLERR,"Illegal kim_style command"); if (domain->box_exist) error->all(FLERR,"Must use 'kim_style init' command before " "simulation box is defined"); @@ -167,10 +167,10 @@ void KimStyle::do_init(char *model) void KimStyle::do_defn(int narg, char **arg) { - if (narg != atom->ntypes + 1) - error->all(FLERR,"Incorrect number of arguments for kim_style define command"); + if (narg != atom->ntypes) + error->all(FLERR,"Illegal kim_style command"); - char *model = arg[0]; + char *model = NULL; KIM::SimulatorModel *simulatorModel(NULL); int kimerror; @@ -182,17 +182,9 @@ void KimStyle::do_defn(int narg, char **arg) int ifix = modify->find_fix("KIM_MODEL_STORE"); if (ifix >= 0) { FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; - if (strcmp(model,"NULL") == 0) - model = (char *)fix_store->getptr("model_name"); - else if (strcmp(model,(const char*)fix_store->getptr("model_name")) != 0) - error->all(FLERR,"Inconsistent KIM model name"); - + model = (char *)fix_store->getptr("model_name"); simulatorModel = (KIM::SimulatorModel *)fix_store->getptr("simulator_model"); - } else { - - kimerror = KIM::SimulatorModel::Create(model,&simulatorModel); - if (kimerror) simulatorModel = NULL; - } + } else error->all(FLERR,"Must use 'kim_style init' before 'kim_style define'"); if (simulatorModel) { @@ -219,7 +211,7 @@ void KimStyle::do_defn(int narg, char **arg) if (*sim_name != "LAMMPS") error->all(FLERR,"Incompatible KIM Simulator Model"); - for (int i = 1; i < narg; i++) + for (int i = 0; i < narg; i++) atom_type_sym_list += std::string(" ") + arg[i]; simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); @@ -268,14 +260,6 @@ void KimStyle::do_defn(int narg, char **arg) if (*sim_value != update->unit_style) error->all(FLERR,"Incompatible units for KIM Simulator Model"); } - - if ((ifix < 0) && ( *sim_field == "model-init")) { - for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); - if (*sim_value != "") - error->all(FLERR,"Must use 'kim_style init' with this model"); - } - } } int sim_model_idx=-1; @@ -294,6 +278,7 @@ void KimStyle::do_defn(int narg, char **arg) error->all(FLERR,"KIM Simulator Model has no Model definition"); simulatorModel->ClearTemplateMap(); + } else { // not a simulator model. issue pair_style and pair_coeff commands. @@ -304,7 +289,7 @@ void KimStyle::do_defn(int narg, char **arg) cmd1 += model; std::string cmd2("pair_coeff * * "); - for (int i=1; i < narg; ++i) { + for (int i=0; i < narg; ++i) { cmd2 += arg[i]; cmd2 += " "; } diff --git a/src/KIM/kim_style.h b/src/KIM/kim_style.h index 588de6e620..eddc22eebc 100644 --- a/src/KIM/kim_style.h +++ b/src/KIM/kim_style.h @@ -83,5 +83,41 @@ class KimStyle : protected Pointers { /* ERROR/WARNING messages: +E: Illegal kim_style command + +Incorrect number or kind of arguments to kim_style + +E: Must use 'kim_style init' command before simulation box is defined + +Self-explanatory + +E: Must use 'kim_style define' command after simulation box is defined + +Self-explanatory + +E: Must use 'kim_style init' command before 'kim_style define' + +Self-explanatory + +E: Incompatible KIM Simulator Model + +The requested KIM Simulator Model was defined for a different MD code +and thus is not compatible with LAMMPS + +E: Species XXX is not supported by this KIM Simulator Model + +The kim_style define command was referencing a species that is not +present in the requested KIM Simulator Model + +E: Incompatible units for KIM Simulator Model + +The selected unit style is not compatible with the requested KIM +Simulator Model + +E: KIM Simulator Model has no Model definition + +There is no model definition (key: model-defn) in the KIM Simulator +Model. Please contact the OpenKIM database maintainers to verify +and potentially correct this. */ -- GitLab From c9fe5810c1c0029e42fa3ef1d1b4d6b0ea0f1c32 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 30 May 2019 21:52:23 -0400 Subject: [PATCH 020/236] add log outputs for updated kim_style command input examples --- ...og.30Apr2019.kim.VOH.simulator_model.g++.1 | 92 ++++++++++++ ....30Apr2019.kim.ex_si.simulator_model.g++.1 | 132 ++++++++++++++++++ ....30Apr2019.kim.ex_si.simulator_model.g++.4 | 132 ++++++++++++++++++ ...log.30Apr2019.kim.lj.simulator_model.g++.1 | 104 ++++++++++++++ ...log.30Apr2019.kim.lj.simulator_model.g++.4 | 104 ++++++++++++++ 5 files changed, 564 insertions(+) create mode 100644 examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 create mode 100644 examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 create mode 100644 examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 create mode 100644 examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 create mode 100644 examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 diff --git a/examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 b/examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 new file mode 100644 index 0000000000..e9d1f17d76 --- /dev/null +++ b/examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 @@ -0,0 +1,92 @@ +LAMMPS (30 Apr 2019) + using 1 OpenMP thread(s) per MPI task +# REAX potential for VOH system +# ..... + +units real +atom_style charge + +kim_style init Sim_LAMMPS_ReaxFF_ChenowethVanDuinPersson_2008_CHOV__SM_429148913211_000 +units real +atom_style charge +neigh_modify one 4000 + +read_data data.VOH + orthogonal box = (0 0 0) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 100 atoms + read_data CPU = 0.000217199 secs + +kim_style define H C O V +Using KIM Simulator Model : Sim_LAMMPS_ReaxFF_ChenowethVanDuinPersson_2008_CHOV__SM_429148913211_000 +For Simulator : LAMMPS 28-Feb-2019 +Running on : LAMMPS 30 Apr 2019 +pair_style reax/c /tmp/kim-simulator-model-parameter-file-XXXXXXFRmlac safezone 2.0 mincap 100 +pair_coeff * * /tmp/kim-simulator-model-parameter-file-XXXXXX363kge H C O V +Reading potential file /tmp/kim-simulator-model-parameter-file-XXXXXX363kge with DATE: 2011-02-18 +WARNING: Changed valency_val to valency_boc for X (src/USER-REAXC/reaxc_ffield.cpp:311) +fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 /tmp/kim-simulator-model-parameter-file-XXXXXXzgDl49 + +neighbor 2 bin +neigh_modify every 10 delay 0 check no + +fix 1 all nve +fix 3 all temp/berendsen 500.0 500.0 100.0 + +timestep 0.25 + +#dump 1 all atom 30 dump.reax.voh + +run 300 +Neighbor list info ... + update every 10 steps, delay 0 steps, check no + max neighbors/atom: 4000, page size: 100000 + master list distance cutoff = 12 + ghost atom cutoff = 12 + binsize = 6, bins = 5 5 5 + 2 neighbor lists, perpetual/occasional/extra = 2 0 0 + (1) pair reax/c, perpetual + attributes: half, newton off, ghost + pair build: half/bin/newtoff/ghost + stencil: half/ghost/bin/3d/newtoff + bin: standard + (2) fix qeq/reax, perpetual, copy from (1) + attributes: half, newton off, ghost + pair build: copy + stencil: none + bin: none +Per MPI rank memory allocation (min/avg/max) = 25.97 | 25.97 | 25.97 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 0 -10246.825 0 -10246.825 42.256089 + 300 199.45773 -10218.342 0 -10159.482 -66.730725 +Loop time of 1.06721 on 1 procs for 300 steps with 100 atoms + +Performance: 6.072 ns/day, 3.953 hours/ns, 281.107 timesteps/s +98.8% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.93954 | 0.93954 | 0.93954 | 0.0 | 88.04 +Neigh | 0.029087 | 0.029087 | 0.029087 | 0.0 | 2.73 +Comm | 0.0018935 | 0.0018935 | 0.0018935 | 0.0 | 0.18 +Output | 1.8358e-05 | 1.8358e-05 | 1.8358e-05 | 0.0 | 0.00 +Modify | 0.096112 | 0.096112 | 0.096112 | 0.0 | 9.01 +Other | | 0.0005522 | | | 0.05 + +Nlocal: 100 ave 100 max 100 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 608 ave 608 max 608 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 3441 ave 3441 max 3441 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 3441 +Ave neighs/atom = 34.41 +Neighbor list builds = 30 +Dangerous builds not checked + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:01 diff --git a/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 b/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 new file mode 100644 index 0000000000..a6d1c4a955 --- /dev/null +++ b/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 @@ -0,0 +1,132 @@ +LAMMPS (30 Apr 2019) + using 1 OpenMP thread(s) per MPI task + +units metal +kim_style init ex_sim_model_Si_mod_tersoff +units metal +newton on + +atom_style atomic +atom_modify map array +boundary p p p + +# temperatures +variable tlo equal 1800.0 +variable thi equal 2400.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +Lattice spacing in x,y,z = 5.431 5.431 5.431 + +region myreg block 0 4 0 4 0 4 +create_box 1 myreg +Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) + 1 by 1 by 1 MPI processor grid +create_atoms 1 region myreg +Created 512 atoms + create_atoms CPU = 0.000393867 secs + +mass 1 28.06 + +group Si type 1 +512 atoms in group Si + +velocity all create ${thi} 5287286 mom yes rot yes dist gaussian +velocity all create 2400 5287286 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +1 atoms in group del +delete_atoms group del +Deleted 1 atoms, new total = 511 +kim_style define Si +Using KIM Simulator Model : ex_sim_model_Si_mod_tersoff +For Simulator : LAMMPS 12-Dec-2018 +Running on : LAMMPS 30 Apr 2019 +pair_style tersoff/mod +pair_coeff * * /tmp/kim-simulator-model-parameter-file-XXXXXXVWG8uV Si +Reading potential file /tmp/kim-simulator-model-parameter-file-XXXXXXVWG8uV with DATE: 2013-07-26 + +thermo 10 + +fix 1 all nve +fix 2 all langevin ${thi} ${thi} 0.1 48278 +fix 2 all langevin 2400 ${thi} 0.1 48278 +fix 2 all langevin 2400 2400 0.1 48278 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +run 100 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 11 11 11 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tersoff/mod, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.11 | 3.11 | 3.11 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 2397.3877 -2363.0694 0 -2205.0272 15086.224 + 10 1328.4035 -2289.1682 0 -2201.5963 29164.666 + 20 1086.1557 -2254.4447 0 -2182.8424 31906.878 + 30 1528.8439 -2270.2968 0 -2169.5113 21610.528 + 40 1345.227 -2250.3915 0 -2161.7105 22146.886 + 50 1300.3329 -2235.8593 0 -2150.1379 23557.875 + 60 1546.1664 -2241.3019 0 -2139.3744 21648.774 + 70 1662.2896 -2236.2369 0 -2126.6543 23958.738 + 80 1631.7284 -2223.45 0 -2115.8821 28842.194 + 90 1795.3629 -2225.2998 0 -2106.9447 29522.37 + 100 1830.156 -2224.3733 0 -2103.7245 28805.09 +Loop time of 0.201725 on 1 procs for 100 steps with 511 atoms + +Performance: 42.831 ns/day, 0.560 hours/ns, 495.724 timesteps/s +99.3% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.19292 | 0.19292 | 0.19292 | 0.0 | 95.63 +Neigh | 0.0037313 | 0.0037313 | 0.0037313 | 0.0 | 1.85 +Comm | 0.00074744 | 0.00074744 | 0.00074744 | 0.0 | 0.37 +Output | 0.00026727 | 0.00026727 | 0.00026727 | 0.0 | 0.13 +Modify | 0.0036564 | 0.0036564 | 0.0036564 | 0.0 | 1.81 +Other | | 0.0004075 | | | 0.20 + +Nlocal: 511 ave 511 max 511 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 970 ave 970 max 970 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 9174 ave 9174 max 9174 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 9174 +Ave neighs/atom = 17.953 +Neighbor list builds = 4 +Dangerous builds = 0 + +Total wall time: 0:00:00 diff --git a/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 b/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 new file mode 100644 index 0000000000..dcb170aeb6 --- /dev/null +++ b/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 @@ -0,0 +1,132 @@ +LAMMPS (30 Apr 2019) + using 1 OpenMP thread(s) per MPI task + +units metal +kim_style init ex_sim_model_Si_mod_tersoff +units metal +newton on + +atom_style atomic +atom_modify map array +boundary p p p + +# temperatures +variable tlo equal 1800.0 +variable thi equal 2400.0 + +# coordination number cutoff + +variable r equal 2.835 + +# minimization parameters + +variable etol equal 1.0e-5 +variable ftol equal 1.0e-5 +variable maxiter equal 100 +variable maxeval equal 100 +variable dmax equal 1.0e-1 + +# diamond unit cell + +variable a equal 5.431 +lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 +Lattice spacing in x,y,z = 5.431 5.431 5.431 + +region myreg block 0 4 0 4 0 4 +create_box 1 myreg +Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) + 1 by 2 by 2 MPI processor grid +create_atoms 1 region myreg +Created 512 atoms + create_atoms CPU = 0.102434 secs + +mass 1 28.06 + +group Si type 1 +512 atoms in group Si + +velocity all create ${thi} 5287286 mom yes rot yes dist gaussian +velocity all create 2400 5287286 mom yes rot yes dist gaussian + +# make a vacancy + +group del id 300 +1 atoms in group del +delete_atoms group del +Deleted 1 atoms, new total = 511 +kim_style define Si +Using KIM Simulator Model : ex_sim_model_Si_mod_tersoff +For Simulator : LAMMPS 12-Dec-2018 +Running on : LAMMPS 30 Apr 2019 +pair_style tersoff/mod +pair_coeff * * /tmp/kim-simulator-model-parameter-file-XXXXXXqDlERL Si +Reading potential file /tmp/kim-simulator-model-parameter-file-XXXXXXqDlERL with DATE: 2013-07-26 + +thermo 10 + +fix 1 all nve +fix 2 all langevin ${thi} ${thi} 0.1 48278 +fix 2 all langevin 2400 ${thi} 0.1 48278 +fix 2 all langevin 2400 2400 0.1 48278 + +timestep 1.0e-3 +neighbor 1.0 bin +neigh_modify every 1 delay 10 check yes + +run 100 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 4.3 + ghost atom cutoff = 4.3 + binsize = 2.15, bins = 11 11 11 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair tersoff/mod, perpetual + attributes: full, newton on + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 3.082 | 3.082 | 3.082 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 2397.5824 -2363.0694 0 -2205.0143 15087.562 + 10 1298.5003 -2292.5456 0 -2206.945 28361.893 + 20 1114.7065 -2260.7006 0 -2187.2161 30574.077 + 30 1504.9472 -2271.8639 0 -2172.6537 20395.651 + 40 1357.5949 -2248.6066 0 -2159.1103 21779.773 + 50 1351.7212 -2235.0803 0 -2145.9713 23404.844 + 60 1582.4191 -2238.3233 0 -2134.006 21711.26 + 70 1654.3988 -2230.0965 0 -2121.0341 24276.504 + 80 1654.9629 -2218.6654 0 -2109.5658 27571.472 + 90 1815.7206 -2219.2065 0 -2099.5093 28475.757 + 100 1901.1544 -2216.5428 0 -2091.2137 28962.04 +Loop time of 4.36959 on 4 procs for 100 steps with 511 atoms + +Performance: 1.977 ns/day, 12.138 hours/ns, 22.885 timesteps/s +47.8% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.051784 | 0.056551 | 0.064825 | 2.1 | 1.29 +Neigh | 0.00093389 | 0.001028 | 0.0011392 | 0.3 | 0.02 +Comm | 2.8964 | 2.9342 | 3.016 | 2.8 | 67.15 +Output | 0.673 | 0.68159 | 0.69707 | 1.1 | 15.60 +Modify | 0.0011303 | 0.0029655 | 0.0081694 | 5.5 | 0.07 +Other | | 0.6933 | | | 15.87 + +Nlocal: 127.75 ave 134 max 123 min +Histogram: 1 0 0 2 0 0 0 0 0 1 +Nghost: 495 ave 498 max 489 min +Histogram: 1 0 0 0 0 0 0 1 1 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 2302 ave 2443 max 2194 min +Histogram: 1 0 0 2 0 0 0 0 0 1 + +Total # of neighbors = 9208 +Ave neighs/atom = 18.0196 +Neighbor list builds = 4 +Dangerous builds = 0 + +Total wall time: 0:00:05 diff --git a/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 b/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 new file mode 100644 index 0000000000..94aaf1aaef --- /dev/null +++ b/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 @@ -0,0 +1,104 @@ +LAMMPS (30 Apr 2019) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones melt +# +# This example requires that the example models provided with +# the kim-api package are installed. see the ./lib/kim/README or +# ./lib/kim/Install.py files for details on how to install these +# example models. +# + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units metal +atom_style atomic +newton on + +kim_style init LennardJones_Ar + +lattice fcc 4.4300 +Lattice spacing in x,y,z = 4.43 4.43 4.43 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) + 1 by 1 by 1 MPI processor grid +create_atoms 1 box +Created 32000 atoms + create_atoms CPU = 0.00314307 secs + +#pair_style lj/cut 8.1500 +#pair_coeff 1 1 0.0104 3.4000 + +kim_style define Ar +pair_style kim LennardJones_Ar +WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:980) +WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:985) +pair_coeff * * Ar + +mass 1 39.95 +velocity all create 200.0 232345 loop geom + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 all nve +#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 + +run 100 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 8.45 + ghost atom cutoff = 8.45 + binsize = 4.225, bins = 21 21 21 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair kim, perpetual + attributes: full, newton off, cut 8.45 + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 28.12 | 28.12 | 28.12 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 200 6290.8194 0 7118.0584 129712.25 + 100 95.179725 6718.814 0 7112.496 133346.59 +Loop time of 4.91804 on 1 procs for 100 steps with 32000 atoms + +Performance: 1.757 ns/day, 13.661 hours/ns, 20.333 timesteps/s +99.7% CPU use with 1 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 4.3033 | 4.3033 | 4.3033 | 0.0 | 87.50 +Neigh | 0.53176 | 0.53176 | 0.53176 | 0.0 | 10.81 +Comm | 0.024606 | 0.024606 | 0.024606 | 0.0 | 0.50 +Output | 0.00016403 | 0.00016403 | 0.00016403 | 0.0 | 0.00 +Modify | 0.038671 | 0.038671 | 0.038671 | 0.0 | 0.79 +Other | | 0.01951 | | | 0.40 + +Nlocal: 32000 ave 32000 max 32000 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 19911 ave 19911 max 19911 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 0 ave 0 max 0 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +FullNghs: 4.25375e+06 ave 4.25375e+06 max 4.25375e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 4253750 +Ave neighs/atom = 132.93 +Neighbor list builds = 3 +Dangerous builds = 0 +Total wall time: 0:00:05 diff --git a/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 b/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 new file mode 100644 index 0000000000..3377f22d02 --- /dev/null +++ b/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 @@ -0,0 +1,104 @@ +LAMMPS (30 Apr 2019) + using 1 OpenMP thread(s) per MPI task +# 3d Lennard-Jones melt +# +# This example requires that the example models provided with +# the kim-api package are installed. see the ./lib/kim/README or +# ./lib/kim/Install.py files for details on how to install these +# example models. +# + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable xx equal 20*1 +variable yy equal 20*$y +variable yy equal 20*1 +variable zz equal 20*$z +variable zz equal 20*1 + +units metal +atom_style atomic +newton on + +kim_style init LennardJones_Ar + +lattice fcc 4.4300 +Lattice spacing in x,y,z = 4.43 4.43 4.43 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +region box block 0 20 0 ${yy} 0 ${zz} +region box block 0 20 0 20 0 ${zz} +region box block 0 20 0 20 0 20 +create_box 1 box +Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) + 1 by 2 by 2 MPI processor grid +create_atoms 1 box +Created 32000 atoms + create_atoms CPU = 0.0979962 secs + +#pair_style lj/cut 8.1500 +#pair_coeff 1 1 0.0104 3.4000 + +kim_style define Ar +pair_style kim LennardJones_Ar +WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:980) +WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:985) +pair_coeff * * Ar + +mass 1 39.95 +velocity all create 200.0 232345 loop geom + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 all nve +#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 + +run 100 +Neighbor list info ... + update every 1 steps, delay 0 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 8.45 + ghost atom cutoff = 8.45 + binsize = 4.225, bins = 21 21 21 + 1 neighbor lists, perpetual/occasional/extra = 1 0 0 + (1) pair kim, perpetual + attributes: full, newton off, cut 8.45 + pair build: full/bin/atomonly + stencil: full/bin/3d + bin: standard +Per MPI rank memory allocation (min/avg/max) = 9.789 | 9.789 | 9.789 Mbytes +Step Temp E_pair E_mol TotEng Press + 0 200 6290.8194 0 7118.0584 129712.25 + 100 95.179725 6718.814 0 7112.496 133346.59 +Loop time of 6.29539 on 4 procs for 100 steps with 32000 atoms + +Performance: 1.372 ns/day, 17.487 hours/ns, 15.885 timesteps/s +48.4% CPU use with 4 MPI tasks x 1 OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 1.9399 | 2.079 | 2.2181 | 9.1 | 33.02 +Neigh | 0.25924 | 0.26632 | 0.2692 | 0.8 | 4.23 +Comm | 2.5011 | 2.6605 | 2.751 | 5.9 | 42.26 +Output | 0.069904 | 0.07097 | 0.071545 | 0.3 | 1.13 +Modify | 0.011383 | 0.012206 | 0.01419 | 1.0 | 0.19 +Other | | 1.206 | | | 19.16 + +Nlocal: 8000 ave 8018 max 7967 min +Histogram: 1 0 0 0 0 0 1 0 0 2 +Nghost: 9131 ave 9164 max 9113 min +Histogram: 2 0 0 1 0 0 0 0 0 1 +Neighs: 0 ave 0 max 0 min +Histogram: 4 0 0 0 0 0 0 0 0 0 +FullNghs: 1.06344e+06 ave 1.06594e+06 max 1.05881e+06 min +Histogram: 1 0 0 0 0 0 1 0 0 2 + +Total # of neighbors = 4253750 +Ave neighs/atom = 132.93 +Neighbor list builds = 3 +Dangerous builds = 0 +Total wall time: 0:00:07 -- GitLab From df1308ad922c4fd47bcd90bb5253540902ac2aff Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 30 May 2019 21:58:18 -0400 Subject: [PATCH 021/236] add kim_style error messages to Errors_messages.txt doc file --- doc/src/Errors_messages.txt | 33 +++++++++++++++++++++++++++++++++ src/KIM/kim_style.h | 14 +++++++------- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/doc/src/Errors_messages.txt b/doc/src/Errors_messages.txt index fb5003e602..7f6e80948c 100644 --- a/doc/src/Errors_messages.txt +++ b/doc/src/Errors_messages.txt @@ -5729,6 +5729,16 @@ definitions. :dd The data file header lists improper but no improper types. :dd +{Incompatible KIM Simulator Model} :dt + +The requested KIM Simulator Model was defined for a different MD code +and thus is not compatible with LAMMPS. :dd + +{Incompatible units for KIM Simulator Model} :dt + +The selected unit style is not compatible with the requested KIM +Simulator Model. :dd + {Incomplete use of variables in create_atoms command} :dt The var and set options must be used together. :dd @@ -6988,6 +6998,12 @@ The atom style defined does not have this attribute. :dd The atom style defined does not have these attributes. :dd +{KIM Simulator Model has no Model definition} :dt + +There is no model definition (key: model-defn) in the KIM Simulator +Model. Please contact the OpenKIM database maintainers to verify +and potentially correct this. :dd + {KOKKOS package does not yet support comm_style tiled} :dt Self-explanatory. :dd @@ -7475,6 +7491,18 @@ Self-explanatory. :dd Self-explanatory. :dd +{Must use 'kim_style init' command before simulation box is defined} :dt + +Self-explanatory. :dd + +{Must use 'kim_style define' command after simulation box is defined} :dt + +Self-explanatory. :dd + +{Must use 'kim_style init' command before 'kim_style define'} :dt + +Self-explanatory. :dd + {Must use 'kspace_modify pressure/scalar no' for rRESPA with kspace_style MSM} :dt The kspace scalar pressure option cannot (yet) be used with rRESPA. :dd @@ -9418,6 +9446,11 @@ See the "read_data extra/special/per/atom" command for info on how to leave space in the special bonds list to allow for additional bonds to be formed. :dd +{Species XXX is not supported by this KIM Simulator Model} :dt + +The kim_style define command was referencing a species that is not +present in the requested KIM Simulator Model. :dd + {Specified processors != physical processors} :dt The 3d grid of processors defined by the processors command does not diff --git a/src/KIM/kim_style.h b/src/KIM/kim_style.h index eddc22eebc..f8c0602beb 100644 --- a/src/KIM/kim_style.h +++ b/src/KIM/kim_style.h @@ -85,34 +85,34 @@ class KimStyle : protected Pointers { E: Illegal kim_style command -Incorrect number or kind of arguments to kim_style +Incorrect number or kind of arguments to kim_style. E: Must use 'kim_style init' command before simulation box is defined -Self-explanatory +Self-explanatory. E: Must use 'kim_style define' command after simulation box is defined -Self-explanatory +Self-explanatory. E: Must use 'kim_style init' command before 'kim_style define' -Self-explanatory +Self-explanatory. E: Incompatible KIM Simulator Model The requested KIM Simulator Model was defined for a different MD code -and thus is not compatible with LAMMPS +and thus is not compatible with LAMMPS. E: Species XXX is not supported by this KIM Simulator Model The kim_style define command was referencing a species that is not -present in the requested KIM Simulator Model +present in the requested KIM Simulator Model. E: Incompatible units for KIM Simulator Model The selected unit style is not compatible with the requested KIM -Simulator Model +Simulator Model. E: KIM Simulator Model has no Model definition -- GitLab From edecd2b7601f900e99b6eaeb9c3acb25dfe35edc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 30 May 2019 22:19:47 -0400 Subject: [PATCH 022/236] fix typo and update list of false positives for updated docs --- doc/src/kim_style.txt | 2 +- doc/utils/sphinx-config/false_positives.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/kim_style.txt b/doc/src/kim_style.txt index dcdfae1cdc..afa7a19fab 100644 --- a/doc/src/kim_style.txt +++ b/doc/src/kim_style.txt @@ -51,7 +51,7 @@ The {kim_style define} command will issue commands that will realize the selected model (through generating pair_style and pair_coeff commands, but also other commands, as required). It has to be issued [after] the the simulation box is defined. The {kim_style define} command allows a -varying numbver of additional arguments. Those are used to map the atom +varying number of additional arguments. Those are used to map the atom types in LAMMPS to the available species in the KIM model. This is equivalent to the arguments following "pair_coeff * *" in a "kim"_pair_kim.html pair style. Thus the commands: diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 7160800c50..a8bfa8f193 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -521,6 +521,7 @@ decrementing deeppink deepskyblue defgrad +defn deformable del deleteIDs @@ -2792,6 +2793,7 @@ txt typeI typeJ typeN +typeargs Tz Tzou ub -- GitLab From 22fd12b56c803e6e0e5939bb0a950adf080c31a9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Jun 2019 17:14:17 -0400 Subject: [PATCH 023/236] support storing unit conversion variable setting between kim_style calls --- src/KIM/fix_store_kim.cpp | 29 ++++++++++++++++++++++++++++- src/KIM/fix_store_kim.h | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/KIM/fix_store_kim.cpp b/src/KIM/fix_store_kim.cpp index 8e9946c20d..6423a57e18 100644 --- a/src/KIM/fix_store_kim.cpp +++ b/src/KIM/fix_store_kim.cpp @@ -65,7 +65,8 @@ using namespace FixConst; /* ---------------------------------------------------------------------- */ FixStoreKIM::FixStoreKIM(LAMMPS *lmp, int narg, char **arg) - : Fix(lmp, narg, arg), simulator_model(NULL), model_name(NULL) + : Fix(lmp, narg, arg), simulator_model(NULL), model_name(NULL), + units_from(NULL), units_to(NULL) { if (narg != 3) error->all(FLERR,"Illegal fix STORE/KIM command"); } @@ -87,6 +88,18 @@ FixStoreKIM::~FixStoreKIM() delete[] mn; model_name = NULL; } + + if (units_from) { + char *uf = (char *)units_from; + delete[] uf; + units_from = NULL; + } + + if (units_to) { + char *ut = (char *)units_to; + delete[] ut; + units_to = NULL; + } } /* ---------------------------------------------------------------------- */ @@ -114,6 +127,18 @@ void FixStoreKIM::setptr(const char *name, void *ptr) delete[] mn; } model_name = ptr; + } else if (strcmp(name,"units_from") == 0) { + if (units_from) { + char *uf = (char *)units_from; + delete[] uf; + } + units_from = ptr; + } else if (strcmp(name,"units_to") == 0) { + if (units_to) { + char *ut = (char *)units_to; + delete[] ut; + } + units_to = ptr; } } @@ -123,5 +148,7 @@ void *FixStoreKIM::getptr(const char *name) { if (strcmp(name,"simulator_model") == 0) return simulator_model; else if (strcmp(name,"model_name") == 0) return model_name; + else if (strcmp(name,"units_from") == 0) return units_from; + else if (strcmp(name,"units_to") == 0) return units_to; else return NULL; } diff --git a/src/KIM/fix_store_kim.h b/src/KIM/fix_store_kim.h index 04081fd6dc..5bca2a3dd0 100644 --- a/src/KIM/fix_store_kim.h +++ b/src/KIM/fix_store_kim.h @@ -80,6 +80,8 @@ class FixStoreKIM : public Fix { private: void *simulator_model; // pointer to KIM simulator model class void *model_name; // string of KIM model name + void *units_from; // string of unit conversion origin or NULL + void *units_to; // string of unit conversion target or NULL }; } -- GitLab From 9a428217d9f9d864e7ff66618645dfab4be04341 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Jun 2019 17:19:18 -0400 Subject: [PATCH 024/236] prototype implementation of unit conversion variable support --- src/KIM/kim_style.cpp | 161 +++++++++++++++++++++++++++++++++++++++++- src/KIM/kim_style.h | 4 ++ 2 files changed, 162 insertions(+), 3 deletions(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index 856fb94c9e..814da6b188 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -65,6 +65,7 @@ #include "update.h" #include "universe.h" #include "input.h" +#include "variable.h" #include "fix_store_kim.h" #include "KIM_SimulatorModel.hpp" @@ -78,20 +79,33 @@ void KimStyle::command(int narg, char **arg) { if (narg < 2) error->all(FLERR,"Illegal kim_style command"); + units_from = NULL; + units_to = NULL; + if (strcmp(arg[0],"init") == 0) { - if (narg > 2) error->all(FLERR,"Illegal kim_style command"); if (domain->box_exist) error->all(FLERR,"Must use 'kim_style init' command before " "simulation box is defined"); int len = strlen(arg[1])+1; char *model = new char[len]; strcpy(model,arg[1]); + + int args_done = do_units(narg-2,arg-2); + if (narg > (args_done + 2)) + error->all(FLERR,"Illegal kim_style command"); do_init(model); + do_variables(); } else if (strcmp(arg[0],"define") == 0) { if (!domain->box_exist) error->all(FLERR,"Must use 'kim_style define' command after " "simulation box is defined"); - do_defn(narg-1,arg+1); + int args_done = do_units(narg-1,arg-1); + do_defn(narg - (args_done+1),arg + (args_done+1)); + } else if (strcmp(arg[0],"unit_variables") == 0) { + int args_done = do_units(narg,arg); + if (narg > args_done) + error->all(FLERR,"Illegal kim_style command"); + do_variables(); } else error->all(FLERR,"Illegal kim_style command"); } @@ -113,6 +127,8 @@ void KimStyle::do_init(char *model) FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; fix_store->setptr("model_name", (void *) model); + fix_store->setptr("units_from", (void *) units_from); + fix_store->setptr("units_to", (void *) units_to); int kimerror; KIM::SimulatorModel * simulatorModel; @@ -172,7 +188,6 @@ void KimStyle::do_defn(int narg, char **arg) char *model = NULL; KIM::SimulatorModel *simulatorModel(NULL); - int kimerror; // check if we had a kim_style init command by finding fix STORE/KIM // retrieve model name and pointer to simulator model class instance. @@ -298,3 +313,143 @@ void KimStyle::do_defn(int narg, char **arg) input->one(cmd2.c_str()); } } + +/* ---------------------------------------------------------------------- */ + +int KimStyle::do_units(int narg, char **arg) +{ + // retrieve custom units setting if kim_style had been called before + + int ifix = modify->find_fix("KIM_MODEL_STORE"); + FixStoreKIM *fix_store = NULL; + if (ifix >= 0) { + fix_store = (FixStoreKIM *) modify->fix[ifix]; + units_from = (char *)fix_store->getptr("units_from"); + units_to = (char *)fix_store->getptr("units_to"); + } + + if (narg < 2) return 0; + int iarg=0; + for (iarg = 0; iarg < narg; iarg += 2) { + if (strcmp(arg[iarg],"unit_variables") == 0) { + if (narg > iarg+2) error->all(FLERR,"Illegal kim_style command"); + if (strcmp(arg[iarg+1],"NULL") == 0) { + delete[] units_to; + units_to = NULL; + } else { + int len = strlen(arg[iarg+1])+1; + delete[] units_to; + units_to = new char[len]; + strcpy(units_to,arg[iarg+1]); + } + if (fix_store) fix_store->setptr("units_to",units_to); + } else if (strcmp(arg[iarg],"unit_from") == 0) { + if (narg > iarg+2) error->all(FLERR,"Illegal kim_style command"); + if (strcmp(arg[iarg+1],"NULL") == 0) { + delete[] units_from; + units_from = NULL; + } else { + int len = strlen(arg[iarg+1])+1; + delete[] units_from; + units_from = new char[len]; + strcpy(units_from,arg[iarg+1]); + } + if (fix_store) fix_store->setptr("units_from",units_from); + } else return iarg; + } + return iarg; +} + +/* ---------------------------------------------------------------------- */ + +void KimStyle::do_variables() +{ + char *from, *to; + Variable *variable = input->variable; + + if (units_from) from = units_from; + else from = update->unit_style; + if (units_to) to = units_to; + else to = update->unit_style; + + // refuse convertion from or to reduced units + + if ((strcmp(from,"lj") == 0) || (strcmp(to,"lj") == 0)) + error->all(FLERR,"Cannot set up conversion variables for 'lj' units"); + + // get index to internal style variables. create, if needed. + // default to conversion factor 1.0 for newly created variables + + int v_length, v_mass, v_time; + char *args[3]; + args[1] = (char *)"internal"; + args[2] = (char *)"1.0"; + + args[0] = (char *)"_u_length"; + v_length = variable->find(args[0]); + if (v_length < 0) { + variable->set(3,args); + v_length = variable->find(args[0]); + } + + args[0] = (char *)"_u_mass"; + v_mass = variable->find(args[0]); + if (v_mass < 0) { + variable->set(3,args); + v_mass = variable->find(args[0]); + } + + args[0] = (char *)"_u_time"; + v_time = variable->find(args[0]); + if (v_time < 0) { + variable->set(3,args); + v_time = variable->find(args[0]); + } + + // special case: both unit styles are the same => conversion factor 1.0 + + if (strcmp(from,to) == 0) { + variable->internal_set(v_length,1.0); + variable->internal_set(v_mass,1.0); + variable->internal_set(v_time,1.0); + return; + } + + if (strcmp(from,"real") == 0) { + if (strcmp(to,"metal") == 0) { + variable->internal_set(v_length,1.0); + variable->internal_set(v_mass,1.0); + variable->internal_set(v_time,0.001); + } else { + std::string err("Do not know how to set up conversion variables "); + err += "between '"; + err += from; + err += "' and '"; + err += to; + err += "' units"; + error->all(FLERR,err.c_str()); + } + } else if (strcmp(from,"metal") == 0) { + if (strcmp(to,"real") == 0) { + variable->internal_set(v_length,1.0); + variable->internal_set(v_mass,1.0); + variable->internal_set(v_time,1000.0); + } else { + std::string err("Do not know how to set up conversion variables "); + err += "between '"; + err += from; + err += "' and '"; + err += to; + err += "' units"; + error->all(FLERR,err.c_str()); + } + } else { + std::string err("Do not know how to set up conversion variables "); + err += "between '"; + err += from; + err += "' and '"; + err += to; + err += "' units"; + error->all(FLERR,err.c_str()); + } +} diff --git a/src/KIM/kim_style.h b/src/KIM/kim_style.h index f8c0602beb..36084183ee 100644 --- a/src/KIM/kim_style.h +++ b/src/KIM/kim_style.h @@ -72,8 +72,12 @@ class KimStyle : protected Pointers { KimStyle(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); private: + char *units_from; + char *units_to; void do_init(char *); void do_defn(int, char **); + int do_units(int, char **); + void do_variables(); }; } -- GitLab From 664b938ed12cafc2fa232a34abccd4d79278a494 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 10 Jun 2019 17:45:07 -0400 Subject: [PATCH 025/236] document kim_style changes --- doc/src/kim_style.txt | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/doc/src/kim_style.txt b/doc/src/kim_style.txt index afa7a19fab..c24cfe8581 100644 --- a/doc/src/kim_style.txt +++ b/doc/src/kim_style.txt @@ -12,15 +12,18 @@ kim_style command :h3 kim_style mode args :pre -mode = {init model} or {define typeargs} +mode = {init model} or {define typeargs} or no mode chosen model = name of the KIM model (KIM potential or KIM simulator model) -typeargs = atom type to species mapping (one entry per atom type) :ul +typeargs = atom type to species mapping (one entry per atom type) +args = {unit_variables unit_style} or {unit_from unit_style} (optional):ul [Examples:] -kim_style init ex_sim_model_Si_mod_tersoff +kim_style init ex_sim_model_Si_mod_tersoff unit_variables metal kim_style define Si Si -kim_style init LennardJones_Ar +kim_style unit_variables real +kim_style init LennardJones_Ar unit_variables metal +kim_style unit_variables real unit_from metal kim_style define Ar :pre [Description:] @@ -47,6 +50,21 @@ for using a selected simulator model. If needed, those settings can be overridden. The second argument to the {kim_style init} command is the KIM model ID. +In both modes, the keywords {unit_variables} and {unit_from} may be +added. They control the values of a set of +"internal style variables"_variable.html that can be used to convert +between different unit styles in LAMMPS. The argument to +each keyword is a LAMMPS unit style or NULL, which means to look up +the unit style from what was set with the "units"_units.html command. +Please note, that KIM simulator models will set their preferred unit style. +By default all conversion variables are set to 1.0. Converting to or +from the "lj" unit style is not supported. The following variables are defined: + +_u_length +_u_mass +_u_time :ul + + The {kim_style define} command will issue commands that will realize the selected model (through generating pair_style and pair_coeff commands, but also other commands, as required). It has to be issued [after] the -- GitLab From 7fab12c36f847efddd6d6e6c0d1939c0036be0eb Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Fri, 14 Jun 2019 16:53:26 +0200 Subject: [PATCH 026/236] Add keyword hybridpair for compute_pressure only on a certain pair of a hybrid pair --- src/compute_pressure.cpp | 17 +++++++++++++++++ src/compute_pressure.h | 1 + src/pair_hybrid.h | 1 + 3 files changed, 19 insertions(+) diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index dde02a5aed..8381e04fa8 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -22,6 +22,7 @@ #include "fix.h" #include "force.h" #include "pair.h" +#include "pair_hybrid.h" #include "bond.h" #include "angle.h" #include "dihedral.h" @@ -66,6 +67,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : // process optional args + hybridpairflag = 0; if (narg == 4) { keflag = 1; pairflag = 1; @@ -79,6 +81,8 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : int iarg = 4; while (iarg < narg) { if (strcmp(arg[iarg],"ke") == 0) keflag = 1; + else if (strcmp(arg[iarg],"hybridpair") == 0) + hybridpairflag = force->inumeric(FLERR, arg[++iarg]); else if (strcmp(arg[iarg],"pair") == 0) pairflag = 1; else if (strcmp(arg[iarg],"bond") == 0) bondflag = 1; else if (strcmp(arg[iarg],"angle") == 0) angleflag = 1; @@ -140,6 +144,12 @@ void ComputePressure::init() nvirial = 0; vptr = NULL; + if (hybridpairflag > 0 && force->pair) { + if (strstr(force->pair_style, "hybrid")) { + PairHybrid *ph = (PairHybrid *) force->pair; + if (hybridpairflag <= ph->nstyles) nvirial++; + } + } if (pairflag && force->pair) nvirial++; if (bondflag && atom->molecular && force->bond) nvirial++; if (angleflag && atom->molecular && force->angle) nvirial++; @@ -152,6 +162,13 @@ void ComputePressure::init() if (nvirial) { vptr = new double*[nvirial]; nvirial = 0; + if (hybridpairflag > 0 && force->pair) { + if (strstr(force->pair_style, "hybrid")) { + PairHybrid *ph = (PairHybrid *) force->pair; + if (hybridpairflag <= ph->nstyles) + vptr[nvirial++] = ph->styles[hybridpairflag-1]->virial; + } + } if (pairflag && force->pair) vptr[nvirial++] = force->pair->virial; if (bondflag && force->bond) vptr[nvirial++] = force->bond->virial; if (angleflag && force->angle) vptr[nvirial++] = force->angle->virial; diff --git a/src/compute_pressure.h b/src/compute_pressure.h index a59a64e634..3259377bd8 100644 --- a/src/compute_pressure.h +++ b/src/compute_pressure.h @@ -41,6 +41,7 @@ class ComputePressure : public Compute { Compute *temperature; char *id_temp; double virial[6]; + int hybridpairflag; int keflag,pairflag,bondflag,angleflag,dihedralflag,improperflag; int fixflag,kspaceflag; diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index e313e16f18..1e0130ba3d 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -33,6 +33,7 @@ class PairHybrid : public Pair { friend class Respa; friend class Info; friend class PairDeprecated; + friend class ComputePressure; public: PairHybrid(class LAMMPS *); virtual ~PairHybrid(); -- GitLab From 3611cfdaf8c153750ce8cc45ac239c1145eb0a2b Mon Sep 17 00:00:00 2001 From: mkanski Date: Fri, 14 Jun 2019 19:58:31 +0200 Subject: [PATCH 027/236] All styles support setting molecules' orientation --- doc/src/create_atoms.txt | 5 ++--- src/create_atoms.cpp | 10 ++++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/doc/src/create_atoms.txt b/doc/src/create_atoms.txt index d80e2d45f1..e673849793 100644 --- a/doc/src/create_atoms.txt +++ b/doc/src/create_atoms.txt @@ -242,9 +242,8 @@ write_dump all atom sinusoid.lammpstrj :pre :c,image(JPG/sinusoid_small.jpg,JPG/sinusoid.jpg) -The {rotate} keyword can only be used with the {single} style and -when adding a single molecule. It allows to specify the orientation -at which the molecule is inserted. The axis of rotation is +The {rotate} keyword allows to specify the orientation +at which molecules are inserted. The axis of rotation is determined by the rotation vector (Rx,Ry,Rz) that goes through the insertion point. The specified {theta} determines the angle of rotation around that axis. Note that the direction of rotation for diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 52e4256fca..8869171115 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -176,8 +176,6 @@ void CreateAtoms::command(int narg, char **arg) } else error->all(FLERR,"Illegal create_atoms command"); iarg += 3; } else if (strcmp(arg[iarg],"rotate") == 0) { - if (style != SINGLE) - error->all(FLERR,"Cannot use create_atoms rotate unless single style"); if (iarg+5 > narg) error->all(FLERR,"Illegal create_atoms command"); double thetaone; double axisone[3]; @@ -678,7 +676,9 @@ void CreateAtoms::add_random() coord[1] >= sublo[1] && coord[1] < subhi[1] && coord[2] >= sublo[2] && coord[2] < subhi[2]) { if (mode == ATOM) atom->avec->create_atom(ntype,xone); - else add_molecule(xone); + else if (quatone[0] == 0 && quatone[1] == 0 && quatone[2] == 0) + add_molecule(xone); + else add_molecule(xone, quatone); } } @@ -832,7 +832,9 @@ void CreateAtoms::add_lattice() // add the atom or entire molecule to my list of atoms if (mode == ATOM) atom->avec->create_atom(basistype[m],x); - else add_molecule(x); + else if (quatone[0] == 0 && quatone[1] == 0 && quatone[2] == 0) + add_molecule(x); + else add_molecule(x,quatone); } } } -- GitLab From 959da9de013d29d9e58bb4d2c4b6d8a48308bdc5 Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Sat, 16 Feb 2019 14:49:44 +0000 Subject: [PATCH 028/236] Create a compute for the momentum of a group of atoms --- src/Makefile.list | 4 +-- src/compute_momentum.cpp | 59 ++++++++++++++++++++++++++++++++++++++++ src/compute_momentum.h | 36 ++++++++++++++++++++++++ 3 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 src/compute_momentum.cpp create mode 100644 src/compute_momentum.h diff --git a/src/Makefile.list b/src/Makefile.list index 65bbebca09..6e4c9726a6 100644 --- a/src/Makefile.list +++ b/src/Makefile.list @@ -7,9 +7,9 @@ SHELL = /bin/sh ROOT = lmp EXE = $(ROOT)_$@ -SRC = angle.cpp angle_charmm.cpp angle_cosine.cpp angle_cosine_delta.cpp angle_cosine_squared.cpp angle_harmonic.cpp angle_hybrid.cpp angle_table.cpp atom.cpp atom_vec.cpp atom_vec_angle.cpp atom_vec_atomic.cpp atom_vec_bond.cpp atom_vec_charge.cpp atom_vec_full.cpp atom_vec_hybrid.cpp atom_vec_molecular.cpp bond.cpp bond_fene.cpp bond_fene_expand.cpp bond_harmonic.cpp bond_hybrid.cpp bond_morse.cpp bond_nonlinear.cpp bond_quartic.cpp bond_table.cpp change_box.cpp comm.cpp compute.cpp compute_angle_local.cpp compute_bond_local.cpp compute_centro_atom.cpp compute_cna_atom.cpp compute_com.cpp compute_com_molecule.cpp compute_coord_atom.cpp compute_dihedral_local.cpp compute_displace_atom.cpp compute_erotate_sphere.cpp compute_group_group.cpp compute_gyration.cpp compute_gyration_molecule.cpp compute_heat_flux.cpp compute_improper_local.cpp compute_ke.cpp compute_ke_atom.cpp compute_msd.cpp compute_msd_molecule.cpp compute_pair_local.cpp compute_pe.cpp compute_pe_atom.cpp compute_pressure.cpp compute_property_atom.cpp compute_property_local.cpp compute_property_molecule.cpp compute_rdf.cpp compute_reduce.cpp compute_reduce_region.cpp compute_stress_atom.cpp compute_temp.cpp compute_temp_com.cpp compute_temp_deform.cpp compute_temp_partial.cpp compute_temp_profile.cpp compute_temp_ramp.cpp compute_temp_region.cpp compute_temp_sphere.cpp create_atoms.cpp create_box.cpp delete_atoms.cpp delete_bonds.cpp dihedral.cpp dihedral_charmm.cpp dihedral_harmonic.cpp dihedral_helix.cpp dihedral_hybrid.cpp dihedral_multi_harmonic.cpp dihedral_opls.cpp displace_atoms.cpp displace_box.cpp domain.cpp dump.cpp dump_atom.cpp dump_cfg.cpp dump_custom.cpp dump_dcd.cpp dump_local.cpp dump_xyz.cpp error.cpp ewald.cpp fft3d.cpp fft3d_wrap.cpp finish.cpp fix.cpp fix_adapt.cpp fix_addforce.cpp fix_ave_atom.cpp fix_ave_correlate.cpp fix_ave_histo.cpp fix_ave_spatial.cpp fix_ave_time.cpp fix_aveforce.cpp fix_bond_break.cpp fix_bond_create.cpp fix_bond_swap.cpp fix_box_relax.cpp fix_deform.cpp fix_deposit.cpp fix_drag.cpp fix_dt_reset.cpp fix_efield.cpp fix_enforce2d.cpp fix_evaporate.cpp fix_gravity.cpp fix_heat.cpp fix_indent.cpp fix_langevin.cpp fix_lineforce.cpp fix_minimize.cpp fix_momentum.cpp fix_move.cpp fix_nh.cpp fix_nh_sphere.cpp fix_nph.cpp fix_nph_sphere.cpp fix_npt.cpp fix_npt_sphere.cpp fix_nve.cpp fix_nve_limit.cpp fix_nve_noforce.cpp fix_nve_sphere.cpp fix_nvt.cpp fix_nvt_sllod.cpp fix_nvt_sphere.cpp fix_orient_fcc.cpp fix_planeforce.cpp fix_press_berendsen.cpp fix_print.cpp fix_qeq_comb.cpp fix_recenter.cpp fix_respa.cpp fix_rigid.cpp fix_rigid_nve.cpp fix_rigid_nvt.cpp fix_setforce.cpp fix_shake.cpp fix_shear_history.cpp fix_spring.cpp fix_spring_rg.cpp fix_spring_self.cpp fix_store_force.cpp fix_store_state.cpp fix_temp_berendsen.cpp fix_temp_rescale.cpp fix_thermal_conductivity.cpp fix_tmd.cpp fix_ttm.cpp fix_viscosity.cpp fix_viscous.cpp fix_wall.cpp fix_wall_harmonic.cpp fix_wall_lj126.cpp fix_wall_lj93.cpp fix_wall_reflect.cpp fix_wall_region.cpp force.cpp group.cpp improper.cpp improper_cvff.cpp improper_harmonic.cpp improper_hybrid.cpp input.cpp integrate.cpp kspace.cpp lammps.cpp lattice.cpp library.cpp main.cpp memory.cpp min.cpp min_cg.cpp min_hftn.cpp min_linesearch.cpp min_sd.cpp minimize.cpp modify.cpp neigh_bond.cpp neigh_derive.cpp neigh_full.cpp neigh_gran.cpp neigh_half_bin.cpp neigh_half_multi.cpp neigh_half_nsq.cpp neigh_list.cpp neigh_request.cpp neigh_respa.cpp neigh_stencil.cpp neighbor.cpp output.cpp pack.cpp pair.cpp pair_airebo.cpp pair_born_coul_long.cpp pair_buck.cpp pair_buck_coul_cut.cpp pair_buck_coul_long.cpp pair_comb.cpp pair_coul_cut.cpp pair_coul_debye.cpp pair_coul_long.cpp pair_dpd.cpp pair_dpd_tstat.cpp pair_eam.cpp pair_eam_alloy.cpp pair_eam_fs.cpp pair_eim.cpp pair_hybrid.cpp pair_hybrid_overlay.cpp pair_lj96_cut.cpp pair_lj_charmm_coul_charmm.cpp pair_lj_charmm_coul_charmm_implicit.cpp pair_lj_charmm_coul_long.cpp pair_lj_cut.cpp pair_lj_cut_coul_cut.cpp pair_lj_cut_coul_debye.cpp pair_lj_cut_coul_long.cpp pair_lj_cut_coul_long_tip4p.cpp pair_lj_expand.cpp pair_lj_gromacs.cpp pair_lj_gromacs_coul_gromacs.cpp pair_lj_smooth.cpp pair_morse.cpp pair_soft.cpp pair_sw.cpp pair_table.cpp pair_tersoff.cpp pair_tersoff_zbl.cpp pair_yukawa.cpp pppm.cpp pppm_tip4p.cpp random_mars.cpp random_park.cpp read_data.cpp read_restart.cpp region.cpp region_block.cpp region_cone.cpp region_cylinder.cpp region_intersect.cpp region_plane.cpp region_prism.cpp region_sphere.cpp region_union.cpp remap.cpp remap_wrap.cpp replicate.cpp respa.cpp run.cpp set.cpp shell.cpp special.cpp temper.cpp thermo.cpp timer.cpp universe.cpp update.cpp variable.cpp velocity.cpp verlet.cpp write_restart.cpp +SRC = angle.cpp angle_charmm.cpp angle_cosine.cpp angle_cosine_delta.cpp angle_cosine_squared.cpp angle_harmonic.cpp angle_hybrid.cpp angle_table.cpp atom.cpp atom_vec.cpp atom_vec_angle.cpp atom_vec_atomic.cpp atom_vec_bond.cpp atom_vec_charge.cpp atom_vec_full.cpp atom_vec_hybrid.cpp atom_vec_molecular.cpp bond.cpp bond_fene.cpp bond_fene_expand.cpp bond_harmonic.cpp bond_hybrid.cpp bond_morse.cpp bond_nonlinear.cpp bond_quartic.cpp bond_table.cpp change_box.cpp comm.cpp compute.cpp compute_angle_local.cpp compute_bond_local.cpp compute_centro_atom.cpp compute_cna_atom.cpp compute_com.cpp compute_com_molecule.cpp compute_coord_atom.cpp compute_dihedral_local.cpp compute_displace_atom.cpp compute_erotate_sphere.cpp compute_group_group.cpp compute_gyration.cpp compute_gyration_molecule.cpp compute_heat_flux.cpp compute_improper_local.cpp compute_ke.cpp compute_ke_atom.cpp compute_momentum.cpp compute_msd.cpp compute_msd_molecule.cpp compute_pair_local.cpp compute_pe.cpp compute_pe_atom.cpp compute_pressure.cpp compute_property_atom.cpp compute_property_local.cpp compute_property_molecule.cpp compute_rdf.cpp compute_reduce.cpp compute_reduce_region.cpp compute_stress_atom.cpp compute_temp.cpp compute_temp_com.cpp compute_temp_deform.cpp compute_temp_partial.cpp compute_temp_profile.cpp compute_temp_ramp.cpp compute_temp_region.cpp compute_temp_sphere.cpp create_atoms.cpp create_box.cpp delete_atoms.cpp delete_bonds.cpp dihedral.cpp dihedral_charmm.cpp dihedral_harmonic.cpp dihedral_helix.cpp dihedral_hybrid.cpp dihedral_multi_harmonic.cpp dihedral_opls.cpp displace_atoms.cpp displace_box.cpp domain.cpp dump.cpp dump_atom.cpp dump_cfg.cpp dump_custom.cpp dump_dcd.cpp dump_local.cpp dump_xyz.cpp error.cpp ewald.cpp fft3d.cpp fft3d_wrap.cpp finish.cpp fix.cpp fix_adapt.cpp fix_addforce.cpp fix_ave_atom.cpp fix_ave_correlate.cpp fix_ave_histo.cpp fix_ave_spatial.cpp fix_ave_time.cpp fix_aveforce.cpp fix_bond_break.cpp fix_bond_create.cpp fix_bond_swap.cpp fix_box_relax.cpp fix_deform.cpp fix_deposit.cpp fix_drag.cpp fix_dt_reset.cpp fix_efield.cpp fix_enforce2d.cpp fix_evaporate.cpp fix_gravity.cpp fix_heat.cpp fix_indent.cpp fix_langevin.cpp fix_lineforce.cpp fix_minimize.cpp fix_momentum.cpp fix_move.cpp fix_nh.cpp fix_nh_sphere.cpp fix_nph.cpp fix_nph_sphere.cpp fix_npt.cpp fix_npt_sphere.cpp fix_nve.cpp fix_nve_limit.cpp fix_nve_noforce.cpp fix_nve_sphere.cpp fix_nvt.cpp fix_nvt_sllod.cpp fix_nvt_sphere.cpp fix_orient_fcc.cpp fix_planeforce.cpp fix_press_berendsen.cpp fix_print.cpp fix_qeq_comb.cpp fix_recenter.cpp fix_respa.cpp fix_rigid.cpp fix_rigid_nve.cpp fix_rigid_nvt.cpp fix_setforce.cpp fix_shake.cpp fix_shear_history.cpp fix_spring.cpp fix_spring_rg.cpp fix_spring_self.cpp fix_store_force.cpp fix_store_state.cpp fix_temp_berendsen.cpp fix_temp_rescale.cpp fix_thermal_conductivity.cpp fix_tmd.cpp fix_ttm.cpp fix_viscosity.cpp fix_viscous.cpp fix_wall.cpp fix_wall_harmonic.cpp fix_wall_lj126.cpp fix_wall_lj93.cpp fix_wall_reflect.cpp fix_wall_region.cpp force.cpp group.cpp improper.cpp improper_cvff.cpp improper_harmonic.cpp improper_hybrid.cpp input.cpp integrate.cpp kspace.cpp lammps.cpp lattice.cpp library.cpp main.cpp memory.cpp min.cpp min_cg.cpp min_hftn.cpp min_linesearch.cpp min_sd.cpp minimize.cpp modify.cpp neigh_bond.cpp neigh_derive.cpp neigh_full.cpp neigh_gran.cpp neigh_half_bin.cpp neigh_half_multi.cpp neigh_half_nsq.cpp neigh_list.cpp neigh_request.cpp neigh_respa.cpp neigh_stencil.cpp neighbor.cpp output.cpp pack.cpp pair.cpp pair_airebo.cpp pair_born_coul_long.cpp pair_buck.cpp pair_buck_coul_cut.cpp pair_buck_coul_long.cpp pair_comb.cpp pair_coul_cut.cpp pair_coul_debye.cpp pair_coul_long.cpp pair_dpd.cpp pair_dpd_tstat.cpp pair_eam.cpp pair_eam_alloy.cpp pair_eam_fs.cpp pair_eim.cpp pair_hybrid.cpp pair_hybrid_overlay.cpp pair_lj96_cut.cpp pair_lj_charmm_coul_charmm.cpp pair_lj_charmm_coul_charmm_implicit.cpp pair_lj_charmm_coul_long.cpp pair_lj_cut.cpp pair_lj_cut_coul_cut.cpp pair_lj_cut_coul_debye.cpp pair_lj_cut_coul_long.cpp pair_lj_cut_coul_long_tip4p.cpp pair_lj_expand.cpp pair_lj_gromacs.cpp pair_lj_gromacs_coul_gromacs.cpp pair_lj_smooth.cpp pair_morse.cpp pair_soft.cpp pair_sw.cpp pair_table.cpp pair_tersoff.cpp pair_tersoff_zbl.cpp pair_yukawa.cpp pppm.cpp pppm_tip4p.cpp random_mars.cpp random_park.cpp read_data.cpp read_restart.cpp region.cpp region_block.cpp region_cone.cpp region_cylinder.cpp region_intersect.cpp region_plane.cpp region_prism.cpp region_sphere.cpp region_union.cpp remap.cpp remap_wrap.cpp replicate.cpp respa.cpp run.cpp set.cpp shell.cpp special.cpp temper.cpp thermo.cpp timer.cpp universe.cpp update.cpp variable.cpp velocity.cpp verlet.cpp write_restart.cpp -INC = angle.h angle_charmm.h angle_cosine.h angle_cosine_delta.h angle_cosine_squared.h angle_harmonic.h angle_hybrid.h angle_table.h atom.h atom_vec.h atom_vec_angle.h atom_vec_atomic.h atom_vec_bond.h atom_vec_charge.h atom_vec_full.h atom_vec_hybrid.h atom_vec_molecular.h bond.h bond_fene.h bond_fene_expand.h bond_harmonic.h bond_hybrid.h bond_morse.h bond_nonlinear.h bond_quartic.h bond_table.h change_box.h comm.h compute.h compute_angle_local.h compute_bond_local.h compute_centro_atom.h compute_cna_atom.h compute_com.h compute_com_molecule.h compute_coord_atom.h compute_dihedral_local.h compute_displace_atom.h compute_erotate_sphere.h compute_group_group.h compute_gyration.h compute_gyration_molecule.h compute_heat_flux.h compute_improper_local.h compute_ke.h compute_ke_atom.h compute_msd.h compute_msd_molecule.h compute_pair_local.h compute_pe.h compute_pe_atom.h compute_pressure.h compute_property_atom.h compute_property_local.h compute_property_molecule.h compute_rdf.h compute_reduce.h compute_reduce_region.h compute_stress_atom.h compute_temp.h compute_temp_com.h compute_temp_deform.h compute_temp_partial.h compute_temp_profile.h compute_temp_ramp.h compute_temp_region.h compute_temp_sphere.h create_atoms.h create_box.h delete_atoms.h delete_bonds.h dihedral.h dihedral_charmm.h dihedral_harmonic.h dihedral_helix.h dihedral_hybrid.h dihedral_multi_harmonic.h dihedral_opls.h displace_atoms.h displace_box.h domain.h dump.h dump_atom.h dump_cfg.h dump_custom.h dump_dcd.h dump_local.h dump_xyz.h error.h ewald.h fft3d.h fft3d_wrap.h finish.h fix.h fix_adapt.h fix_addforce.h fix_ave_atom.h fix_ave_correlate.h fix_ave_histo.h fix_ave_spatial.h fix_ave_time.h fix_aveforce.h fix_bond_break.h fix_bond_create.h fix_bond_swap.h fix_box_relax.h fix_deform.h fix_deposit.h fix_drag.h fix_dt_reset.h fix_efield.h fix_enforce2d.h fix_evaporate.h fix_gravity.h fix_heat.h fix_indent.h fix_langevin.h fix_lineforce.h fix_minimize.h fix_momentum.h fix_move.h fix_nh.h fix_nh_sphere.h fix_nph.h fix_nph_sphere.h fix_npt.h fix_npt_sphere.h fix_nve.h fix_nve_limit.h fix_nve_noforce.h fix_nve_sphere.h fix_nvt.h fix_nvt_sllod.h fix_nvt_sphere.h fix_orient_fcc.h fix_planeforce.h fix_press_berendsen.h fix_print.h fix_qeq_comb.h fix_recenter.h fix_respa.h fix_rigid.h fix_rigid_nve.h fix_rigid_nvt.h fix_setforce.h fix_shake.h fix_shear_history.h fix_spring.h fix_spring_rg.h fix_spring_self.h fix_store_force.h fix_store_state.h fix_temp_berendsen.h fix_temp_rescale.h fix_thermal_conductivity.h fix_tmd.h fix_ttm.h fix_viscosity.h fix_viscous.h fix_wall.h fix_wall_harmonic.h fix_wall_lj126.h fix_wall_lj93.h fix_wall_reflect.h fix_wall_region.h force.h group.h improper.h improper_cvff.h improper_harmonic.h improper_hybrid.h input.h integrate.h kspace.h lammps.h lattice.h library.h math_extra.h memory.h min.h min_cg.h min_hftn.h min_linesearch.h min_sd.h minimize.h modify.h neigh_list.h neigh_request.h neighbor.h output.h pack.h pair.h pair_airebo.h pair_born_coul_long.h pair_buck.h pair_buck_coul_cut.h pair_buck_coul_long.h pair_comb.h pair_coul_cut.h pair_coul_debye.h pair_coul_long.h pair_dpd.h pair_dpd_tstat.h pair_eam.h pair_eam_alloy.h pair_eam_fs.h pair_eim.h pair_hybrid.h pair_hybrid_overlay.h pair_lj96_cut.h pair_lj_charmm_coul_charmm.h pair_lj_charmm_coul_charmm_implicit.h pair_lj_charmm_coul_long.h pair_lj_cut.h pair_lj_cut_coul_cut.h pair_lj_cut_coul_debye.h pair_lj_cut_coul_long.h pair_lj_cut_coul_long_tip4p.h pair_lj_expand.h pair_lj_gromacs.h pair_lj_gromacs_coul_gromacs.h pair_lj_smooth.h pair_morse.h pair_soft.h pair_sw.h pair_table.h pair_tersoff.h pair_tersoff_zbl.h pair_yukawa.h pointers.h pppm.h pppm_tip4p.h random_mars.h random_park.h read_data.h read_restart.h region.h region_block.h region_cone.h region_cylinder.h region_intersect.h region_plane.h region_prism.h region_sphere.h region_union.h remap.h remap_wrap.h replicate.h respa.h run.h set.h shell.h special.h style_angle.h style_atom.h style_bond.h style_command.h style_compute.h style_dihedral.h style_dump.h style_fix.h style_improper.h style_integrate.h style_kspace.h style_minimize.h style_pair.h style_region.h temper.h thermo.h timer.h universe.h update.h variable.h velocity.h verlet.h version.h write_restart.h +INC = angle.h angle_charmm.h angle_cosine.h angle_cosine_delta.h angle_cosine_squared.h angle_harmonic.h angle_hybrid.h angle_table.h atom.h atom_vec.h atom_vec_angle.h atom_vec_atomic.h atom_vec_bond.h atom_vec_charge.h atom_vec_full.h atom_vec_hybrid.h atom_vec_molecular.h bond.h bond_fene.h bond_fene_expand.h bond_harmonic.h bond_hybrid.h bond_morse.h bond_nonlinear.h bond_quartic.h bond_table.h change_box.h comm.h compute.h compute_angle_local.h compute_bond_local.h compute_centro_atom.h compute_cna_atom.h compute_com.h compute_com_molecule.h compute_coord_atom.h compute_dihedral_local.h compute_displace_atom.h compute_erotate_sphere.h compute_group_group.h compute_gyration.h compute_gyration_molecule.h compute_heat_flux.h compute_improper_local.h compute_ke.h compute_ke_atom.h compute_momentum.h compute_msd.h compute_msd_molecule.h compute_pair_local.h compute_pe.h compute_pe_atom.h compute_pressure.h compute_property_atom.h compute_property_local.h compute_property_molecule.h compute_rdf.h compute_reduce.h compute_reduce_region.h compute_stress_atom.h compute_temp.h compute_temp_com.h compute_temp_deform.h compute_temp_partial.h compute_temp_profile.h compute_temp_ramp.h compute_temp_region.h compute_temp_sphere.h create_atoms.h create_box.h delete_atoms.h delete_bonds.h dihedral.h dihedral_charmm.h dihedral_harmonic.h dihedral_helix.h dihedral_hybrid.h dihedral_multi_harmonic.h dihedral_opls.h displace_atoms.h displace_box.h domain.h dump.h dump_atom.h dump_cfg.h dump_custom.h dump_dcd.h dump_local.h dump_xyz.h error.h ewald.h fft3d.h fft3d_wrap.h finish.h fix.h fix_adapt.h fix_addforce.h fix_ave_atom.h fix_ave_correlate.h fix_ave_histo.h fix_ave_spatial.h fix_ave_time.h fix_aveforce.h fix_bond_break.h fix_bond_create.h fix_bond_swap.h fix_box_relax.h fix_deform.h fix_deposit.h fix_drag.h fix_dt_reset.h fix_efield.h fix_enforce2d.h fix_evaporate.h fix_gravity.h fix_heat.h fix_indent.h fix_langevin.h fix_lineforce.h fix_minimize.h fix_momentum.h fix_move.h fix_nh.h fix_nh_sphere.h fix_nph.h fix_nph_sphere.h fix_npt.h fix_npt_sphere.h fix_nve.h fix_nve_limit.h fix_nve_noforce.h fix_nve_sphere.h fix_nvt.h fix_nvt_sllod.h fix_nvt_sphere.h fix_orient_fcc.h fix_planeforce.h fix_press_berendsen.h fix_print.h fix_qeq_comb.h fix_recenter.h fix_respa.h fix_rigid.h fix_rigid_nve.h fix_rigid_nvt.h fix_setforce.h fix_shake.h fix_shear_history.h fix_spring.h fix_spring_rg.h fix_spring_self.h fix_store_force.h fix_store_state.h fix_temp_berendsen.h fix_temp_rescale.h fix_thermal_conductivity.h fix_tmd.h fix_ttm.h fix_viscosity.h fix_viscous.h fix_wall.h fix_wall_harmonic.h fix_wall_lj126.h fix_wall_lj93.h fix_wall_reflect.h fix_wall_region.h force.h group.h improper.h improper_cvff.h improper_harmonic.h improper_hybrid.h input.h integrate.h kspace.h lammps.h lattice.h library.h math_extra.h memory.h min.h min_cg.h min_hftn.h min_linesearch.h min_sd.h minimize.h modify.h neigh_list.h neigh_request.h neighbor.h output.h pack.h pair.h pair_airebo.h pair_born_coul_long.h pair_buck.h pair_buck_coul_cut.h pair_buck_coul_long.h pair_comb.h pair_coul_cut.h pair_coul_debye.h pair_coul_long.h pair_dpd.h pair_dpd_tstat.h pair_eam.h pair_eam_alloy.h pair_eam_fs.h pair_eim.h pair_hybrid.h pair_hybrid_overlay.h pair_lj96_cut.h pair_lj_charmm_coul_charmm.h pair_lj_charmm_coul_charmm_implicit.h pair_lj_charmm_coul_long.h pair_lj_cut.h pair_lj_cut_coul_cut.h pair_lj_cut_coul_debye.h pair_lj_cut_coul_long.h pair_lj_cut_coul_long_tip4p.h pair_lj_expand.h pair_lj_gromacs.h pair_lj_gromacs_coul_gromacs.h pair_lj_smooth.h pair_morse.h pair_soft.h pair_sw.h pair_table.h pair_tersoff.h pair_tersoff_zbl.h pair_yukawa.h pointers.h pppm.h pppm_tip4p.h random_mars.h random_park.h read_data.h read_restart.h region.h region_block.h region_cone.h region_cylinder.h region_intersect.h region_plane.h region_prism.h region_sphere.h region_union.h remap.h remap_wrap.h replicate.h respa.h run.h set.h shell.h special.h style_angle.h style_atom.h style_bond.h style_command.h style_compute.h style_dihedral.h style_dump.h style_fix.h style_improper.h style_integrate.h style_kspace.h style_minimize.h style_pair.h style_region.h temper.h thermo.h timer.h universe.h update.h variable.h velocity.h verlet.h version.h write_restart.h OBJ = $(SRC:.cpp=.o) diff --git a/src/compute_momentum.cpp b/src/compute_momentum.cpp new file mode 100644 index 0000000000..f8fc0ec6ab --- /dev/null +++ b/src/compute_momentum.cpp @@ -0,0 +1,59 @@ + +#include +#include "compute_momentum.h" +#include "atom.h" +#include "update.h" +#include "force.h" +#include "domain.h" +#include "group.h" +#include "error.h" + +using namespace LAMMPS_NS; + +ComputeMomentum::ComputeMomentum(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg) +{ + if (narg != 3) error->all(FLERR,"Illegal compute momentum command"); + + vector_flag = 1; + size_vector = 3; + extvector = 1; + vector = new double[size_vector]; +} + +ComputeMomentum::~ComputeMomentum() { + delete[] vector; +} + +void ComputeMomentum::init() +{ +} + +void ComputeMomentum::compute_vector() +{ + invoked_vector = update->ntimestep; + + double **v = atom->v; + double *rmass = atom->rmass; + double *mass = atom->mass; + int *mask = atom->mask; + int *type = atom->type; + int nlocal = atom->nlocal; + + double mom[3] = {0.0, 0.0, 0.0}; + + if (rmass) { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + for(int j = 0; j < 3; ++j) + mom[j] += rmass[i] * v[i][j]; + } + } else { + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) + for(int j = 0; j < 3; ++j) + mom[j] += mass[type[i]] * v[i][j]; + } + + MPI_Allreduce(&mom, vector, 3, MPI_DOUBLE, MPI_SUM, world); +} diff --git a/src/compute_momentum.h b/src/compute_momentum.h new file mode 100644 index 0000000000..1e0c52c045 --- /dev/null +++ b/src/compute_momentum.h @@ -0,0 +1,36 @@ +#ifdef COMPUTE_CLASS + +ComputeStyle(momentum,ComputeMomentum) + +#else + +#ifndef LMP_COMPUTE_MOMENTUM_H +#define LMP_COMPUTE_MOMENTUM_H + +#include "compute.h" + +namespace LAMMPS_NS { + +class ComputeMomentum : public Compute { + public: + ComputeMomentum(class LAMMPS *, int, char **); + virtual ~ComputeMomentum(); + + virtual void init(); + virtual void compute_vector(); +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ -- GitLab From 26347ec80ce8a33a4162d5d5275d8be52d6666fa Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Wed, 19 Jun 2019 13:55:10 +0100 Subject: [PATCH 029/236] Add docs for compute momentum --- doc/src/Commands_compute.txt | 1 + doc/src/compute.txt | 1 + doc/src/compute_momentum.txt | 45 ++++++++++++++++++++++++++++++++++++ doc/src/computes.txt | 1 + doc/src/lammps.book | 1 + 5 files changed, 49 insertions(+) create mode 100644 doc/src/compute_momentum.txt diff --git a/doc/src/Commands_compute.txt b/doc/src/Commands_compute.txt index f566702609..0817f44adf 100644 --- a/doc/src/Commands_compute.txt +++ b/doc/src/Commands_compute.txt @@ -80,6 +80,7 @@ KOKKOS, o = USER-OMP, t = OPT. "meso/e/atom"_compute_meso_e_atom.html, "meso/rho/atom"_compute_meso_rho_atom.html, "meso/t/atom"_compute_meso_t_atom.html, +"momentum"_compute_momentum.html, "msd"_compute_msd.html, "msd/chunk"_compute_msd_chunk.html, "msd/nongauss"_compute_msd_nongauss.html, diff --git a/doc/src/compute.txt b/doc/src/compute.txt index 87dbee57d6..12c6b141b7 100644 --- a/doc/src/compute.txt +++ b/doc/src/compute.txt @@ -229,6 +229,7 @@ compute"_Commands_compute.html doc page are followed by one or more of "meso/e/atom"_compute_meso_e_atom.html - "meso/rho/atom"_compute_meso_rho_atom.html - "meso/t/atom"_compute_meso_t_atom.html - +"momentum"_compute_momentum.html - translational momentum "msd"_compute_msd.html - mean-squared displacement of group of atoms "msd/chunk"_compute_msd_chunk.html - mean-squared displacement for each chunk "msd/nongauss"_compute_msd_nongauss.html - MSD and non-Gaussian parameter of group of atoms diff --git a/doc/src/compute_momentum.txt b/doc/src/compute_momentum.txt new file mode 100644 index 0000000000..4db171d42d --- /dev/null +++ b/doc/src/compute_momentum.txt @@ -0,0 +1,45 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Commands_all.html) + +:line + +compute momentum command :h3 + +[Syntax:] + +compute ID group-ID momentum :pre + +ID, group-ID are documented in "compute"_compute.html command +momentum = style name of this compute command :ul + +[Examples:] + +compute 1 all momentum :pre + +[Description:] + +Define a computation that calculates the translational momentum +of a group of particles. + +The momentum of each particles is computed as m v, where m and v are +the mass and velocity of the particle. + +[Output info:] + +This compute calculates a global vector (the summed momentum) on +length 3. This value can be used by any command that uses a global +vector value from a compute as input. See the "Howto +output"_Howto_output.html doc page for an overview of LAMMPS output +options. + +The vector value calculated by this compute is "extensive". The vector +value will be in momentum "units"_units.html. + +[Restrictions:] none + +[Related commands:] + +[Default:] none diff --git a/doc/src/computes.txt b/doc/src/computes.txt index 926b8da222..1c914365b1 100644 --- a/doc/src/computes.txt +++ b/doc/src/computes.txt @@ -57,6 +57,7 @@ Computes :h1 compute_meso_e_atom compute_meso_rho_atom compute_meso_t_atom + compute_momentum compute_msd compute_msd_chunk compute_msd_nongauss diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 2738c9b051..816acd3521 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -468,6 +468,7 @@ compute_ke_rigid.html compute_meso_e_atom.html compute_meso_rho_atom.html compute_meso_t_atom.html +compute_momentum.html compute_msd.html compute_msd_chunk.html compute_msd_nongauss.html -- GitLab From 128d021c10c2c0d4fd54bd81d7c49f82bf2dc0a9 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 20 Jun 2019 13:13:13 -0500 Subject: [PATCH 030/236] Update to latest prototype for SimulatorModel interface --- src/KIM/kim_style.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index 814da6b188..b67360ce82 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -68,8 +68,9 @@ #include "variable.h" #include "fix_store_kim.h" +//@@@@@ Need to switch to c-bindings when they are available. #include "KIM_SimulatorModel.hpp" - +//@@@@@ using namespace LAMMPS_NS; @@ -131,6 +132,7 @@ void KimStyle::do_init(char *model) fix_store->setptr("units_to", (void *) units_to); int kimerror; + // @@@@@ switch to c-bindings when they are available KIM::SimulatorModel * simulatorModel; kimerror = KIM::SimulatorModel::Create(model,&simulatorModel); @@ -176,7 +178,7 @@ void KimStyle::do_init(char *model) // reset template map. - simulatorModel->ClearTemplateMap(); + simulatorModel->OpenAndInitializeTemplateMap(); } /* ---------------------------------------------------------------------- */ @@ -206,8 +208,7 @@ void KimStyle::do_defn(int narg, char **arg) const std::string *sim_name, *sim_version; std::string atom_type_sym_list; - simulatorModel->GetSimulatorName(&sim_name); - simulatorModel->GetSimulatorVersion(&sim_version); + simulatorModel->GetSimulatorNameAndVersion(&sim_name, &sim_version); if (comm->me == 0) { std::string mesg("Using KIM Simulator Model : "); @@ -292,7 +293,7 @@ void KimStyle::do_defn(int narg, char **arg) if (sim_model_idx < 0) error->all(FLERR,"KIM Simulator Model has no Model definition"); - simulatorModel->ClearTemplateMap(); + simulatorModel->OpenAndInitializeTemplateMap(); } else { -- GitLab From 0613c10395ab286a0dd7c82e1f0ab092bdacbb5a Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 20 Jun 2019 16:45:45 -0500 Subject: [PATCH 031/236] Work on kim_style for latest definition prototype --- examples/kim/in.kim.lj.simulator_model | 9 +- src/KIM/kim_style.cpp | 288 ++++++++++++++++--------- src/KIM/kim_style.h | 34 ++- 3 files changed, 218 insertions(+), 113 deletions(-) diff --git a/examples/kim/in.kim.lj.simulator_model b/examples/kim/in.kim.lj.simulator_model index 15b26c3c64..01ee5aa64c 100644 --- a/examples/kim/in.kim.lj.simulator_model +++ b/examples/kim/in.kim.lj.simulator_model @@ -14,12 +14,11 @@ variable xx equal 20*$x variable yy equal 20*$y variable zz equal 20*$z -units metal -atom_style atomic +echo both +#kim_style model LennardJones_Ar metal +kim_style model Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real unit_conversion_mode newton on -kim_style init LennardJones_Ar - lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} create_box 1 box @@ -28,7 +27,7 @@ create_atoms 1 box #pair_style lj/cut 8.1500 #pair_coeff 1 1 0.0104 3.4000 -kim_style define Ar +kim_style setup Au mass 1 39.95 velocity all create 200.0 232345 loop geom diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index b67360ce82..fcc3f33aa2 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -51,7 +51,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Designed for use with the kim-api-2.0.2 (and newer) package + Designed for use with the kim-api-2.1.0 (and newer) package ------------------------------------------------------------------------- */ #include @@ -68,6 +68,9 @@ #include "variable.h" #include "fix_store_kim.h" +extern "C" { +#include "KIM_SimulatorHeaders.h" +} //@@@@@ Need to switch to c-bindings when they are available. #include "KIM_SimulatorModel.hpp" //@@@@@ @@ -78,42 +81,188 @@ using namespace LAMMPS_NS; void KimStyle::command(int narg, char **arg) { - if (narg < 2) error->all(FLERR,"Illegal kim_style command"); - - units_from = NULL; - units_to = NULL; + if ((narg < 2) || (narg > 4)) error->all(FLERR,"Illegal kim_style command"); - if (strcmp(arg[0],"init") == 0) { + if (strcmp(arg[0],"model") == 0) { if (domain->box_exist) - error->all(FLERR,"Must use 'kim_style init' command before " + error->all(FLERR,"Must use 'kim_style model' command before " "simulation box is defined"); - int len = strlen(arg[1])+1; - char *model = new char[len]; - strcpy(model,arg[1]); - - int args_done = do_units(narg-2,arg-2); - if (narg > (args_done + 2)) - error->all(FLERR,"Illegal kim_style command"); - do_init(model); - do_variables(); - } else if (strcmp(arg[0],"define") == 0) { + int len1 = strlen(arg[1])+1; + int len2 = strlen(arg[2])+1; + char *model_name = new char[len1]; strcpy(model_name,arg[1]); + char *user_units = new char[len2]; strcpy(user_units,arg[2]); + if (narg == 4) { + if (strcmp(arg[3],"unit_conversion_mode")==0) unit_conversion_mode = true; + else { error->all(FLERR,"Illegal kim_style command"); } + } else unit_conversion_mode = false; + + char *model_units; + determine_model_type_and_units(model_name, user_units, &model_units); + + do_init(model_name, user_units, model_units); + if (unit_conversion_mode) do_variables(user_units, model_units); + } else if (strcmp(arg[0],"setup") == 0) { if (!domain->box_exist) - error->all(FLERR,"Must use 'kim_style define' command after " + error->all(FLERR,"Must use 'kim_style setup' command after " "simulation box is defined"); - int args_done = do_units(narg-1,arg-1); - do_defn(narg - (args_done+1),arg + (args_done+1)); - } else if (strcmp(arg[0],"unit_variables") == 0) { - int args_done = do_units(narg,arg); - if (narg > args_done) - error->all(FLERR,"Illegal kim_style command"); - do_variables(); + do_setup(narg-1,++arg); } else error->all(FLERR,"Illegal kim_style command"); } +/* ---------------------------------------------------------------------- */ +namespace { +void get_kim_unit_names( + char const * const system, + KIM_LengthUnit & lengthUnit, + KIM_EnergyUnit & energyUnit, + KIM_ChargeUnit & chargeUnit, + KIM_TemperatureUnit & temperatureUnit, + KIM_TimeUnit & timeUnit, + Error * error) +{ + if ((strcmp(system,"real")==0)) { + lengthUnit = KIM_LENGTH_UNIT_A; + energyUnit = KIM_ENERGY_UNIT_kcal_mol; + chargeUnit = KIM_CHARGE_UNIT_e; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_fs; + } else if ((strcmp(system,"metal")==0)) { + lengthUnit = KIM_LENGTH_UNIT_A; + energyUnit = KIM_ENERGY_UNIT_eV; + chargeUnit = KIM_CHARGE_UNIT_e; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_ps; + } else if ((strcmp(system,"si")==0)) { + lengthUnit = KIM_LENGTH_UNIT_m; + energyUnit = KIM_ENERGY_UNIT_J; + chargeUnit = KIM_CHARGE_UNIT_C; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_s; + } else if ((strcmp(system,"cgs")==0)) { + lengthUnit = KIM_LENGTH_UNIT_cm; + energyUnit = KIM_ENERGY_UNIT_erg; + chargeUnit = KIM_CHARGE_UNIT_statC; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_s; + } else if ((strcmp(system,"electron")==0)) { + lengthUnit = KIM_LENGTH_UNIT_Bohr; + energyUnit = KIM_ENERGY_UNIT_Hartree; + chargeUnit = KIM_CHARGE_UNIT_e; + temperatureUnit = KIM_TEMPERATURE_UNIT_K; + timeUnit = KIM_TIME_UNIT_fs; + } else if ((strcmp(system,"lj")==0)) { + error->all(FLERR,"LAMMPS unit_style lj not supported by KIM models"); + } else { + error->all(FLERR,"Unknown unit_style"); + } +} +} // namespace +void KimStyle::determine_model_type_and_units(char * model_name, + char * user_units, + char ** model_units) +{ + KIM_LengthUnit lengthUnit; + KIM_EnergyUnit energyUnit; + KIM_ChargeUnit chargeUnit; + KIM_TemperatureUnit temperatureUnit; + KIM_TimeUnit timeUnit; + int units_accepted; + KIM_Model * kim_MO; + + get_kim_unit_names(user_units, lengthUnit, energyUnit, + chargeUnit, temperatureUnit, timeUnit, error); + int kim_error = KIM_Model_Create(KIM_NUMBERING_zeroBased, + lengthUnit, + energyUnit, + chargeUnit, + temperatureUnit, + timeUnit, + model_name, + &units_accepted, + &kim_MO); + + if (!kim_error) // model is an MO + { + model_type = MO; + KIM_Model_Destroy(&kim_MO); + + if (units_accepted) + { + int len=strlen(user_units); + *model_units = new char[len]; strcpy(*model_units,user_units); + return; + } + else if (unit_conversion_mode) + { + int const num_systems = 5; + char const * const systems[num_systems] + = {"metal", "real", "si", "cgs", "electron"}; + for (int i=0; i < num_systems; ++i) + { + get_kim_unit_names(systems[i], lengthUnit, energyUnit, + chargeUnit, temperatureUnit, timeUnit, error); + kim_error = KIM_Model_Create(KIM_NUMBERING_zeroBased, + lengthUnit, + energyUnit, + chargeUnit, + temperatureUnit, + timeUnit, + model_name, + &units_accepted, + &kim_MO); + KIM_Model_Destroy(&kim_MO); + if (units_accepted) + { + int len=strlen(systems[i]); + *model_units = new char[len]; strcpy(*model_units,systems[i]); + return; + } + } + error->all(FLERR,"KIM Model does not support any lammps unit system"); + } + else + { + error->all(FLERR,"KIM Model does not support the requested unit system"); + } + } + + KIM::SimulatorModel * kim_SM; + kim_error = KIM::SimulatorModel::Create(model_name, &kim_SM); + if (kim_error) + { + error->all(FLERR,"KIM model name not found"); + } + model_type = SM; + + int sim_fields; + int sim_lines; + std::string const * sim_field; + std::string const * sim_value; + kim_SM->GetNumberOfSimulatorFields(&sim_fields); + kim_SM->CloseTemplateMap(); + for (int i=0; i < sim_fields; ++i) { + kim_SM->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + + if (*sim_field == "units") { + kim_SM->GetSimulatorFieldLine(i,0,&sim_value); + int len=(*sim_value).length(); + *model_units = new char[len]; strcpy(*model_units,sim_value->c_str()); + break; + } + } + KIM::SimulatorModel::Destroy(&kim_SM); + + if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) + { + error->all(FLERR,"Incompatible units for KIM Simulator Model"); + } +} + + /* ---------------------------------------------------------------------- */ -void KimStyle::do_init(char *model) +void KimStyle::do_init(char *model_name, char *user_units, char* model_units) { // create storage proxy fix. delete existing fix, if needed. @@ -127,14 +276,20 @@ void KimStyle::do_init(char *model) ifix = modify->find_fix("KIM_MODEL_STORE"); FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; - fix_store->setptr("model_name", (void *) model); - fix_store->setptr("units_from", (void *) units_from); - fix_store->setptr("units_to", (void *) units_to); + fix_store->setptr("model_name", (void *) model_name); + fix_store->setptr("user_units", (void *) user_units); + fix_store->setptr("model_units", (void *) model_units); + + // set units + + std::string cmd("units "); + cmd += model_units; + input->one(cmd.c_str()); int kimerror; // @@@@@ switch to c-bindings when they are available KIM::SimulatorModel * simulatorModel; - kimerror = KIM::SimulatorModel::Create(model,&simulatorModel); + kimerror = KIM::SimulatorModel::Create(model_name,&simulatorModel); // not a Kim Simulator Model; nothing else to do here. @@ -150,19 +305,6 @@ void KimStyle::do_init(char *model) const std::string *sim_field, *sim_value; simulatorModel->GetNumberOfSimulatorFields(&sim_fields); - // set units - - for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "units") { - simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); - std::string cmd("units "); - cmd += *sim_value; - input->one(cmd.c_str()); - break; - } - } - // init model for (int i=0; i < sim_fields; ++i) { @@ -183,7 +325,7 @@ void KimStyle::do_init(char *model) /* ---------------------------------------------------------------------- */ -void KimStyle::do_defn(int narg, char **arg) +void KimStyle::do_setup(int narg, char **arg) { if (narg != atom->ntypes) error->all(FLERR,"Illegal kim_style command"); @@ -201,7 +343,7 @@ void KimStyle::do_defn(int narg, char **arg) FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; model = (char *)fix_store->getptr("model_name"); simulatorModel = (KIM::SimulatorModel *)fix_store->getptr("simulator_model"); - } else error->all(FLERR,"Must use 'kim_style init' before 'kim_style define'"); + } else error->all(FLERR,"Must use 'kim_style model' before 'kim_style setup'"); if (simulatorModel) { @@ -317,62 +459,11 @@ void KimStyle::do_defn(int narg, char **arg) /* ---------------------------------------------------------------------- */ -int KimStyle::do_units(int narg, char **arg) -{ - // retrieve custom units setting if kim_style had been called before - - int ifix = modify->find_fix("KIM_MODEL_STORE"); - FixStoreKIM *fix_store = NULL; - if (ifix >= 0) { - fix_store = (FixStoreKIM *) modify->fix[ifix]; - units_from = (char *)fix_store->getptr("units_from"); - units_to = (char *)fix_store->getptr("units_to"); - } - - if (narg < 2) return 0; - int iarg=0; - for (iarg = 0; iarg < narg; iarg += 2) { - if (strcmp(arg[iarg],"unit_variables") == 0) { - if (narg > iarg+2) error->all(FLERR,"Illegal kim_style command"); - if (strcmp(arg[iarg+1],"NULL") == 0) { - delete[] units_to; - units_to = NULL; - } else { - int len = strlen(arg[iarg+1])+1; - delete[] units_to; - units_to = new char[len]; - strcpy(units_to,arg[iarg+1]); - } - if (fix_store) fix_store->setptr("units_to",units_to); - } else if (strcmp(arg[iarg],"unit_from") == 0) { - if (narg > iarg+2) error->all(FLERR,"Illegal kim_style command"); - if (strcmp(arg[iarg+1],"NULL") == 0) { - delete[] units_from; - units_from = NULL; - } else { - int len = strlen(arg[iarg+1])+1; - delete[] units_from; - units_from = new char[len]; - strcpy(units_from,arg[iarg+1]); - } - if (fix_store) fix_store->setptr("units_from",units_from); - } else return iarg; - } - return iarg; -} - -/* ---------------------------------------------------------------------- */ - -void KimStyle::do_variables() +void KimStyle::do_variables(char *user_units, char *model_units) { - char *from, *to; + char *from = user_units, *to = model_units; Variable *variable = input->variable; - if (units_from) from = units_from; - else from = update->unit_style; - if (units_to) to = units_to; - else to = update->unit_style; - // refuse convertion from or to reduced units if ((strcmp(from,"lj") == 0) || (strcmp(to,"lj") == 0)) @@ -381,6 +472,7 @@ void KimStyle::do_variables() // get index to internal style variables. create, if needed. // default to conversion factor 1.0 for newly created variables + // @@@@@@ below needs to be updated to use Ellad's luc. int v_length, v_mass, v_time; char *args[3]; args[1] = (char *)"internal"; diff --git a/src/KIM/kim_style.h b/src/KIM/kim_style.h index 36084183ee..b7ff47404f 100644 --- a/src/KIM/kim_style.h +++ b/src/KIM/kim_style.h @@ -51,7 +51,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Designed for use with the kim-api-2.0.2 (and newer) package + Designed for use with the kim-api-2.1.0 (and newer) package ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS @@ -72,12 +72,14 @@ class KimStyle : protected Pointers { KimStyle(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); private: - char *units_from; - char *units_to; - void do_init(char *); - void do_defn(int, char **); - int do_units(int, char **); - void do_variables(); + enum model_type_enum {MO, SM}; + model_type_enum model_type; + bool unit_conversion_mode; + + void determine_model_type_and_units(char *, char *, char **); + void do_init(char *, char *, char *); + void do_setup(int, char **); + void do_variables(char*, char*); }; } @@ -91,15 +93,27 @@ E: Illegal kim_style command Incorrect number or kind of arguments to kim_style. -E: Must use 'kim_style init' command before simulation box is defined +E: Must use 'kim_style model' command before simulation box is defined Self-explanatory. -E: Must use 'kim_style define' command after simulation box is defined +E: Must use 'kim_style setup' command after simulation box is defined Self-explanatory. -E: Must use 'kim_style init' command before 'kim_style define' +E: Must use 'kim_style model' command before 'kim_style setup' + +Self-explanatory. + +E: KIM Model does not support the requested unit system + +Self-explanatory. + +E: KIM Model does not support any lammps unit system + +Self-explanatory. + +E: KIM model name not found Self-explanatory. -- GitLab From 1bb18ebde4dec8dab43741b4b9c005f732200214 Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Fri, 21 Jun 2019 15:50:52 +0100 Subject: [PATCH 032/236] rollback unneeded change to Makefile.list per review --- src/Makefile.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.list b/src/Makefile.list index 6e4c9726a6..65bbebca09 100644 --- a/src/Makefile.list +++ b/src/Makefile.list @@ -7,9 +7,9 @@ SHELL = /bin/sh ROOT = lmp EXE = $(ROOT)_$@ -SRC = angle.cpp angle_charmm.cpp angle_cosine.cpp angle_cosine_delta.cpp angle_cosine_squared.cpp angle_harmonic.cpp angle_hybrid.cpp angle_table.cpp atom.cpp atom_vec.cpp atom_vec_angle.cpp atom_vec_atomic.cpp atom_vec_bond.cpp atom_vec_charge.cpp atom_vec_full.cpp atom_vec_hybrid.cpp atom_vec_molecular.cpp bond.cpp bond_fene.cpp bond_fene_expand.cpp bond_harmonic.cpp bond_hybrid.cpp bond_morse.cpp bond_nonlinear.cpp bond_quartic.cpp bond_table.cpp change_box.cpp comm.cpp compute.cpp compute_angle_local.cpp compute_bond_local.cpp compute_centro_atom.cpp compute_cna_atom.cpp compute_com.cpp compute_com_molecule.cpp compute_coord_atom.cpp compute_dihedral_local.cpp compute_displace_atom.cpp compute_erotate_sphere.cpp compute_group_group.cpp compute_gyration.cpp compute_gyration_molecule.cpp compute_heat_flux.cpp compute_improper_local.cpp compute_ke.cpp compute_ke_atom.cpp compute_momentum.cpp compute_msd.cpp compute_msd_molecule.cpp compute_pair_local.cpp compute_pe.cpp compute_pe_atom.cpp compute_pressure.cpp compute_property_atom.cpp compute_property_local.cpp compute_property_molecule.cpp compute_rdf.cpp compute_reduce.cpp compute_reduce_region.cpp compute_stress_atom.cpp compute_temp.cpp compute_temp_com.cpp compute_temp_deform.cpp compute_temp_partial.cpp compute_temp_profile.cpp compute_temp_ramp.cpp compute_temp_region.cpp compute_temp_sphere.cpp create_atoms.cpp create_box.cpp delete_atoms.cpp delete_bonds.cpp dihedral.cpp dihedral_charmm.cpp dihedral_harmonic.cpp dihedral_helix.cpp dihedral_hybrid.cpp dihedral_multi_harmonic.cpp dihedral_opls.cpp displace_atoms.cpp displace_box.cpp domain.cpp dump.cpp dump_atom.cpp dump_cfg.cpp dump_custom.cpp dump_dcd.cpp dump_local.cpp dump_xyz.cpp error.cpp ewald.cpp fft3d.cpp fft3d_wrap.cpp finish.cpp fix.cpp fix_adapt.cpp fix_addforce.cpp fix_ave_atom.cpp fix_ave_correlate.cpp fix_ave_histo.cpp fix_ave_spatial.cpp fix_ave_time.cpp fix_aveforce.cpp fix_bond_break.cpp fix_bond_create.cpp fix_bond_swap.cpp fix_box_relax.cpp fix_deform.cpp fix_deposit.cpp fix_drag.cpp fix_dt_reset.cpp fix_efield.cpp fix_enforce2d.cpp fix_evaporate.cpp fix_gravity.cpp fix_heat.cpp fix_indent.cpp fix_langevin.cpp fix_lineforce.cpp fix_minimize.cpp fix_momentum.cpp fix_move.cpp fix_nh.cpp fix_nh_sphere.cpp fix_nph.cpp fix_nph_sphere.cpp fix_npt.cpp fix_npt_sphere.cpp fix_nve.cpp fix_nve_limit.cpp fix_nve_noforce.cpp fix_nve_sphere.cpp fix_nvt.cpp fix_nvt_sllod.cpp fix_nvt_sphere.cpp fix_orient_fcc.cpp fix_planeforce.cpp fix_press_berendsen.cpp fix_print.cpp fix_qeq_comb.cpp fix_recenter.cpp fix_respa.cpp fix_rigid.cpp fix_rigid_nve.cpp fix_rigid_nvt.cpp fix_setforce.cpp fix_shake.cpp fix_shear_history.cpp fix_spring.cpp fix_spring_rg.cpp fix_spring_self.cpp fix_store_force.cpp fix_store_state.cpp fix_temp_berendsen.cpp fix_temp_rescale.cpp fix_thermal_conductivity.cpp fix_tmd.cpp fix_ttm.cpp fix_viscosity.cpp fix_viscous.cpp fix_wall.cpp fix_wall_harmonic.cpp fix_wall_lj126.cpp fix_wall_lj93.cpp fix_wall_reflect.cpp fix_wall_region.cpp force.cpp group.cpp improper.cpp improper_cvff.cpp improper_harmonic.cpp improper_hybrid.cpp input.cpp integrate.cpp kspace.cpp lammps.cpp lattice.cpp library.cpp main.cpp memory.cpp min.cpp min_cg.cpp min_hftn.cpp min_linesearch.cpp min_sd.cpp minimize.cpp modify.cpp neigh_bond.cpp neigh_derive.cpp neigh_full.cpp neigh_gran.cpp neigh_half_bin.cpp neigh_half_multi.cpp neigh_half_nsq.cpp neigh_list.cpp neigh_request.cpp neigh_respa.cpp neigh_stencil.cpp neighbor.cpp output.cpp pack.cpp pair.cpp pair_airebo.cpp pair_born_coul_long.cpp pair_buck.cpp pair_buck_coul_cut.cpp pair_buck_coul_long.cpp pair_comb.cpp pair_coul_cut.cpp pair_coul_debye.cpp pair_coul_long.cpp pair_dpd.cpp pair_dpd_tstat.cpp pair_eam.cpp pair_eam_alloy.cpp pair_eam_fs.cpp pair_eim.cpp pair_hybrid.cpp pair_hybrid_overlay.cpp pair_lj96_cut.cpp pair_lj_charmm_coul_charmm.cpp pair_lj_charmm_coul_charmm_implicit.cpp pair_lj_charmm_coul_long.cpp pair_lj_cut.cpp pair_lj_cut_coul_cut.cpp pair_lj_cut_coul_debye.cpp pair_lj_cut_coul_long.cpp pair_lj_cut_coul_long_tip4p.cpp pair_lj_expand.cpp pair_lj_gromacs.cpp pair_lj_gromacs_coul_gromacs.cpp pair_lj_smooth.cpp pair_morse.cpp pair_soft.cpp pair_sw.cpp pair_table.cpp pair_tersoff.cpp pair_tersoff_zbl.cpp pair_yukawa.cpp pppm.cpp pppm_tip4p.cpp random_mars.cpp random_park.cpp read_data.cpp read_restart.cpp region.cpp region_block.cpp region_cone.cpp region_cylinder.cpp region_intersect.cpp region_plane.cpp region_prism.cpp region_sphere.cpp region_union.cpp remap.cpp remap_wrap.cpp replicate.cpp respa.cpp run.cpp set.cpp shell.cpp special.cpp temper.cpp thermo.cpp timer.cpp universe.cpp update.cpp variable.cpp velocity.cpp verlet.cpp write_restart.cpp +SRC = angle.cpp angle_charmm.cpp angle_cosine.cpp angle_cosine_delta.cpp angle_cosine_squared.cpp angle_harmonic.cpp angle_hybrid.cpp angle_table.cpp atom.cpp atom_vec.cpp atom_vec_angle.cpp atom_vec_atomic.cpp atom_vec_bond.cpp atom_vec_charge.cpp atom_vec_full.cpp atom_vec_hybrid.cpp atom_vec_molecular.cpp bond.cpp bond_fene.cpp bond_fene_expand.cpp bond_harmonic.cpp bond_hybrid.cpp bond_morse.cpp bond_nonlinear.cpp bond_quartic.cpp bond_table.cpp change_box.cpp comm.cpp compute.cpp compute_angle_local.cpp compute_bond_local.cpp compute_centro_atom.cpp compute_cna_atom.cpp compute_com.cpp compute_com_molecule.cpp compute_coord_atom.cpp compute_dihedral_local.cpp compute_displace_atom.cpp compute_erotate_sphere.cpp compute_group_group.cpp compute_gyration.cpp compute_gyration_molecule.cpp compute_heat_flux.cpp compute_improper_local.cpp compute_ke.cpp compute_ke_atom.cpp compute_msd.cpp compute_msd_molecule.cpp compute_pair_local.cpp compute_pe.cpp compute_pe_atom.cpp compute_pressure.cpp compute_property_atom.cpp compute_property_local.cpp compute_property_molecule.cpp compute_rdf.cpp compute_reduce.cpp compute_reduce_region.cpp compute_stress_atom.cpp compute_temp.cpp compute_temp_com.cpp compute_temp_deform.cpp compute_temp_partial.cpp compute_temp_profile.cpp compute_temp_ramp.cpp compute_temp_region.cpp compute_temp_sphere.cpp create_atoms.cpp create_box.cpp delete_atoms.cpp delete_bonds.cpp dihedral.cpp dihedral_charmm.cpp dihedral_harmonic.cpp dihedral_helix.cpp dihedral_hybrid.cpp dihedral_multi_harmonic.cpp dihedral_opls.cpp displace_atoms.cpp displace_box.cpp domain.cpp dump.cpp dump_atom.cpp dump_cfg.cpp dump_custom.cpp dump_dcd.cpp dump_local.cpp dump_xyz.cpp error.cpp ewald.cpp fft3d.cpp fft3d_wrap.cpp finish.cpp fix.cpp fix_adapt.cpp fix_addforce.cpp fix_ave_atom.cpp fix_ave_correlate.cpp fix_ave_histo.cpp fix_ave_spatial.cpp fix_ave_time.cpp fix_aveforce.cpp fix_bond_break.cpp fix_bond_create.cpp fix_bond_swap.cpp fix_box_relax.cpp fix_deform.cpp fix_deposit.cpp fix_drag.cpp fix_dt_reset.cpp fix_efield.cpp fix_enforce2d.cpp fix_evaporate.cpp fix_gravity.cpp fix_heat.cpp fix_indent.cpp fix_langevin.cpp fix_lineforce.cpp fix_minimize.cpp fix_momentum.cpp fix_move.cpp fix_nh.cpp fix_nh_sphere.cpp fix_nph.cpp fix_nph_sphere.cpp fix_npt.cpp fix_npt_sphere.cpp fix_nve.cpp fix_nve_limit.cpp fix_nve_noforce.cpp fix_nve_sphere.cpp fix_nvt.cpp fix_nvt_sllod.cpp fix_nvt_sphere.cpp fix_orient_fcc.cpp fix_planeforce.cpp fix_press_berendsen.cpp fix_print.cpp fix_qeq_comb.cpp fix_recenter.cpp fix_respa.cpp fix_rigid.cpp fix_rigid_nve.cpp fix_rigid_nvt.cpp fix_setforce.cpp fix_shake.cpp fix_shear_history.cpp fix_spring.cpp fix_spring_rg.cpp fix_spring_self.cpp fix_store_force.cpp fix_store_state.cpp fix_temp_berendsen.cpp fix_temp_rescale.cpp fix_thermal_conductivity.cpp fix_tmd.cpp fix_ttm.cpp fix_viscosity.cpp fix_viscous.cpp fix_wall.cpp fix_wall_harmonic.cpp fix_wall_lj126.cpp fix_wall_lj93.cpp fix_wall_reflect.cpp fix_wall_region.cpp force.cpp group.cpp improper.cpp improper_cvff.cpp improper_harmonic.cpp improper_hybrid.cpp input.cpp integrate.cpp kspace.cpp lammps.cpp lattice.cpp library.cpp main.cpp memory.cpp min.cpp min_cg.cpp min_hftn.cpp min_linesearch.cpp min_sd.cpp minimize.cpp modify.cpp neigh_bond.cpp neigh_derive.cpp neigh_full.cpp neigh_gran.cpp neigh_half_bin.cpp neigh_half_multi.cpp neigh_half_nsq.cpp neigh_list.cpp neigh_request.cpp neigh_respa.cpp neigh_stencil.cpp neighbor.cpp output.cpp pack.cpp pair.cpp pair_airebo.cpp pair_born_coul_long.cpp pair_buck.cpp pair_buck_coul_cut.cpp pair_buck_coul_long.cpp pair_comb.cpp pair_coul_cut.cpp pair_coul_debye.cpp pair_coul_long.cpp pair_dpd.cpp pair_dpd_tstat.cpp pair_eam.cpp pair_eam_alloy.cpp pair_eam_fs.cpp pair_eim.cpp pair_hybrid.cpp pair_hybrid_overlay.cpp pair_lj96_cut.cpp pair_lj_charmm_coul_charmm.cpp pair_lj_charmm_coul_charmm_implicit.cpp pair_lj_charmm_coul_long.cpp pair_lj_cut.cpp pair_lj_cut_coul_cut.cpp pair_lj_cut_coul_debye.cpp pair_lj_cut_coul_long.cpp pair_lj_cut_coul_long_tip4p.cpp pair_lj_expand.cpp pair_lj_gromacs.cpp pair_lj_gromacs_coul_gromacs.cpp pair_lj_smooth.cpp pair_morse.cpp pair_soft.cpp pair_sw.cpp pair_table.cpp pair_tersoff.cpp pair_tersoff_zbl.cpp pair_yukawa.cpp pppm.cpp pppm_tip4p.cpp random_mars.cpp random_park.cpp read_data.cpp read_restart.cpp region.cpp region_block.cpp region_cone.cpp region_cylinder.cpp region_intersect.cpp region_plane.cpp region_prism.cpp region_sphere.cpp region_union.cpp remap.cpp remap_wrap.cpp replicate.cpp respa.cpp run.cpp set.cpp shell.cpp special.cpp temper.cpp thermo.cpp timer.cpp universe.cpp update.cpp variable.cpp velocity.cpp verlet.cpp write_restart.cpp -INC = angle.h angle_charmm.h angle_cosine.h angle_cosine_delta.h angle_cosine_squared.h angle_harmonic.h angle_hybrid.h angle_table.h atom.h atom_vec.h atom_vec_angle.h atom_vec_atomic.h atom_vec_bond.h atom_vec_charge.h atom_vec_full.h atom_vec_hybrid.h atom_vec_molecular.h bond.h bond_fene.h bond_fene_expand.h bond_harmonic.h bond_hybrid.h bond_morse.h bond_nonlinear.h bond_quartic.h bond_table.h change_box.h comm.h compute.h compute_angle_local.h compute_bond_local.h compute_centro_atom.h compute_cna_atom.h compute_com.h compute_com_molecule.h compute_coord_atom.h compute_dihedral_local.h compute_displace_atom.h compute_erotate_sphere.h compute_group_group.h compute_gyration.h compute_gyration_molecule.h compute_heat_flux.h compute_improper_local.h compute_ke.h compute_ke_atom.h compute_momentum.h compute_msd.h compute_msd_molecule.h compute_pair_local.h compute_pe.h compute_pe_atom.h compute_pressure.h compute_property_atom.h compute_property_local.h compute_property_molecule.h compute_rdf.h compute_reduce.h compute_reduce_region.h compute_stress_atom.h compute_temp.h compute_temp_com.h compute_temp_deform.h compute_temp_partial.h compute_temp_profile.h compute_temp_ramp.h compute_temp_region.h compute_temp_sphere.h create_atoms.h create_box.h delete_atoms.h delete_bonds.h dihedral.h dihedral_charmm.h dihedral_harmonic.h dihedral_helix.h dihedral_hybrid.h dihedral_multi_harmonic.h dihedral_opls.h displace_atoms.h displace_box.h domain.h dump.h dump_atom.h dump_cfg.h dump_custom.h dump_dcd.h dump_local.h dump_xyz.h error.h ewald.h fft3d.h fft3d_wrap.h finish.h fix.h fix_adapt.h fix_addforce.h fix_ave_atom.h fix_ave_correlate.h fix_ave_histo.h fix_ave_spatial.h fix_ave_time.h fix_aveforce.h fix_bond_break.h fix_bond_create.h fix_bond_swap.h fix_box_relax.h fix_deform.h fix_deposit.h fix_drag.h fix_dt_reset.h fix_efield.h fix_enforce2d.h fix_evaporate.h fix_gravity.h fix_heat.h fix_indent.h fix_langevin.h fix_lineforce.h fix_minimize.h fix_momentum.h fix_move.h fix_nh.h fix_nh_sphere.h fix_nph.h fix_nph_sphere.h fix_npt.h fix_npt_sphere.h fix_nve.h fix_nve_limit.h fix_nve_noforce.h fix_nve_sphere.h fix_nvt.h fix_nvt_sllod.h fix_nvt_sphere.h fix_orient_fcc.h fix_planeforce.h fix_press_berendsen.h fix_print.h fix_qeq_comb.h fix_recenter.h fix_respa.h fix_rigid.h fix_rigid_nve.h fix_rigid_nvt.h fix_setforce.h fix_shake.h fix_shear_history.h fix_spring.h fix_spring_rg.h fix_spring_self.h fix_store_force.h fix_store_state.h fix_temp_berendsen.h fix_temp_rescale.h fix_thermal_conductivity.h fix_tmd.h fix_ttm.h fix_viscosity.h fix_viscous.h fix_wall.h fix_wall_harmonic.h fix_wall_lj126.h fix_wall_lj93.h fix_wall_reflect.h fix_wall_region.h force.h group.h improper.h improper_cvff.h improper_harmonic.h improper_hybrid.h input.h integrate.h kspace.h lammps.h lattice.h library.h math_extra.h memory.h min.h min_cg.h min_hftn.h min_linesearch.h min_sd.h minimize.h modify.h neigh_list.h neigh_request.h neighbor.h output.h pack.h pair.h pair_airebo.h pair_born_coul_long.h pair_buck.h pair_buck_coul_cut.h pair_buck_coul_long.h pair_comb.h pair_coul_cut.h pair_coul_debye.h pair_coul_long.h pair_dpd.h pair_dpd_tstat.h pair_eam.h pair_eam_alloy.h pair_eam_fs.h pair_eim.h pair_hybrid.h pair_hybrid_overlay.h pair_lj96_cut.h pair_lj_charmm_coul_charmm.h pair_lj_charmm_coul_charmm_implicit.h pair_lj_charmm_coul_long.h pair_lj_cut.h pair_lj_cut_coul_cut.h pair_lj_cut_coul_debye.h pair_lj_cut_coul_long.h pair_lj_cut_coul_long_tip4p.h pair_lj_expand.h pair_lj_gromacs.h pair_lj_gromacs_coul_gromacs.h pair_lj_smooth.h pair_morse.h pair_soft.h pair_sw.h pair_table.h pair_tersoff.h pair_tersoff_zbl.h pair_yukawa.h pointers.h pppm.h pppm_tip4p.h random_mars.h random_park.h read_data.h read_restart.h region.h region_block.h region_cone.h region_cylinder.h region_intersect.h region_plane.h region_prism.h region_sphere.h region_union.h remap.h remap_wrap.h replicate.h respa.h run.h set.h shell.h special.h style_angle.h style_atom.h style_bond.h style_command.h style_compute.h style_dihedral.h style_dump.h style_fix.h style_improper.h style_integrate.h style_kspace.h style_minimize.h style_pair.h style_region.h temper.h thermo.h timer.h universe.h update.h variable.h velocity.h verlet.h version.h write_restart.h +INC = angle.h angle_charmm.h angle_cosine.h angle_cosine_delta.h angle_cosine_squared.h angle_harmonic.h angle_hybrid.h angle_table.h atom.h atom_vec.h atom_vec_angle.h atom_vec_atomic.h atom_vec_bond.h atom_vec_charge.h atom_vec_full.h atom_vec_hybrid.h atom_vec_molecular.h bond.h bond_fene.h bond_fene_expand.h bond_harmonic.h bond_hybrid.h bond_morse.h bond_nonlinear.h bond_quartic.h bond_table.h change_box.h comm.h compute.h compute_angle_local.h compute_bond_local.h compute_centro_atom.h compute_cna_atom.h compute_com.h compute_com_molecule.h compute_coord_atom.h compute_dihedral_local.h compute_displace_atom.h compute_erotate_sphere.h compute_group_group.h compute_gyration.h compute_gyration_molecule.h compute_heat_flux.h compute_improper_local.h compute_ke.h compute_ke_atom.h compute_msd.h compute_msd_molecule.h compute_pair_local.h compute_pe.h compute_pe_atom.h compute_pressure.h compute_property_atom.h compute_property_local.h compute_property_molecule.h compute_rdf.h compute_reduce.h compute_reduce_region.h compute_stress_atom.h compute_temp.h compute_temp_com.h compute_temp_deform.h compute_temp_partial.h compute_temp_profile.h compute_temp_ramp.h compute_temp_region.h compute_temp_sphere.h create_atoms.h create_box.h delete_atoms.h delete_bonds.h dihedral.h dihedral_charmm.h dihedral_harmonic.h dihedral_helix.h dihedral_hybrid.h dihedral_multi_harmonic.h dihedral_opls.h displace_atoms.h displace_box.h domain.h dump.h dump_atom.h dump_cfg.h dump_custom.h dump_dcd.h dump_local.h dump_xyz.h error.h ewald.h fft3d.h fft3d_wrap.h finish.h fix.h fix_adapt.h fix_addforce.h fix_ave_atom.h fix_ave_correlate.h fix_ave_histo.h fix_ave_spatial.h fix_ave_time.h fix_aveforce.h fix_bond_break.h fix_bond_create.h fix_bond_swap.h fix_box_relax.h fix_deform.h fix_deposit.h fix_drag.h fix_dt_reset.h fix_efield.h fix_enforce2d.h fix_evaporate.h fix_gravity.h fix_heat.h fix_indent.h fix_langevin.h fix_lineforce.h fix_minimize.h fix_momentum.h fix_move.h fix_nh.h fix_nh_sphere.h fix_nph.h fix_nph_sphere.h fix_npt.h fix_npt_sphere.h fix_nve.h fix_nve_limit.h fix_nve_noforce.h fix_nve_sphere.h fix_nvt.h fix_nvt_sllod.h fix_nvt_sphere.h fix_orient_fcc.h fix_planeforce.h fix_press_berendsen.h fix_print.h fix_qeq_comb.h fix_recenter.h fix_respa.h fix_rigid.h fix_rigid_nve.h fix_rigid_nvt.h fix_setforce.h fix_shake.h fix_shear_history.h fix_spring.h fix_spring_rg.h fix_spring_self.h fix_store_force.h fix_store_state.h fix_temp_berendsen.h fix_temp_rescale.h fix_thermal_conductivity.h fix_tmd.h fix_ttm.h fix_viscosity.h fix_viscous.h fix_wall.h fix_wall_harmonic.h fix_wall_lj126.h fix_wall_lj93.h fix_wall_reflect.h fix_wall_region.h force.h group.h improper.h improper_cvff.h improper_harmonic.h improper_hybrid.h input.h integrate.h kspace.h lammps.h lattice.h library.h math_extra.h memory.h min.h min_cg.h min_hftn.h min_linesearch.h min_sd.h minimize.h modify.h neigh_list.h neigh_request.h neighbor.h output.h pack.h pair.h pair_airebo.h pair_born_coul_long.h pair_buck.h pair_buck_coul_cut.h pair_buck_coul_long.h pair_comb.h pair_coul_cut.h pair_coul_debye.h pair_coul_long.h pair_dpd.h pair_dpd_tstat.h pair_eam.h pair_eam_alloy.h pair_eam_fs.h pair_eim.h pair_hybrid.h pair_hybrid_overlay.h pair_lj96_cut.h pair_lj_charmm_coul_charmm.h pair_lj_charmm_coul_charmm_implicit.h pair_lj_charmm_coul_long.h pair_lj_cut.h pair_lj_cut_coul_cut.h pair_lj_cut_coul_debye.h pair_lj_cut_coul_long.h pair_lj_cut_coul_long_tip4p.h pair_lj_expand.h pair_lj_gromacs.h pair_lj_gromacs_coul_gromacs.h pair_lj_smooth.h pair_morse.h pair_soft.h pair_sw.h pair_table.h pair_tersoff.h pair_tersoff_zbl.h pair_yukawa.h pointers.h pppm.h pppm_tip4p.h random_mars.h random_park.h read_data.h read_restart.h region.h region_block.h region_cone.h region_cylinder.h region_intersect.h region_plane.h region_prism.h region_sphere.h region_union.h remap.h remap_wrap.h replicate.h respa.h run.h set.h shell.h special.h style_angle.h style_atom.h style_bond.h style_command.h style_compute.h style_dihedral.h style_dump.h style_fix.h style_improper.h style_integrate.h style_kspace.h style_minimize.h style_pair.h style_region.h temper.h thermo.h timer.h universe.h update.h variable.h velocity.h verlet.h version.h write_restart.h OBJ = $(SRC:.cpp=.o) -- GitLab From 88994d813aeba181736d7c80f2578e74731238df Mon Sep 17 00:00:00 2001 From: "Ellad B. Tadmor" Date: Fri, 21 Jun 2019 18:38:48 -0500 Subject: [PATCH 033/236] Ignore kim.log in examples/kim --- examples/kim/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 examples/kim/.gitignore diff --git a/examples/kim/.gitignore b/examples/kim/.gitignore new file mode 100644 index 0000000000..63421e4217 --- /dev/null +++ b/examples/kim/.gitignore @@ -0,0 +1 @@ +/kim.log -- GitLab From 08cee18f3207b6cea777dbbd24e17ca1a1f39ded Mon Sep 17 00:00:00 2001 From: "Ellad B. Tadmor" Date: Fri, 21 Jun 2019 18:39:18 -0500 Subject: [PATCH 034/236] Added code to define unit conversion factors --- src/KIM/kim_style.cpp | 219 ++++--- src/KIM/kim_style.h | 2 + src/KIM/kim_units.cpp | 1411 +++++++++++++++++++++++++++++++++++++++++ src/KIM/kim_units.h | 59 ++ 4 files changed, 1596 insertions(+), 95 deletions(-) create mode 100644 src/KIM/kim_units.cpp create mode 100644 src/KIM/kim_units.h diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index fcc3f33aa2..44d5c411ab 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -56,6 +56,7 @@ #include #include +#include #include "kim_style.h" #include "error.h" #include "atom.h" @@ -67,6 +68,7 @@ #include "input.h" #include "variable.h" #include "fix_store_kim.h" +#include "kim_units.h" extern "C" { #include "KIM_SimulatorHeaders.h" @@ -100,7 +102,6 @@ void KimStyle::command(int narg, char **arg) determine_model_type_and_units(model_name, user_units, &model_units); do_init(model_name, user_units, model_units); - if (unit_conversion_mode) do_variables(user_units, model_units); } else if (strcmp(arg[0],"setup") == 0) { if (!domain->box_exist) error->all(FLERR,"Must use 'kim_style setup' command after " @@ -255,7 +256,10 @@ void KimStyle::determine_model_type_and_units(char * model_name, if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) { - error->all(FLERR,"Incompatible units for KIM Simulator Model"); + std::stringstream mesg; + mesg << "Incompatible units for KIM Simulator Model, required units = " + << *model_units; + error->all(FLERR,mesg.str().c_str()); } } @@ -280,17 +284,43 @@ void KimStyle::do_init(char *model_name, char *user_units, char* model_units) fix_store->setptr("user_units", (void *) user_units); fix_store->setptr("model_units", (void *) model_units); + int kimerror; + // @@@@@ switch to c-bindings when they are available + KIM::SimulatorModel * simulatorModel; + kimerror = KIM::SimulatorModel::Create(model_name,&simulatorModel); + + const std::string *sim_name, *sim_version; + simulatorModel->GetSimulatorNameAndVersion(&sim_name, &sim_version); + + if (*sim_name != "LAMMPS") + error->all(FLERR,"Incompatible KIM Simulator Model"); + + // Begin output to log file + kim_style_log_delimiter("begin","model"); + if (comm->me == 0) { + std::string mesg("# Using KIM Simulator Model : "); + mesg += model_name; + mesg += "\n"; + mesg += "# For Simulator : "; + mesg += *sim_name + " " + *sim_version + "\n"; + mesg += "# Running on : LAMMPS "; + mesg += universe->version; + mesg += "\n"; + mesg += "#\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } + + // Define unit conversion factor variables and print to log + if (unit_conversion_mode) do_variables(user_units, model_units); + // set units std::string cmd("units "); cmd += model_units; input->one(cmd.c_str()); - int kimerror; - // @@@@@ switch to c-bindings when they are available - KIM::SimulatorModel * simulatorModel; - kimerror = KIM::SimulatorModel::Create(model_name,&simulatorModel); - // not a Kim Simulator Model; nothing else to do here. if (kimerror) return; @@ -318,13 +348,36 @@ void KimStyle::do_init(char *model_name, char *user_units, char* model_units) } } - // reset template map. + // End output to log file + kim_style_log_delimiter("end","model"); + // reset template map. simulatorModel->OpenAndInitializeTemplateMap(); } /* ---------------------------------------------------------------------- */ +void KimStyle::kim_style_log_delimiter(std::string begin_end, + std::string model_setup) +{ + if (comm->me == 0) { + std::string mesg; + if ((begin_end == "begin") && (model_setup == "model")) mesg = + "#=== BEGIN kim-style MODEL ==================================\n"; + else if ((begin_end == "begin") && (model_setup == "setup")) mesg = + "#=== BEGIN kim-style SETUP ==================================\n"; + else if ((begin_end == "end") && (model_setup == "model")) mesg = + "#=== END kim-style MODEL ====================================\n\n"; + else if ((begin_end == "end") && (model_setup == "setup")) mesg = + "#=== END kim-style SETUP ====================================\n\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } +} + +/* ---------------------------------------------------------------------- */ + void KimStyle::do_setup(int narg, char **arg) { if (narg != atom->ntypes) @@ -345,30 +398,13 @@ void KimStyle::do_setup(int narg, char **arg) simulatorModel = (KIM::SimulatorModel *)fix_store->getptr("simulator_model"); } else error->all(FLERR,"Must use 'kim_style model' before 'kim_style setup'"); + // Begin output to log file + kim_style_log_delimiter("begin","setup"); + if (simulatorModel) { - const std::string *sim_name, *sim_version; std::string atom_type_sym_list; - simulatorModel->GetSimulatorNameAndVersion(&sim_name, &sim_version); - - if (comm->me == 0) { - std::string mesg("Using KIM Simulator Model : "); - mesg += model; - mesg += "\n"; - mesg += "For Simulator : "; - mesg += *sim_name + " " + *sim_version + "\n"; - mesg += "Running on : LAMMPS "; - mesg += universe->version; - mesg += "\n"; - - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); - } - - if (*sim_name != "LAMMPS") - error->all(FLERR,"Incompatible KIM Simulator Model"); - for (int i = 0; i < narg; i++) atom_type_sym_list += std::string(" ") + arg[i]; @@ -455,6 +491,10 @@ void KimStyle::do_setup(int narg, char **arg) input->one(cmd1.c_str()); input->one(cmd2.c_str()); } + + // End output to log file + kim_style_log_delimiter("end","setup"); + } /* ---------------------------------------------------------------------- */ @@ -464,85 +504,74 @@ void KimStyle::do_variables(char *user_units, char *model_units) char *from = user_units, *to = model_units; Variable *variable = input->variable; - // refuse convertion from or to reduced units + // refuse conversion from or to reduced units if ((strcmp(from,"lj") == 0) || (strcmp(to,"lj") == 0)) error->all(FLERR,"Cannot set up conversion variables for 'lj' units"); // get index to internal style variables. create, if needed. - // default to conversion factor 1.0 for newly created variables - - // @@@@@@ below needs to be updated to use Ellad's luc. - int v_length, v_mass, v_time; + // set conversion factors for newly created variables. + double conversion_factor; + int ier; char *args[3]; + std::string var_str; args[1] = (char *)"internal"; args[2] = (char *)"1.0"; - - args[0] = (char *)"_u_length"; - v_length = variable->find(args[0]); - if (v_length < 0) { - variable->set(3,args); - v_length = variable->find(args[0]); + int v_unit; + int const nunits = 14; + char *units[nunits] = {(char *)"mass", + (char *)"distance", + (char *)"time", + (char *)"energy", + (char *)"velocity", + (char *)"force", + (char *)"torque", + (char *)"temperature", + (char *)"pressure", + (char *)"viscosity", + (char *)"charge", + (char *)"dipole", + (char *)"efield", + (char *)"density"}; + + if (comm->me == 0) { + std::stringstream mesg; + mesg << "# Conversion factors from " << from << " to " << to + << ":" << std::endl; + if (screen) fputs(mesg.str().c_str(),screen); + if (logfile) fputs(mesg.str().c_str(),logfile); } - args[0] = (char *)"_u_mass"; - v_mass = variable->find(args[0]); - if (v_mass < 0) { - variable->set(3,args); - v_mass = variable->find(args[0]); - } - - args[0] = (char *)"_u_time"; - v_time = variable->find(args[0]); - if (v_time < 0) { - variable->set(3,args); - v_time = variable->find(args[0]); - } - - // special case: both unit styles are the same => conversion factor 1.0 - - if (strcmp(from,to) == 0) { - variable->internal_set(v_length,1.0); - variable->internal_set(v_mass,1.0); - variable->internal_set(v_time,1.0); - return; - } - - if (strcmp(from,"real") == 0) { - if (strcmp(to,"metal") == 0) { - variable->internal_set(v_length,1.0); - variable->internal_set(v_mass,1.0); - variable->internal_set(v_time,0.001); - } else { - std::string err("Do not know how to set up conversion variables "); - err += "between '"; - err += from; - err += "' and '"; - err += to; - err += "' units"; - error->all(FLERR,err.c_str()); + for (int i = 0; i < nunits; i++) + { + var_str = std::string("_u_") + std::string(units[i]); + args[0] = (char *)var_str.c_str(); + v_unit = variable->find(args[0]); + if (v_unit < 0) { + variable->set(3,args); + v_unit = variable->find(args[0]); } - } else if (strcmp(from,"metal") == 0) { - if (strcmp(to,"real") == 0) { - variable->internal_set(v_length,1.0); - variable->internal_set(v_mass,1.0); - variable->internal_set(v_time,1000.0); - } else { - std::string err("Do not know how to set up conversion variables "); - err += "between '"; - err += from; - err += "' and '"; - err += to; - err += "' units"; + ier = lammps_unit_conversion(units[i], + from, + to, + conversion_factor); + if (ier != 0) { + std::string err = std::string("Unable to obtain conversion factor: ") + + "unit = " + units[i] + "; " + "from = " + from + "; " + "to = " + to + "."; error->all(FLERR,err.c_str()); } - } else { - std::string err("Do not know how to set up conversion variables "); - err += "between '"; - err += from; - err += "' and '"; - err += to; - err += "' units"; - error->all(FLERR,err.c_str()); + variable->internal_set(v_unit,conversion_factor); + if (comm->me == 0) { + std::stringstream mesg; + mesg << "# " << var_str << " = " << conversion_factor << std::endl; + if (screen) fputs(mesg.str().c_str(),screen); + if (logfile) fputs(mesg.str().c_str(),logfile); + } + } + if (comm->me == 0) { + if (screen) fputs("#\n",screen); + if (logfile) fputs("#\n",logfile); } } diff --git a/src/KIM/kim_style.h b/src/KIM/kim_style.h index b7ff47404f..b18f6627ea 100644 --- a/src/KIM/kim_style.h +++ b/src/KIM/kim_style.h @@ -80,6 +80,8 @@ class KimStyle : protected Pointers { void do_init(char *, char *, char *); void do_setup(int, char **); void do_variables(char*, char*); + void kim_style_log_delimiter(std::string begin_end, + std::string model_setup); }; } diff --git a/src/KIM/kim_units.cpp b/src/KIM/kim_units.cpp new file mode 100644 index 0000000000..fe90d58e9e --- /dev/null +++ b/src/KIM/kim_units.cpp @@ -0,0 +1,1411 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Ellad B. Tadmor (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.0.2 (and newer) package +------------------------------------------------------------------------- */ + +#include +#include +#include +#include +using namespace std; + +namespace +{ + +// Constants of nature and basic conversion factors +// Source: https://physics.nist.gov/cuu/Constants/Table/allascii.txt +// Working with NIST values even when there are newer values for +// compatibility with LAMMPS + +/*---------------------- + Fundamental constants +------------------------ */ +double const boltz_si = 1.38064852e-23; // [J K^-1] Boltzmann's factor + // (NIST value) +double const Nav = 6.022140857e23; // [unitless] Avogadro's number + // (NIST value) +// double const Nav = 6.02214076e23; // [unitless] Avogadro's number + // (official value May 2019) +double const me = 9.10938356e-31; // [kg] electron rest mass + // (NIST value) +// double me = 9.10938291e-31; // [kg] electron rest mass +double const e_si = 1.6021766208e-19; // [C] elementary charge + // (charge of an electron/proton) + // (NIST value) + +/*---------------------- + Distance units +------------------------ */ +double const bohr_si = 5.2917721067e-11; // [m] Bohr unit (distance between + // nucleus and electron in H) + // (NIST value) +double const angstrom_si = 1e-10; // [m] Angstrom +double const centimeter_si = 1e-2; // [m] centimeter +double const micrometer_si = 1e-6; // [m] micrometer (micron) +double const nanometer_si = 1e-9; // [m] nanometer + +/*---------------------- + Mass units +------------------------ */ +double const gram_per_mole_si = 1e-3/Nav; // [kg] gram per mole +double const amu_si = 1e-3/Nav; // [kg] atomic mass unit (molecular + // weight) For example, the mean + // molecular weight of water + // is 18.015 atomic mass units + // (amu), so one mole of water + // weight 18.015 grams. +double const gram_si = 1e-3; // [kg] gram +double const picogram_si = 1e-15; // [kg] picogram +double const attogram_si = 1e-21; // [kg[ attogram + +/*---------------------- + Time units +------------------------ */ +double const atu_si = 2.418884326509e-17; // [s] atomic time unit + // ( = hbar/E_h where E_h is the + // Hartree energy) (NIST value) +double const atu_electron_si = atu_si*sqrt(amu_si/me); // [s] atomic time unit + // used in electron system (see https://sourceforge.net/p/lammps/mailman/lammps-users/thread/BCA2BDB2-BA03-4280-896F-1E6120EF47B2%40caltech.edu/) +double const microsecond_si = 1e-6; // [s] microsecond +double const nanosecond_si = 1e-9; // [s] nanosecond +double const picosecond_si = 1e-12; // [s] picosecond +double const femtosecond_si = 1e-15; // [s] femtosecond + +/*---------------------- + Density units +------------------------ */ +double const gram_per_centimetercu_si = + gram_si/pow(centimeter_si,3); // [kg/m^3] gram/centimeter^3 +double const amu_per_bohrcu_si = amu_si/pow(bohr_si,3); // [kg/m^3] amu/bohr^3 +double const picogram_per_micrometercu_si = + picogram_si/pow(micrometer_si,3); // [kg/m^3] picogram/micrometer^3 +double const attogram_per_nanometercu_si = + attogram_si/pow(nanometer_si,3); // [kg/m^3] attogram/ + // nanomaterial^3 + +/*---------------------- + Energy/torque units +------------------------ */ +double const kcal_si = 4184.0; // [J] kilocalroie (heat energy + // involved in warming up one + // kilogram of water by one + // degree Kelvin) +double const ev_si = 1.6021766208e-19; // [J] electon volt (amount of + // energy gained or lost by the + // charge of a single electron + // moving across an electric + // potential difference of one + // volt.) (NIST value) +double const hartree_si = 4.359744650e-18; // [J] Hartree (approximately the + // electric potential energy of + // the hydrogen atom in its + // ground state) (NIST value) +double const kcal_per_mole_si = kcal_si/Nav;// [J] kcal/mole +double const erg_si = 1e-7; // [J] erg +double const dyne_centimeter_si = 1e-7; // [J[ dyne*centimeter +double const picogram_micrometersq_per_microsecondsq_si = + picogram_si*pow(micrometer_si,2)/pow(microsecond_si,2); + // [J] pigogram*micrometer^2/ + // micorsecond^2 +double const attogram_nanometersq_per_nanosecondsq_si = + attogram_si*pow(nanometer_si,2)/pow(nanosecond_si,2); + // [J] attogram*nanometer^2/ + // nanosecond^2 + +/*---------------------- + Velocity units +------------------------ */ +double const angstrom_per_femtosecond_si = + angstrom_si/femtosecond_si; // [m/s] Angstrom/femtosecond +double const angstrom_per_picosecond_si = + angstrom_si/picosecond_si; // [m/s] Angstrom/picosecond +double const micrometer_per_microsecond_si = + micrometer_si/microsecond_si; // [m/s] micrometer/microsecond +double const nanometer_per_nanosecond_si = + nanometer_si/nanosecond_si; // [m/s] nanometer/nanosecond +double const centimeter_per_second_si = + centimeter_si; // [m/s] centimeter/second +double const bohr_per_atu_si = + bohr_si/atu_electron_si; // [m/s] bohr/atu + +/*---------------------- + Force units +------------------------ */ +double const kcal_per_mole_angstrom_si = + kcal_per_mole_si/angstrom_si; // [N] kcal/(mole*Angstrom) +double const ev_per_angstrom_si = + ev_si/angstrom_si; // [N] eV/Angstrom +double const dyne_si = + dyne_centimeter_si/centimeter_si; // [N] dyne +double const hartree_per_bohr_si = + hartree_si/bohr_si; // [N] hartree/bohr +double const picogram_micrometer_per_microsecondsq_si = + picogram_si*micrometer_si/pow(microsecond_si,2); + // [N] picogram*micrometer/ + // microsecond^2 +double const attogram_nanometer_per_nanosecondsq_si = + attogram_si*nanometer_si/pow(nanosecond_si,2); + // [N] attogram*nanometer/ + // nanosecond^2 + +/*---------------------- + Pressure units +------------------------ */ +double const atmosphere_si = 101325.0; // [Pa] standard atmosphere (NIST value) +double const bar_si = 1e5; // [Pa] bar +double const dyne_per_centimetersq_si = + dyne_centimeter_si/pow(centimeter_si,3); + // [Pa] dyne/centimeter^2 +double const picogram_per_micrometer_microsecondsq_si = + picogram_si/(micrometer_si*pow(microsecond_si,2)); + // [Pa] picogram/(micrometer* + // microsecond^2) +double const attogram_per_nanometer_nanosecondsq_si = + attogram_si/(nanometer_si*pow(nanosecond_si,2)); + // [Pa] attogram/(nanometer*nanosecond^2) + +/*---------------------- + Viscosity units +------------------------ */ +double const poise_si = 0.1; // [Pa*s] Poise +double const amu_per_bohr_femtosecond_si = + amu_si/(bohr_si*femtosecond_si); // [Pa*s] amu/(bohr*femtosecond) +double const picogram_per_micrometer_microsecond_si = + picogram_si/(micrometer_si*microsecond_si); + // [Pa*s] picogram/(micrometer* + // microsecond) +double const attogram_per_nanometer_nanosecond_si = + attogram_si/(nanometer_si*nanosecond_si); + // [Pa*s] attogram/(nanometer* + // nanosecond) + +/*---------------------- + Charge units +------------------------ */ +double const echarge_si = e_si; // [C] electron charge unit +double const statcoulomb_si = e_si/4.8032044e-10; // [C] Statcoulomb or esu + // (value from LAMMPS units + // documentation) +double const picocoulomb_si = 1e-12; // [C] picocoulomb + +/*---------------------- + Dipole units +------------------------ */ +double const electron_angstrom_si = echarge_si*angstrom_si; + // [C*m] electron*angstrom +double const statcoulomb_centimeter_si = statcoulomb_si*centimeter_si; + // [C*m] statcoulomb*centimeter +double const debye_si = 1e-18*statcoulomb_centimeter_si; + // [C*m] Debye +double const picocoulomb_micrometer_si = picocoulomb_si*micrometer_si; + // [C*m] picocoulomb*micrometer +double const electron_nanometer_si = echarge_si*nanometer_si; + // [C*m] electron*nanometer + +/*---------------------- + Electric field units +------------------------ */ +double const volt_per_angstrom_si = 1.0/angstrom_si;// [V/m] volt/angstrom +double const statvolt_per_centimeter_si = + erg_si/(statcoulomb_si*centimeter_si); // [V/m] statvolt/centimeter +double const volt_per_centimeter_si = + 1.0/centimeter_si; // [V/m] volt/centimeter +double const volt_per_micrometer_si = + 1.0/micrometer_si; // [V/m] volt/micrometer +double const volt_per_nanometer_si = + 1.0/nanometer_si; // [V/m] volt/nanometer + +// Define enumerations +enum sys_type +{ + real = 1, + metal = 2, + si = 3, + cgs = 4, + electron = 5, + micro = 6, + nano = 7 +}; + +enum unit_type +{ + mass = 1, + distance = 2, + time = 3, + energy = 4, + velocity = 5, + force = 6, + torque = 7, + temperature = 8, + pressure = 9, + viscosity = 10, + charge = 11, + dipole = 12, + efield = 13, + density = 14 +}; + +enum units +{ + // mass + gram_per_mole = 101, + kilogram = 102, + gram = 103, + amu = 104, + picogram = 105, + attogram = 106, + // distance + angstrom = 201, + meter = 202, + centimeter = 203, + bohr = 204, + micrometer = 205, + nanometer = 206, + // time + femtosecond = 301, + picosecond = 302, + second = 303, + microsecond = 304, + nanosecond = 305, + // energy + kcal_per_mole = 401, + ev = 402, + joule = 403, + erg = 404, + hartree = 405, + picogram_micrometersq_per_microsecondsq = 406, + attogram_nanometersq_per_nanosecondsq = 407, + // velocity + angstrom_per_femtosecond = 501, + angstrom_per_picosecond = 502, + meter_per_second = 503, + centimeter_per_second = 504, + bohr_per_atu = 505, + micrometer_per_microsecond = 506, + nanometer_per_nanosecond = 507, + // force + kcal_per_mole_angstrom = 601, + ev_per_angstrom = 602, + newton = 603, + dyne = 604, + hartree_per_bohr = 605, + picogram_micrometer_per_microsecondsq = 606, + attogram_nanometer_per_nanosecondsq = 607, + // torque + newton_meter = 701, + dyne_centimeter = 702, + // temperature + kelvin = 801, + // pressure + atmosphere = 901, + bar = 902, + pascal = 903, + dyne_per_centimetersq = 904, + picogram_per_micrometer_microsecondsq = 905, + attogram_per_nanometer_nanosecondsq = 906, + // viscosity + poise = 1001, + pascal_second = 1002, + amu_per_bohr_femtosecond = 1003, // electron system, not in docs, GUESSED + picogram_per_micrometer_microsecond = 1004, + attogram_per_nanometer_nanosecond = 1005, + // charge + echarge = 1101, + coulomb = 1102, + statcoulomb = 1103, + picocoulomb = 1104, + // dipole + electron_angstrom = 1201, + coulomb_meter = 1202, + statcoulomb_centimeter = 1203, + debye = 1204, + picocoulomb_micrometer = 1205, + electron_nanometer = 1206, + // electric field + volt_per_angstrom = 1301, + volt_per_meter = 1302, + statvolt_per_centimeter = 1303, + volt_per_centimeter = 1304, + volt_per_micrometer = 1305, + volt_per_nanometer = 1306, + // density + gram_per_centimetercu = 1401, + kilogram_per_metercu = 1402, + amu_per_bohrcu = 1403, // electron system, not in docs, GUESSED + picogram_per_micrometercu = 1404, + attogram_per_nanometercu = 1405 +}; + +// Define dictionaries +map system_dic; +map unit_dic; +map units_real_dic; +map units_metal_dic; +map units_si_dic; +map units_cgs_dic; +map units_electron_dic; +map units_micro_dic; +map units_nano_dic; + +/* ---------------------------------------------------------------------- */ + +void initialize_dictionaries() +{ + system_dic["real"] = real; + system_dic["metal"] = metal; + system_dic["si"] = si; + system_dic["cgs"] = cgs; + system_dic["electron"] = electron; + system_dic["micro"] = micro; + system_dic["nano"] = nano; + + unit_dic["mass"] = mass; + unit_dic["distance"] = distance; + unit_dic["time"] = time; + unit_dic["energy"] = energy; + unit_dic["velocity"] = velocity; + unit_dic["force"] = force; + unit_dic["torque"] = torque; + unit_dic["temperature"]= temperature; + unit_dic["pressure"] = pressure; + unit_dic["viscosity"] = viscosity; + unit_dic["charge"] = charge; + unit_dic["dipole"] = dipole; + unit_dic["efield"] = efield; + unit_dic["density"] = density; + + units_real_dic[mass] = gram_per_mole; + units_real_dic[distance] = angstrom; + units_real_dic[time] = femtosecond; + units_real_dic[energy] = kcal_per_mole; + units_real_dic[velocity] = angstrom_per_femtosecond; + units_real_dic[force] = kcal_per_mole_angstrom; + units_real_dic[torque] = kcal_per_mole; + units_real_dic[temperature]= kelvin; + units_real_dic[pressure] = atmosphere; + units_real_dic[viscosity] = poise; + units_real_dic[charge] = echarge; + units_real_dic[dipole] = electron_angstrom; + units_real_dic[efield] = volt_per_angstrom; + units_real_dic[density] = gram_per_centimetercu; + + units_metal_dic[mass] = gram_per_mole; + units_metal_dic[distance] = angstrom; + units_metal_dic[time] = picosecond; + units_metal_dic[energy] = ev; + units_metal_dic[velocity] = angstrom_per_picosecond; + units_metal_dic[force] = ev_per_angstrom; + units_metal_dic[torque] = ev; + units_metal_dic[temperature]= kelvin; + units_metal_dic[pressure] = bar; + units_metal_dic[viscosity] = poise; + units_metal_dic[charge] = echarge; + units_metal_dic[dipole] = electron_angstrom; + units_metal_dic[efield] = volt_per_angstrom; + units_metal_dic[density] = gram_per_centimetercu; + + units_si_dic[mass] = kilogram; + units_si_dic[distance] = meter; + units_si_dic[time] = second; + units_si_dic[energy] = joule; + units_si_dic[velocity] = meter_per_second; + units_si_dic[force] = newton; + units_si_dic[torque] = newton_meter; + units_si_dic[temperature]= kelvin; + units_si_dic[pressure] = pascal; + units_si_dic[viscosity] = pascal_second; + units_si_dic[charge] = coulomb; + units_si_dic[dipole] = coulomb_meter; + units_si_dic[efield] = volt_per_meter; + units_si_dic[density] = kilogram_per_metercu; + + units_cgs_dic[mass] = gram; + units_cgs_dic[distance] = centimeter; + units_cgs_dic[time] = second; + units_cgs_dic[energy] = erg; + units_cgs_dic[velocity] = centimeter_per_second; + units_cgs_dic[force] = dyne; + units_cgs_dic[torque] = dyne_centimeter; + units_cgs_dic[temperature]= kelvin; + units_cgs_dic[pressure] = dyne_per_centimetersq; + units_cgs_dic[viscosity] = poise; + units_cgs_dic[charge] = statcoulomb; + units_cgs_dic[dipole] = statcoulomb_centimeter; + units_cgs_dic[efield] = statvolt_per_centimeter; + units_cgs_dic[density] = gram_per_centimetercu; + + units_electron_dic[mass] = amu; + units_electron_dic[distance] = bohr; + units_electron_dic[time] = femtosecond; + units_electron_dic[energy] = hartree; + units_electron_dic[velocity] = bohr_per_atu; + units_electron_dic[force] = hartree_per_bohr; + units_electron_dic[torque] = hartree; // unknown, GUESSED + units_electron_dic[temperature]= kelvin; + units_electron_dic[pressure] = pascal; + units_electron_dic[viscosity] = pascal_second; // unknown, GUESSED + units_electron_dic[charge] = echarge; + units_electron_dic[dipole] = debye; + units_electron_dic[efield] = volt_per_centimeter; + units_electron_dic[density] = amu_per_bohrcu; // unknown, GUESSED + + units_micro_dic[mass] = picogram; + units_micro_dic[distance] = micrometer; + units_micro_dic[time] = microsecond; + units_micro_dic[energy] = picogram_micrometersq_per_microsecondsq; + units_micro_dic[velocity] = micrometer_per_microsecond; + units_micro_dic[force] = picogram_micrometer_per_microsecondsq; + units_micro_dic[torque] = picogram_micrometersq_per_microsecondsq; + units_micro_dic[temperature]= kelvin; + units_micro_dic[pressure] = picogram_per_micrometer_microsecondsq; + units_micro_dic[viscosity] = picogram_per_micrometer_microsecond; + units_micro_dic[charge] = picocoulomb; + units_micro_dic[dipole] = picocoulomb_micrometer; + units_micro_dic[efield] = volt_per_micrometer; + units_micro_dic[density] = picogram_per_micrometercu; + + units_nano_dic[mass] = attogram; + units_nano_dic[distance] = nanometer; + units_nano_dic[time] = nanosecond; + units_nano_dic[energy] = attogram_nanometersq_per_nanosecondsq; + units_nano_dic[velocity] = nanometer_per_nanosecond; + units_nano_dic[force] = attogram_nanometer_per_nanosecondsq; + units_nano_dic[torque] = attogram_nanometersq_per_nanosecondsq; + units_nano_dic[temperature]= kelvin; + units_nano_dic[pressure] = attogram_per_nanometer_nanosecondsq; + units_nano_dic[viscosity] = attogram_per_nanometer_nanosecond; + units_nano_dic[charge] = echarge; + units_nano_dic[dipole] = electron_nanometer; + units_nano_dic[efield] = volt_per_nanometer; + units_nano_dic[density] = attogram_per_nanometercu; + +} + +/* ---------------------------------------------------------------------- */ + +// Get the enumeration for the unit of type `unit_type_enum` +// for LAMMPS system `system_enum`. +units get_lammps_system_unit(sys_type system_enum, unit_type unit_type_enum) +{ + switch(system_enum) { + case real : + return units_real_dic[unit_type_enum]; + case metal : + return units_metal_dic[unit_type_enum]; + case si : + return units_si_dic[unit_type_enum]; + case cgs : + return units_cgs_dic[unit_type_enum]; + case electron : + return units_electron_dic[unit_type_enum]; + case micro : + return units_micro_dic[unit_type_enum]; + case nano : + default : // This is here to a prevent a compiler warning + return units_nano_dic[unit_type_enum]; + } +} + +/* ---------------------------------------------------------------------- */ + +// Mass conversion +double get_mass_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[kilogram][kilogram] = 1.0; + conv[kilogram][gram_per_mole] = 1.0/gram_per_mole_si; + conv[kilogram][gram] = 1.0/gram_si; + conv[kilogram][amu] = 1.0/amu_si; + conv[kilogram][picogram] = 1.0/picogram_si; + conv[kilogram][attogram] = 1.0/attogram_si; + + to_si = 1.0/conv[kilogram][gram_per_mole]; + conv[gram_per_mole][kilogram] = to_si*conv[kilogram][kilogram]; + conv[gram_per_mole][gram_per_mole] = 1.0; + conv[gram_per_mole][gram] = to_si*conv[kilogram][gram]; + conv[gram_per_mole][amu] = to_si*conv[kilogram][amu]; + conv[gram_per_mole][picogram] = to_si*conv[kilogram][picogram]; + conv[gram_per_mole][attogram] = to_si*conv[kilogram][attogram]; + + to_si = 1.0/conv[kilogram][gram]; + conv[gram][kilogram] = to_si*conv[kilogram][kilogram]; + conv[gram][gram_per_mole] = to_si*conv[kilogram][gram_per_mole]; + conv[gram][gram] = 1.0; + conv[gram][amu] = to_si*conv[kilogram][amu]; + conv[gram][picogram] = to_si*conv[kilogram][picogram]; + conv[gram][attogram] = to_si*conv[kilogram][attogram]; + + to_si = 1.0/conv[kilogram][amu]; + conv[amu][kilogram] = to_si*conv[kilogram][kilogram]; + conv[amu][gram_per_mole] = to_si*conv[kilogram][gram_per_mole]; + conv[amu][gram] = to_si*conv[kilogram][gram]; + conv[amu][amu] = 1.0; + conv[amu][picogram] = to_si*conv[kilogram][picogram]; + conv[amu][attogram] = to_si*conv[kilogram][attogram]; + + to_si = 1.0/conv[kilogram][picogram]; + conv[picogram][kilogram] = to_si*conv[kilogram][kilogram]; + conv[picogram][gram_per_mole] = to_si*conv[kilogram][gram_per_mole]; + conv[picogram][gram] = to_si*conv[kilogram][gram]; + conv[picogram][amu] = to_si*conv[kilogram][amu]; + conv[picogram][picogram] = 1.0; + conv[picogram][attogram] = to_si*conv[kilogram][attogram]; + + to_si = 1.0/conv[kilogram][attogram]; + conv[attogram][kilogram] = to_si*conv[kilogram][kilogram]; + conv[attogram][gram_per_mole] = to_si*conv[kilogram][gram_per_mole]; + conv[attogram][gram] = to_si*conv[kilogram][gram]; + conv[attogram][amu] = to_si*conv[kilogram][amu]; + conv[attogram][picogram] = to_si*conv[kilogram][picogram]; + conv[attogram][attogram] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Distance conversion +double get_distance_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[meter][meter] = 1.0; + conv[meter][angstrom] = 1.0/angstrom_si; + conv[meter][centimeter] = 1.0/centimeter_si; + conv[meter][bohr] = 1.0/bohr_si; + conv[meter][micrometer] = 1.0/micrometer_si; + conv[meter][nanometer] = 1.0/nanometer_si; + + to_si = 1.0/conv[meter][angstrom]; + conv[angstrom][meter] = to_si*conv[meter][meter]; + conv[angstrom][angstrom] = 1.0; + conv[angstrom][centimeter] = to_si*conv[meter][centimeter]; + conv[angstrom][bohr] = to_si*conv[meter][bohr]; + conv[angstrom][micrometer] = to_si*conv[meter][micrometer]; + conv[angstrom][nanometer] = to_si*conv[meter][nanometer]; + + to_si = 1.0/conv[meter][centimeter]; + conv[centimeter][meter] = to_si*conv[meter][meter]; + conv[centimeter][angstrom] = to_si*conv[meter][angstrom]; + conv[centimeter][centimeter] = 1.0; + conv[centimeter][bohr] = to_si*conv[meter][bohr]; + conv[centimeter][micrometer] = to_si*conv[meter][micrometer]; + conv[centimeter][nanometer] = to_si*conv[meter][nanometer]; + + to_si = 1.0/conv[meter][bohr]; + conv[bohr][meter] = to_si*conv[meter][meter]; + conv[bohr][angstrom] = to_si*conv[meter][angstrom]; + conv[bohr][centimeter] = to_si*conv[meter][centimeter]; + conv[bohr][bohr] = 1.0; + conv[bohr][micrometer] = to_si*conv[meter][micrometer]; + conv[bohr][nanometer] = to_si*conv[meter][nanometer]; + + to_si = 1.0/conv[meter][micrometer]; + conv[micrometer][meter] = to_si*conv[meter][meter]; + conv[micrometer][angstrom] = to_si*conv[meter][angstrom]; + conv[micrometer][centimeter] = to_si*conv[meter][centimeter]; + conv[micrometer][bohr] = to_si*conv[meter][bohr]; + conv[micrometer][micrometer] = 1.0; + conv[micrometer][nanometer] = to_si*conv[meter][nanometer]; + + to_si = 1.0/conv[meter][nanometer]; + conv[nanometer][meter] = to_si*conv[meter][meter]; + conv[nanometer][angstrom] = to_si*conv[meter][angstrom]; + conv[nanometer][centimeter] = to_si*conv[meter][centimeter]; + conv[nanometer][bohr] = to_si*conv[meter][bohr]; + conv[nanometer][micrometer] = to_si*conv[meter][micrometer]; + conv[nanometer][nanometer] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Time conversion +double get_time_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[second][second] = 1.0; + conv[second][femtosecond] = 1.0/femtosecond_si; + conv[second][picosecond] = 1.0/picosecond_si; + conv[second][microsecond] = 1.0/microsecond_si; + conv[second][nanosecond] = 1.0/nanosecond_si; + + to_si = 1.0/conv[second][femtosecond]; + conv[femtosecond][second] = to_si*conv[second][second]; + conv[femtosecond][femtosecond] = 1.0; + conv[femtosecond][picosecond] = to_si*conv[second][picosecond]; + conv[femtosecond][microsecond] = to_si*conv[second][microsecond]; + conv[femtosecond][nanosecond] = to_si*conv[second][nanosecond]; + + to_si = 1.0/conv[second][picosecond]; + conv[picosecond][second] = to_si*conv[second][second]; + conv[picosecond][femtosecond] = to_si*conv[second][femtosecond]; + conv[picosecond][picosecond] = 1.0; + conv[picosecond][microsecond] = to_si*conv[second][microsecond]; + conv[picosecond][nanosecond] = to_si*conv[second][nanosecond]; + + to_si = 1.0/conv[second][microsecond]; + conv[microsecond][second] = to_si*conv[second][second]; + conv[microsecond][femtosecond] = to_si*conv[second][femtosecond]; + conv[microsecond][picosecond] = to_si*conv[second][picosecond]; + conv[microsecond][microsecond] = 1.0; + conv[microsecond][nanosecond] = to_si*conv[second][nanosecond]; + + to_si = 1.0/conv[second][nanosecond]; + conv[nanosecond][second] = to_si*conv[second][second]; + conv[nanosecond][femtosecond] = to_si*conv[second][femtosecond]; + conv[nanosecond][picosecond] = to_si*conv[second][picosecond]; + conv[nanosecond][microsecond] = to_si*conv[second][microsecond]; + conv[nanosecond][nanosecond] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Energy conversion +double get_energy_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + + map > conv; + double to_si; + + conv[joule][joule] = 1.0; + conv[joule][kcal_per_mole] = 1.0/kcal_per_mole_si; + conv[joule][ev] = 1.0/ev_si; + conv[joule][erg] = 1.0/erg_si; + conv[joule][hartree] = 1.0/hartree_si; + conv[joule][picogram_micrometersq_per_microsecondsq] = 1.0/picogram_micrometersq_per_microsecondsq_si; + conv[joule][attogram_nanometersq_per_nanosecondsq] = 1.0/attogram_nanometersq_per_nanosecondsq_si; + + to_si = 1.0/conv[joule][kcal_per_mole]; + conv[kcal_per_mole][joule] = to_si*conv[joule][joule]; + conv[kcal_per_mole][kcal_per_mole] = 1.0; + conv[kcal_per_mole][ev] = to_si*conv[joule][ev]; + conv[kcal_per_mole][erg] = to_si*conv[joule][erg]; + conv[kcal_per_mole][hartree] = to_si*conv[joule][hartree]; + conv[kcal_per_mole][picogram_micrometersq_per_microsecondsq] = to_si*conv[joule][picogram_micrometersq_per_microsecondsq]; + conv[kcal_per_mole][attogram_nanometersq_per_nanosecondsq] = to_si*conv[joule][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[joule][ev]; + conv[ev][joule] = to_si*conv[joule][joule]; + conv[ev][kcal_per_mole] = to_si*conv[joule][kcal_per_mole]; + conv[ev][ev] = 1.0; + conv[ev][erg] = to_si*conv[joule][erg]; + conv[ev][hartree] = to_si*conv[joule][hartree]; + conv[ev][picogram_micrometersq_per_microsecondsq] = to_si*conv[joule][picogram_micrometersq_per_microsecondsq]; + conv[ev][attogram_nanometersq_per_nanosecondsq] = to_si*conv[joule][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[joule][erg]; + conv[erg][joule] = to_si*conv[joule][joule]; + conv[erg][kcal_per_mole] = to_si*conv[joule][kcal_per_mole]; + conv[erg][ev] = to_si*conv[joule][ev]; + conv[erg][erg] = 1.0; + conv[erg][hartree] = to_si*conv[joule][hartree]; + conv[erg][picogram_micrometersq_per_microsecondsq] = to_si*conv[joule][picogram_micrometersq_per_microsecondsq]; + conv[erg][attogram_nanometersq_per_nanosecondsq] = to_si*conv[joule][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[joule][hartree]; + conv[hartree][joule] = to_si*conv[joule][joule]; + conv[hartree][kcal_per_mole] = to_si*conv[joule][kcal_per_mole]; + conv[hartree][ev] = to_si*conv[joule][ev]; + conv[hartree][erg] = to_si*conv[joule][erg]; + conv[hartree][hartree] = 1.0; + conv[hartree][picogram_micrometersq_per_microsecondsq] = to_si*conv[joule][picogram_micrometersq_per_microsecondsq]; + conv[hartree][attogram_nanometersq_per_nanosecondsq] = to_si*conv[joule][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[joule][picogram_micrometersq_per_microsecondsq]; + conv[picogram_micrometersq_per_microsecondsq][joule] = to_si*conv[joule][joule]; + conv[picogram_micrometersq_per_microsecondsq][kcal_per_mole] = to_si*conv[joule][kcal_per_mole]; + conv[picogram_micrometersq_per_microsecondsq][ev] = to_si*conv[joule][ev]; + conv[picogram_micrometersq_per_microsecondsq][erg] = to_si*conv[joule][erg]; + conv[picogram_micrometersq_per_microsecondsq][hartree] = to_si*conv[joule][hartree]; + conv[picogram_micrometersq_per_microsecondsq][picogram_micrometersq_per_microsecondsq] = 1.0; + conv[picogram_micrometersq_per_microsecondsq][attogram_nanometersq_per_nanosecondsq] = to_si*conv[joule][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[joule][attogram_nanometersq_per_nanosecondsq]; + conv[attogram_nanometersq_per_nanosecondsq][joule] = to_si*conv[joule][joule]; + conv[attogram_nanometersq_per_nanosecondsq][kcal_per_mole] = to_si*conv[joule][kcal_per_mole]; + conv[attogram_nanometersq_per_nanosecondsq][ev] = to_si*conv[joule][ev]; + conv[attogram_nanometersq_per_nanosecondsq][erg] = to_si*conv[joule][erg]; + conv[attogram_nanometersq_per_nanosecondsq][hartree] = to_si*conv[joule][hartree]; + conv[attogram_nanometersq_per_nanosecondsq][picogram_micrometersq_per_microsecondsq] = to_si*conv[joule][picogram_micrometersq_per_microsecondsq]; + conv[attogram_nanometersq_per_nanosecondsq][attogram_nanometersq_per_nanosecondsq] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Velocity conversion +double get_velocity_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[meter_per_second][meter_per_second] = 1.0; + conv[meter_per_second][angstrom_per_femtosecond] = 1.0/angstrom_per_femtosecond_si; + conv[meter_per_second][angstrom_per_picosecond] = 1.0/angstrom_per_picosecond_si; + conv[meter_per_second][centimeter_per_second] = 1.0/centimeter_per_second_si; + conv[meter_per_second][bohr_per_atu] = 1.0/bohr_per_atu_si; + conv[meter_per_second][micrometer_per_microsecond] = 1.0/micrometer_per_microsecond_si; + conv[meter_per_second][nanometer_per_nanosecond] = 1.0/nanometer_per_nanosecond_si; + + to_si = 1.0/conv[meter_per_second][angstrom_per_femtosecond]; + conv[angstrom_per_femtosecond][meter_per_second] = to_si*conv[meter_per_second][meter_per_second]; + conv[angstrom_per_femtosecond][angstrom_per_femtosecond] = 1.0; + conv[angstrom_per_femtosecond][angstrom_per_picosecond] = to_si*conv[meter_per_second][angstrom_per_picosecond]; + conv[angstrom_per_femtosecond][centimeter_per_second] = to_si*conv[meter_per_second][centimeter_per_second]; + conv[angstrom_per_femtosecond][bohr_per_atu] = to_si*conv[meter_per_second][bohr_per_atu]; + conv[angstrom_per_femtosecond][micrometer_per_microsecond] = to_si*conv[meter_per_second][micrometer_per_microsecond]; + conv[angstrom_per_femtosecond][nanometer_per_nanosecond] = to_si*conv[meter_per_second][nanometer_per_nanosecond]; + + to_si = 1.0/conv[meter_per_second][angstrom_per_picosecond]; + conv[angstrom_per_picosecond][meter_per_second] = to_si*conv[meter_per_second][meter_per_second]; + conv[angstrom_per_picosecond][angstrom_per_femtosecond] = to_si*conv[meter_per_second][angstrom_per_femtosecond]; + conv[angstrom_per_picosecond][angstrom_per_picosecond] = 1.0; + conv[angstrom_per_picosecond][centimeter_per_second] = to_si*conv[meter_per_second][centimeter_per_second]; + conv[angstrom_per_picosecond][bohr_per_atu] = to_si*conv[meter_per_second][bohr_per_atu]; + conv[angstrom_per_picosecond][micrometer_per_microsecond] = to_si*conv[meter_per_second][micrometer_per_microsecond]; + conv[angstrom_per_picosecond][nanometer_per_nanosecond] = to_si*conv[meter_per_second][nanometer_per_nanosecond]; + + to_si = 1.0/conv[meter_per_second][centimeter_per_second]; + conv[centimeter_per_second][meter_per_second] = to_si*conv[meter_per_second][meter_per_second]; + conv[centimeter_per_second][angstrom_per_femtosecond] = to_si*conv[meter_per_second][angstrom_per_femtosecond]; + conv[centimeter_per_second][angstrom_per_picosecond] = to_si*conv[meter_per_second][angstrom_per_picosecond]; + conv[centimeter_per_second][centimeter_per_second] = 1.0; + conv[centimeter_per_second][bohr_per_atu] = to_si*conv[meter_per_second][bohr_per_atu]; + conv[centimeter_per_second][micrometer_per_microsecond] = to_si*conv[meter_per_second][micrometer_per_microsecond]; + conv[centimeter_per_second][nanometer_per_nanosecond] = to_si*conv[meter_per_second][nanometer_per_nanosecond]; + + to_si = 1.0/conv[meter_per_second][bohr_per_atu]; + conv[bohr_per_atu][meter_per_second] = to_si*conv[meter_per_second][meter_per_second]; + conv[bohr_per_atu][angstrom_per_femtosecond] = to_si*conv[meter_per_second][angstrom_per_femtosecond]; + conv[bohr_per_atu][angstrom_per_picosecond] = to_si*conv[meter_per_second][angstrom_per_picosecond]; + conv[bohr_per_atu][centimeter_per_second] = to_si*conv[meter_per_second][centimeter_per_second]; + conv[bohr_per_atu][bohr_per_atu] = 1.0; + conv[bohr_per_atu][micrometer_per_microsecond] = to_si*conv[meter_per_second][micrometer_per_microsecond]; + conv[bohr_per_atu][nanometer_per_nanosecond] = to_si*conv[meter_per_second][nanometer_per_nanosecond]; + + to_si = 1.0/conv[meter_per_second][micrometer_per_microsecond]; + conv[micrometer_per_microsecond][meter_per_second] = to_si*conv[meter_per_second][meter_per_second]; + conv[micrometer_per_microsecond][angstrom_per_femtosecond] = to_si*conv[meter_per_second][angstrom_per_femtosecond]; + conv[micrometer_per_microsecond][angstrom_per_picosecond] = to_si*conv[meter_per_second][angstrom_per_picosecond]; + conv[micrometer_per_microsecond][centimeter_per_second] = to_si*conv[meter_per_second][centimeter_per_second]; + conv[micrometer_per_microsecond][bohr_per_atu] = to_si*conv[meter_per_second][bohr_per_atu]; + conv[micrometer_per_microsecond][micrometer_per_microsecond] = 1.0; + conv[micrometer_per_microsecond][nanometer_per_nanosecond] = to_si*conv[meter_per_second][nanometer_per_nanosecond]; + + to_si = 1.0/conv[meter_per_second][nanometer_per_nanosecond]; + conv[nanometer_per_nanosecond][meter_per_second] = to_si*conv[meter_per_second][meter_per_second]; + conv[nanometer_per_nanosecond][angstrom_per_femtosecond] = to_si*conv[meter_per_second][angstrom_per_femtosecond]; + conv[nanometer_per_nanosecond][angstrom_per_picosecond] = to_si*conv[meter_per_second][angstrom_per_picosecond]; + conv[nanometer_per_nanosecond][centimeter_per_second] = to_si*conv[meter_per_second][centimeter_per_second]; + conv[nanometer_per_nanosecond][bohr_per_atu] = to_si*conv[meter_per_second][bohr_per_atu]; + conv[nanometer_per_nanosecond][micrometer_per_microsecond] = to_si*conv[meter_per_second][micrometer_per_microsecond]; + conv[nanometer_per_nanosecond][nanometer_per_nanosecond] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Force conversion +double get_force_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[newton][newton] = 1.0; + conv[newton][kcal_per_mole_angstrom] = 1.0/kcal_per_mole_angstrom_si; + conv[newton][ev_per_angstrom] = 1.0/ev_per_angstrom_si; + conv[newton][dyne] = 1.0/dyne_si; + conv[newton][hartree_per_bohr] = 1.0/hartree_per_bohr_si; + conv[newton][picogram_micrometer_per_microsecondsq] = 1.0/picogram_micrometer_per_microsecondsq_si; + conv[newton][attogram_nanometer_per_nanosecondsq] = 1.0/attogram_nanometer_per_nanosecondsq_si; + + to_si = 1.0/conv[newton][kcal_per_mole_angstrom]; + conv[kcal_per_mole_angstrom][newton] = to_si*conv[newton][newton]; + conv[kcal_per_mole_angstrom][kcal_per_mole_angstrom] = 1.0; + conv[kcal_per_mole_angstrom][ev_per_angstrom] = to_si*conv[newton][ev_per_angstrom]; + conv[kcal_per_mole_angstrom][dyne] = to_si*conv[newton][dyne]; + conv[kcal_per_mole_angstrom][hartree_per_bohr] = to_si*conv[newton][hartree_per_bohr]; + conv[kcal_per_mole_angstrom][picogram_micrometer_per_microsecondsq] = to_si*conv[newton][picogram_micrometer_per_microsecondsq]; + conv[kcal_per_mole_angstrom][attogram_nanometer_per_nanosecondsq] = to_si*conv[newton][attogram_nanometer_per_nanosecondsq]; + + to_si = 1.0/conv[newton][ev_per_angstrom]; + conv[ev_per_angstrom][newton] = to_si*conv[newton][newton]; + conv[ev_per_angstrom][kcal_per_mole_angstrom] = to_si*conv[newton][kcal_per_mole_angstrom]; + conv[ev_per_angstrom][ev_per_angstrom] = 1.0; + conv[ev_per_angstrom][dyne] = to_si*conv[newton][dyne]; + conv[ev_per_angstrom][hartree_per_bohr] = to_si*conv[newton][hartree_per_bohr]; + conv[ev_per_angstrom][picogram_micrometer_per_microsecondsq] = to_si*conv[newton][picogram_micrometer_per_microsecondsq]; + conv[ev_per_angstrom][attogram_nanometer_per_nanosecondsq] = to_si*conv[newton][attogram_nanometer_per_nanosecondsq]; + + to_si = 1.0/conv[newton][dyne]; + conv[dyne][newton] = to_si*conv[newton][newton]; + conv[dyne][kcal_per_mole_angstrom] = to_si*conv[newton][kcal_per_mole_angstrom]; + conv[dyne][ev_per_angstrom] = to_si*conv[newton][ev_per_angstrom]; + conv[dyne][dyne] = 1.0; + conv[dyne][hartree_per_bohr] = to_si*conv[newton][hartree_per_bohr]; + conv[dyne][picogram_micrometer_per_microsecondsq] = to_si*conv[newton][picogram_micrometer_per_microsecondsq]; + conv[dyne][attogram_nanometer_per_nanosecondsq] = to_si*conv[newton][attogram_nanometer_per_nanosecondsq]; + + to_si = 1.0/conv[newton][hartree_per_bohr]; + conv[hartree_per_bohr][newton] = to_si*conv[newton][newton]; + conv[hartree_per_bohr][kcal_per_mole_angstrom] = to_si*conv[newton][kcal_per_mole_angstrom]; + conv[hartree_per_bohr][ev_per_angstrom] = to_si*conv[newton][ev_per_angstrom]; + conv[hartree_per_bohr][dyne] = to_si*conv[newton][dyne]; + conv[hartree_per_bohr][hartree_per_bohr] = 1.0; + conv[hartree_per_bohr][picogram_micrometer_per_microsecondsq] = to_si*conv[newton][picogram_micrometer_per_microsecondsq]; + conv[hartree_per_bohr][attogram_nanometer_per_nanosecondsq] = to_si*conv[newton][attogram_nanometer_per_nanosecondsq]; + + to_si = 1.0/conv[newton][picogram_micrometer_per_microsecondsq]; + conv[picogram_micrometer_per_microsecondsq][newton] = to_si*conv[newton][newton]; + conv[picogram_micrometer_per_microsecondsq][kcal_per_mole_angstrom] = to_si*conv[newton][kcal_per_mole_angstrom]; + conv[picogram_micrometer_per_microsecondsq][ev_per_angstrom] = to_si*conv[newton][ev_per_angstrom]; + conv[picogram_micrometer_per_microsecondsq][dyne] = to_si*conv[newton][dyne]; + conv[picogram_micrometer_per_microsecondsq][hartree_per_bohr] = to_si*conv[newton][hartree_per_bohr]; + conv[picogram_micrometer_per_microsecondsq][picogram_micrometer_per_microsecondsq] = 1.0; + conv[picogram_micrometer_per_microsecondsq][attogram_nanometer_per_nanosecondsq] = to_si*conv[newton][attogram_nanometer_per_nanosecondsq]; + + to_si = 1.0/conv[newton][attogram_nanometer_per_nanosecondsq]; + conv[attogram_nanometer_per_nanosecondsq][newton] = to_si*conv[newton][newton]; + conv[attogram_nanometer_per_nanosecondsq][kcal_per_mole_angstrom] = to_si*conv[newton][kcal_per_mole_angstrom]; + conv[attogram_nanometer_per_nanosecondsq][ev_per_angstrom] = to_si*conv[newton][ev_per_angstrom]; + conv[attogram_nanometer_per_nanosecondsq][dyne] = to_si*conv[newton][dyne]; + conv[attogram_nanometer_per_nanosecondsq][hartree_per_bohr] = to_si*conv[newton][hartree_per_bohr]; + conv[attogram_nanometer_per_nanosecondsq][picogram_micrometer_per_microsecondsq] = to_si*conv[newton][picogram_micrometer_per_microsecondsq]; + conv[attogram_nanometer_per_nanosecondsq][attogram_nanometer_per_nanosecondsq] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Torque conversion +double get_torque_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[newton_meter][newton_meter] = 1.0; + conv[newton_meter][kcal_per_mole] = 1.0/kcal_per_mole_si; + conv[newton_meter][ev] = 1.0/ev_si; + conv[newton_meter][dyne_centimeter] = 1.0/dyne_centimeter_si; + conv[newton_meter][hartree] = 1.0/hartree_si; + conv[newton_meter][picogram_micrometersq_per_microsecondsq] = 1.0/picogram_micrometersq_per_microsecondsq_si; + conv[newton_meter][attogram_nanometersq_per_nanosecondsq] = 1.0/attogram_nanometersq_per_nanosecondsq_si; + + to_si = 1.0/conv[newton_meter][kcal_per_mole]; + conv[kcal_per_mole][newton_meter] = to_si*conv[newton_meter][newton_meter]; + conv[kcal_per_mole][kcal_per_mole] = 1.0; + conv[kcal_per_mole][ev] = to_si*conv[newton_meter][ev]; + conv[kcal_per_mole][dyne_centimeter] = to_si*conv[newton_meter][dyne_centimeter]; + conv[kcal_per_mole][hartree] = to_si*conv[newton_meter][hartree]; + conv[kcal_per_mole][picogram_micrometersq_per_microsecondsq] = to_si*conv[newton_meter][picogram_micrometersq_per_microsecondsq]; + conv[kcal_per_mole][attogram_nanometersq_per_nanosecondsq] = to_si*conv[newton_meter][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[newton_meter][ev]; + conv[ev][newton_meter] = to_si*conv[newton_meter][newton_meter]; + conv[ev][kcal_per_mole] = to_si*conv[newton_meter][kcal_per_mole]; + conv[ev][ev] = 1.0; + conv[ev][dyne_centimeter] = to_si*conv[newton_meter][dyne_centimeter]; + conv[ev][hartree] = to_si*conv[newton_meter][hartree]; + conv[ev][picogram_micrometersq_per_microsecondsq] = to_si*conv[newton_meter][picogram_micrometersq_per_microsecondsq]; + conv[ev][attogram_nanometersq_per_nanosecondsq] = to_si*conv[newton_meter][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[newton_meter][dyne_centimeter]; + conv[dyne_centimeter][newton_meter] = to_si*conv[newton_meter][newton_meter]; + conv[dyne_centimeter][kcal_per_mole] = to_si*conv[newton_meter][kcal_per_mole]; + conv[dyne_centimeter][ev] = to_si*conv[newton_meter][ev]; + conv[dyne_centimeter][dyne_centimeter] = 1.0; + conv[dyne_centimeter][hartree] = to_si*conv[newton_meter][hartree]; + conv[dyne_centimeter][picogram_micrometersq_per_microsecondsq] = to_si*conv[newton_meter][picogram_micrometersq_per_microsecondsq]; + conv[dyne_centimeter][attogram_nanometersq_per_nanosecondsq] = to_si*conv[newton_meter][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[newton_meter][hartree]; + conv[hartree][newton_meter] = to_si*conv[newton_meter][newton_meter]; + conv[hartree][kcal_per_mole] = to_si*conv[newton_meter][kcal_per_mole]; + conv[hartree][ev] = to_si*conv[newton_meter][ev]; + conv[hartree][dyne_centimeter] = to_si*conv[newton_meter][dyne_centimeter]; + conv[hartree][hartree] = 1.0; + conv[hartree][picogram_micrometersq_per_microsecondsq] = to_si*conv[newton_meter][picogram_micrometersq_per_microsecondsq]; + conv[hartree][attogram_nanometersq_per_nanosecondsq] = to_si*conv[newton_meter][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[newton_meter][picogram_micrometersq_per_microsecondsq]; + conv[picogram_micrometersq_per_microsecondsq][newton_meter] = to_si*conv[newton_meter][newton_meter]; + conv[picogram_micrometersq_per_microsecondsq][kcal_per_mole] = to_si*conv[newton_meter][kcal_per_mole]; + conv[picogram_micrometersq_per_microsecondsq][ev] = to_si*conv[newton_meter][ev]; + conv[picogram_micrometersq_per_microsecondsq][dyne_centimeter] = to_si*conv[newton_meter][dyne_centimeter]; + conv[picogram_micrometersq_per_microsecondsq][hartree] = to_si*conv[newton_meter][hartree]; + conv[picogram_micrometersq_per_microsecondsq][picogram_micrometersq_per_microsecondsq] = 1.0; + conv[picogram_micrometersq_per_microsecondsq][attogram_nanometersq_per_nanosecondsq] = to_si*conv[newton_meter][attogram_nanometersq_per_nanosecondsq]; + + to_si = 1.0/conv[newton_meter][attogram_nanometersq_per_nanosecondsq]; + conv[attogram_nanometersq_per_nanosecondsq][newton_meter] = to_si*conv[newton_meter][newton_meter]; + conv[attogram_nanometersq_per_nanosecondsq][kcal_per_mole] = to_si*conv[newton_meter][kcal_per_mole]; + conv[attogram_nanometersq_per_nanosecondsq][ev] = to_si*conv[newton_meter][ev]; + conv[attogram_nanometersq_per_nanosecondsq][dyne_centimeter] = to_si*conv[newton_meter][dyne_centimeter]; + conv[attogram_nanometersq_per_nanosecondsq][hartree] = to_si*conv[newton_meter][hartree]; + conv[attogram_nanometersq_per_nanosecondsq][picogram_micrometersq_per_microsecondsq] = to_si*conv[newton_meter][picogram_micrometersq_per_microsecondsq]; + conv[attogram_nanometersq_per_nanosecondsq][attogram_nanometersq_per_nanosecondsq] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Temperature conversion +double get_temperature_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[kelvin][kelvin] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Pressure conversion +double get_pressure_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[pascal][pascal] = 1.0; + conv[pascal][atmosphere] = 1.0/atmosphere_si; + conv[pascal][bar] = 1.0/bar_si; + conv[pascal][dyne_per_centimetersq] = 1.0/dyne_per_centimetersq_si; + conv[pascal][picogram_per_micrometer_microsecondsq] = 1.0/picogram_per_micrometer_microsecondsq_si; + conv[pascal][attogram_per_nanometer_nanosecondsq] = 1.0/attogram_per_nanometer_nanosecondsq_si; + + to_si = 1.0/conv[pascal][atmosphere]; + conv[atmosphere][pascal] = to_si*conv[pascal][pascal]; + conv[atmosphere][atmosphere] = 1.0; + conv[atmosphere][bar] = to_si*conv[pascal][bar]; + conv[atmosphere][dyne_per_centimetersq] = to_si*conv[pascal][dyne_per_centimetersq]; + conv[atmosphere][picogram_per_micrometer_microsecondsq] = to_si*conv[pascal][picogram_per_micrometer_microsecondsq]; + conv[atmosphere][attogram_per_nanometer_nanosecondsq] = to_si*conv[pascal][attogram_per_nanometer_nanosecondsq]; + + to_si = 1.0/conv[pascal][bar]; + conv[bar][pascal] = to_si*conv[pascal][pascal]; + conv[bar][atmosphere] = to_si*conv[pascal][atmosphere]; + conv[bar][bar] = 1.0; + conv[bar][dyne_per_centimetersq] = to_si*conv[pascal][dyne_per_centimetersq]; + conv[bar][picogram_per_micrometer_microsecondsq] = to_si*conv[pascal][picogram_per_micrometer_microsecondsq]; + conv[bar][attogram_per_nanometer_nanosecondsq] = to_si*conv[pascal][attogram_per_nanometer_nanosecondsq]; + + to_si = 1.0/conv[pascal][dyne_per_centimetersq]; + conv[dyne_per_centimetersq][pascal] = to_si*conv[pascal][pascal]; + conv[dyne_per_centimetersq][atmosphere] = to_si*conv[pascal][atmosphere]; + conv[dyne_per_centimetersq][bar] = to_si*conv[pascal][bar]; + conv[dyne_per_centimetersq][dyne_per_centimetersq] = 1.0; + conv[dyne_per_centimetersq][picogram_per_micrometer_microsecondsq] = to_si*conv[pascal][picogram_per_micrometer_microsecondsq]; + conv[dyne_per_centimetersq][attogram_per_nanometer_nanosecondsq] = to_si*conv[pascal][attogram_per_nanometer_nanosecondsq]; + + to_si = 1.0/conv[pascal][picogram_per_micrometer_microsecondsq]; + conv[picogram_per_micrometer_microsecondsq][pascal] = to_si*conv[pascal][pascal]; + conv[picogram_per_micrometer_microsecondsq][atmosphere] = to_si*conv[pascal][atmosphere]; + conv[picogram_per_micrometer_microsecondsq][bar] = to_si*conv[pascal][bar]; + conv[picogram_per_micrometer_microsecondsq][dyne_per_centimetersq] = to_si*conv[pascal][dyne_per_centimetersq]; + conv[picogram_per_micrometer_microsecondsq][picogram_per_micrometer_microsecondsq] = 1.0; + conv[picogram_per_micrometer_microsecondsq][attogram_per_nanometer_nanosecondsq] = to_si*conv[pascal][attogram_per_nanometer_nanosecondsq]; + + to_si = 1.0/conv[pascal][attogram_per_nanometer_nanosecondsq]; + conv[attogram_per_nanometer_nanosecondsq][pascal] = to_si*conv[pascal][pascal]; + conv[attogram_per_nanometer_nanosecondsq][atmosphere] = to_si*conv[pascal][atmosphere]; + conv[attogram_per_nanometer_nanosecondsq][bar] = to_si*conv[pascal][bar]; + conv[attogram_per_nanometer_nanosecondsq][dyne_per_centimetersq] = to_si*conv[pascal][dyne_per_centimetersq]; + conv[attogram_per_nanometer_nanosecondsq][picogram_per_micrometer_microsecondsq] = to_si*conv[pascal][picogram_per_micrometer_microsecondsq]; + conv[attogram_per_nanometer_nanosecondsq][attogram_per_nanometer_nanosecondsq] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Viscosity conversion +double get_viscosity_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[pascal_second][pascal_second] = 1.0; + conv[pascal_second][poise] = 1.0/poise_si; + conv[pascal_second][amu_per_bohr_femtosecond] = 1.0/amu_per_bohr_femtosecond_si; + conv[pascal_second][picogram_per_micrometer_microsecond] = 1.0/picogram_per_micrometer_microsecond_si; + conv[pascal_second][attogram_per_nanometer_nanosecond] = 1.0/attogram_per_nanometer_nanosecond_si; + + to_si = 1.0/conv[pascal_second][poise]; + conv[poise][pascal_second] = to_si*conv[pascal_second][pascal_second]; + conv[poise][poise] = 1.0; + conv[poise][amu_per_bohr_femtosecond] = to_si*conv[pascal_second][amu_per_bohr_femtosecond]; + conv[poise][picogram_per_micrometer_microsecond] = to_si*conv[pascal_second][picogram_per_micrometer_microsecond]; + conv[poise][attogram_per_nanometer_nanosecond] = to_si*conv[pascal_second][attogram_per_nanometer_nanosecond]; + + to_si = 1.0/conv[pascal_second][amu_per_bohr_femtosecond]; + conv[amu_per_bohr_femtosecond][pascal_second] = to_si*conv[pascal_second][pascal_second]; + conv[amu_per_bohr_femtosecond][poise] = to_si*conv[pascal_second][poise]; + conv[amu_per_bohr_femtosecond][amu_per_bohr_femtosecond] = 1.0; + conv[amu_per_bohr_femtosecond][picogram_per_micrometer_microsecond] = to_si*conv[pascal_second][picogram_per_micrometer_microsecond]; + conv[amu_per_bohr_femtosecond][attogram_per_nanometer_nanosecond] = to_si*conv[pascal_second][attogram_per_nanometer_nanosecond]; + + to_si = 1.0/conv[pascal_second][picogram_per_micrometer_microsecond]; + conv[picogram_per_micrometer_microsecond][pascal_second] = to_si*conv[pascal_second][pascal_second]; + conv[picogram_per_micrometer_microsecond][poise] = to_si*conv[pascal_second][poise]; + conv[picogram_per_micrometer_microsecond][amu_per_bohr_femtosecond] = to_si*conv[pascal_second][amu_per_bohr_femtosecond]; + conv[picogram_per_micrometer_microsecond][picogram_per_micrometer_microsecond] = 1.0; + conv[picogram_per_micrometer_microsecond][attogram_per_nanometer_nanosecond] = to_si*conv[pascal_second][attogram_per_nanometer_nanosecond]; + + to_si = 1.0/conv[pascal_second][attogram_per_nanometer_nanosecond]; + conv[attogram_per_nanometer_nanosecond][pascal_second] = to_si*conv[pascal_second][pascal_second]; + conv[attogram_per_nanometer_nanosecond][poise] = to_si*conv[pascal_second][poise]; + conv[attogram_per_nanometer_nanosecond][amu_per_bohr_femtosecond] = to_si*conv[pascal_second][amu_per_bohr_femtosecond]; + conv[attogram_per_nanometer_nanosecond][picogram_per_micrometer_microsecond] = to_si*conv[pascal_second][picogram_per_micrometer_microsecond]; + conv[attogram_per_nanometer_nanosecond][attogram_per_nanometer_nanosecond] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Charge conversion +double get_charge_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[coulomb][coulomb] = 1.0; + conv[coulomb][echarge] = 1.0/echarge_si; + conv[coulomb][statcoulomb] = 1.0/statcoulomb_si; + conv[coulomb][picocoulomb] = 1.0/picocoulomb_si; + + to_si = 1.0/conv[coulomb][echarge]; + conv[echarge][coulomb] = to_si*conv[coulomb][coulomb]; + conv[echarge][echarge] = 1.0; + conv[echarge][statcoulomb] = to_si*conv[coulomb][statcoulomb]; + conv[echarge][picocoulomb] = to_si*conv[coulomb][picocoulomb]; + + to_si = 1.0/conv[coulomb][statcoulomb]; + conv[statcoulomb][coulomb] = to_si*conv[coulomb][coulomb]; + conv[statcoulomb][echarge] = to_si*conv[coulomb][echarge]; + conv[statcoulomb][statcoulomb] = 1.0; + conv[statcoulomb][picocoulomb] = to_si*conv[coulomb][picocoulomb]; + + to_si = 1.0/conv[coulomb][picocoulomb]; + conv[picocoulomb][coulomb] = to_si*conv[coulomb][coulomb]; + conv[picocoulomb][echarge] = to_si*conv[coulomb][echarge]; + conv[picocoulomb][statcoulomb] = to_si*conv[coulomb][statcoulomb]; + conv[picocoulomb][picocoulomb] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Dipole conversion +double get_dipole_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[coulomb_meter][coulomb_meter] = 1.0; + conv[coulomb_meter][electron_angstrom] = 1.0/electron_angstrom_si; + conv[coulomb_meter][statcoulomb_centimeter] = 1.0/statcoulomb_centimeter_si; + conv[coulomb_meter][debye] = 1.0/debye_si; + conv[coulomb_meter][picocoulomb_micrometer] = 1.0/picocoulomb_micrometer_si; + conv[coulomb_meter][electron_nanometer] = 1.0/electron_nanometer_si; + + to_si = 1.0/conv[coulomb_meter][electron_angstrom]; + conv[electron_angstrom][coulomb_meter] = to_si*conv[coulomb_meter][coulomb_meter]; + conv[electron_angstrom][electron_angstrom] = 1.0; + conv[electron_angstrom][statcoulomb_centimeter] = to_si*conv[coulomb_meter][statcoulomb_centimeter]; + conv[electron_angstrom][debye] = to_si*conv[coulomb_meter][debye]; + conv[electron_angstrom][picocoulomb_micrometer] = to_si*conv[coulomb_meter][picocoulomb_micrometer]; + conv[electron_angstrom][electron_nanometer] = to_si*conv[coulomb_meter][electron_nanometer]; + + to_si = 1.0/conv[coulomb_meter][statcoulomb_centimeter]; + conv[statcoulomb_centimeter][coulomb_meter] = to_si*conv[coulomb_meter][coulomb_meter]; + conv[statcoulomb_centimeter][electron_angstrom] = to_si*conv[coulomb_meter][electron_angstrom]; + conv[statcoulomb_centimeter][statcoulomb_centimeter] = 1.0; + conv[statcoulomb_centimeter][debye] = to_si*conv[coulomb_meter][debye]; + conv[statcoulomb_centimeter][picocoulomb_micrometer] = to_si*conv[coulomb_meter][picocoulomb_micrometer]; + conv[statcoulomb_centimeter][electron_nanometer] = to_si*conv[coulomb_meter][electron_nanometer]; + + to_si = 1.0/conv[coulomb_meter][debye]; + conv[debye][coulomb_meter] = to_si*conv[coulomb_meter][coulomb_meter]; + conv[debye][electron_angstrom] = to_si*conv[coulomb_meter][electron_angstrom]; + conv[debye][statcoulomb_centimeter] = to_si*conv[coulomb_meter][statcoulomb_centimeter]; + conv[debye][debye] = 1.0; + conv[debye][picocoulomb_micrometer] = to_si*conv[coulomb_meter][picocoulomb_micrometer]; + conv[debye][electron_nanometer] = to_si*conv[coulomb_meter][electron_nanometer]; + + to_si = 1.0/conv[coulomb_meter][picocoulomb_micrometer]; + conv[picocoulomb_micrometer][coulomb_meter] = to_si*conv[coulomb_meter][coulomb_meter]; + conv[picocoulomb_micrometer][electron_angstrom] = to_si*conv[coulomb_meter][electron_angstrom]; + conv[picocoulomb_micrometer][statcoulomb_centimeter] = to_si*conv[coulomb_meter][statcoulomb_centimeter]; + conv[picocoulomb_micrometer][debye] = to_si*conv[coulomb_meter][debye]; + conv[picocoulomb_micrometer][picocoulomb_micrometer] = 1.0; + conv[picocoulomb_micrometer][electron_nanometer] = to_si*conv[coulomb_meter][electron_nanometer]; + + to_si = 1.0/conv[coulomb_meter][electron_nanometer]; + conv[electron_nanometer][coulomb_meter] = to_si*conv[coulomb_meter][coulomb_meter]; + conv[electron_nanometer][electron_angstrom] = to_si*conv[coulomb_meter][electron_angstrom]; + conv[electron_nanometer][statcoulomb_centimeter] = to_si*conv[coulomb_meter][statcoulomb_centimeter]; + conv[electron_nanometer][debye] = to_si*conv[coulomb_meter][debye]; + conv[electron_nanometer][picocoulomb_micrometer] = to_si*conv[coulomb_meter][picocoulomb_micrometer]; + conv[electron_nanometer][electron_nanometer] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Electric field conversion +double get_efield_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[volt_per_meter][volt_per_meter] = 1.0; + conv[volt_per_meter][volt_per_angstrom] = 1.0/volt_per_angstrom_si; + conv[volt_per_meter][statvolt_per_centimeter] = 1.0/statvolt_per_centimeter_si; + conv[volt_per_meter][volt_per_centimeter] = 1.0/volt_per_centimeter_si; + conv[volt_per_meter][volt_per_micrometer] = 1.0/volt_per_micrometer_si; + conv[volt_per_meter][volt_per_nanometer] = 1.0/volt_per_nanometer_si; + + to_si = 1.0/conv[volt_per_meter][volt_per_angstrom]; + conv[volt_per_angstrom][volt_per_meter] = to_si*conv[volt_per_meter][volt_per_meter]; + conv[volt_per_angstrom][volt_per_angstrom] = 1.0; + conv[volt_per_angstrom][statvolt_per_centimeter] = to_si*conv[volt_per_meter][statvolt_per_centimeter]; + conv[volt_per_angstrom][volt_per_centimeter] = to_si*conv[volt_per_meter][volt_per_centimeter]; + conv[volt_per_angstrom][volt_per_micrometer] = to_si*conv[volt_per_meter][volt_per_micrometer]; + conv[volt_per_angstrom][volt_per_nanometer] = to_si*conv[volt_per_meter][volt_per_nanometer]; + + to_si = 1.0/conv[volt_per_meter][statvolt_per_centimeter]; + conv[statvolt_per_centimeter][volt_per_meter] = to_si*conv[volt_per_meter][volt_per_meter]; + conv[statvolt_per_centimeter][volt_per_angstrom] = to_si*conv[volt_per_meter][volt_per_angstrom]; + conv[statvolt_per_centimeter][statvolt_per_centimeter] = 1.0; + conv[statvolt_per_centimeter][volt_per_centimeter] = to_si*conv[volt_per_meter][volt_per_centimeter]; + conv[statvolt_per_centimeter][volt_per_micrometer] = to_si*conv[volt_per_meter][volt_per_micrometer]; + conv[statvolt_per_centimeter][volt_per_nanometer] = to_si*conv[volt_per_meter][volt_per_nanometer]; + + to_si = 1.0/conv[volt_per_meter][volt_per_centimeter]; + conv[volt_per_centimeter][volt_per_meter] = to_si*conv[volt_per_meter][volt_per_meter]; + conv[volt_per_centimeter][volt_per_angstrom] = to_si*conv[volt_per_meter][volt_per_angstrom]; + conv[volt_per_centimeter][statvolt_per_centimeter] = to_si*conv[volt_per_meter][statvolt_per_centimeter]; + conv[volt_per_centimeter][volt_per_centimeter] = 1.0; + conv[volt_per_centimeter][volt_per_micrometer] = to_si*conv[volt_per_meter][volt_per_micrometer]; + conv[volt_per_centimeter][volt_per_nanometer] = to_si*conv[volt_per_meter][volt_per_nanometer]; + + to_si = 1.0/conv[volt_per_meter][volt_per_micrometer]; + conv[volt_per_micrometer][volt_per_meter] = to_si*conv[volt_per_meter][volt_per_meter]; + conv[volt_per_micrometer][volt_per_angstrom] = to_si*conv[volt_per_meter][volt_per_angstrom]; + conv[volt_per_micrometer][statvolt_per_centimeter] = to_si*conv[volt_per_meter][statvolt_per_centimeter]; + conv[volt_per_micrometer][volt_per_centimeter] = to_si*conv[volt_per_meter][volt_per_centimeter]; + conv[volt_per_micrometer][volt_per_micrometer] = 1.0; + conv[volt_per_micrometer][volt_per_nanometer] = to_si*conv[volt_per_meter][volt_per_nanometer]; + + to_si = 1.0/conv[volt_per_meter][volt_per_nanometer]; + conv[volt_per_nanometer][volt_per_meter] = to_si*conv[volt_per_meter][volt_per_meter]; + conv[volt_per_nanometer][volt_per_angstrom] = to_si*conv[volt_per_meter][volt_per_angstrom]; + conv[volt_per_nanometer][statvolt_per_centimeter] = to_si*conv[volt_per_meter][statvolt_per_centimeter]; + conv[volt_per_nanometer][volt_per_centimeter] = to_si*conv[volt_per_meter][volt_per_centimeter]; + conv[volt_per_nanometer][volt_per_micrometer] = to_si*conv[volt_per_meter][volt_per_micrometer]; + conv[volt_per_nanometer][volt_per_nanometer] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// Demsity conversion +double get_density_conversion_factor(units from_unit_enum, units to_unit_enum) +{ + map > conv; + double to_si; + + conv[kilogram_per_metercu][kilogram_per_metercu] = 1.0; + conv[kilogram_per_metercu][gram_per_centimetercu] = 1.0/gram_per_centimetercu_si; + conv[kilogram_per_metercu][amu_per_bohrcu] = 1.0/amu_per_bohrcu_si; + conv[kilogram_per_metercu][picogram_per_micrometercu] = 1.0/picogram_per_micrometercu_si; + conv[kilogram_per_metercu][attogram_per_nanometercu] = 1.0/attogram_per_nanometercu_si; + + to_si = 1.0/conv[kilogram_per_metercu][gram_per_centimetercu]; + conv[gram_per_centimetercu][kilogram_per_metercu] = to_si*conv[kilogram_per_metercu][kilogram_per_metercu]; + conv[gram_per_centimetercu][gram_per_centimetercu] = 1.0; + conv[gram_per_centimetercu][amu_per_bohrcu] = to_si*conv[kilogram_per_metercu][amu_per_bohrcu]; + conv[gram_per_centimetercu][picogram_per_micrometercu] = to_si*conv[kilogram_per_metercu][picogram_per_micrometercu]; + conv[gram_per_centimetercu][attogram_per_nanometercu] = to_si*conv[kilogram_per_metercu][attogram_per_nanometercu]; + + to_si = 1.0/conv[kilogram_per_metercu][amu_per_bohrcu]; + conv[amu_per_bohrcu][kilogram_per_metercu] = to_si*conv[kilogram_per_metercu][kilogram_per_metercu]; + conv[amu_per_bohrcu][gram_per_centimetercu] = to_si*conv[kilogram_per_metercu][gram_per_centimetercu]; + conv[amu_per_bohrcu][amu_per_bohrcu] = 1.0; + conv[amu_per_bohrcu][picogram_per_micrometercu] = to_si*conv[kilogram_per_metercu][picogram_per_micrometercu]; + conv[amu_per_bohrcu][attogram_per_nanometercu] = to_si*conv[kilogram_per_metercu][attogram_per_nanometercu]; + + to_si = 1.0/conv[kilogram_per_metercu][picogram_per_micrometercu]; + conv[picogram_per_micrometercu][kilogram_per_metercu] = to_si*conv[kilogram_per_metercu][kilogram_per_metercu]; + conv[picogram_per_micrometercu][gram_per_centimetercu] = to_si*conv[kilogram_per_metercu][gram_per_centimetercu]; + conv[picogram_per_micrometercu][amu_per_bohrcu] = to_si*conv[kilogram_per_metercu][amu_per_bohrcu]; + conv[picogram_per_micrometercu][picogram_per_micrometercu] = 1.0; + conv[picogram_per_micrometercu][attogram_per_nanometercu] = to_si*conv[kilogram_per_metercu][attogram_per_nanometercu]; + + to_si = 1.0/conv[kilogram_per_metercu][attogram_per_nanometercu]; + conv[attogram_per_nanometercu][kilogram_per_metercu] = to_si*conv[kilogram_per_metercu][kilogram_per_metercu]; + conv[attogram_per_nanometercu][gram_per_centimetercu] = to_si*conv[kilogram_per_metercu][gram_per_centimetercu]; + conv[attogram_per_nanometercu][amu_per_bohrcu] = to_si*conv[kilogram_per_metercu][amu_per_bohrcu]; + conv[attogram_per_nanometercu][picogram_per_micrometercu] = to_si*conv[kilogram_per_metercu][picogram_per_micrometercu]; + conv[attogram_per_nanometercu][attogram_per_nanometercu] = 1.0; + + return conv[from_unit_enum][to_unit_enum]; +} + +/* ---------------------------------------------------------------------- */ + +// This routine returns the unit conversion factor between the +// `from_system_enum` to the `to_system_enum` for the `unit_type_enum`. +double get_unit_conversion_factor(unit_type &unit_type_enum, + sys_type from_system_enum, + sys_type to_system_enum) +{ + units from_unit = get_lammps_system_unit(from_system_enum, unit_type_enum); + units to_unit = get_lammps_system_unit(to_system_enum, unit_type_enum); + switch(unit_type_enum) { + case mass : + return get_mass_conversion_factor(from_unit, to_unit); + case distance : + return get_distance_conversion_factor(from_unit, to_unit); + case time : + return get_time_conversion_factor(from_unit, to_unit); + case energy : + return get_energy_conversion_factor(from_unit, to_unit); + case velocity : + return get_velocity_conversion_factor(from_unit, to_unit); + case force : + return get_force_conversion_factor(from_unit, to_unit); + case torque : + return get_torque_conversion_factor(from_unit, to_unit); + case temperature : + return get_temperature_conversion_factor(from_unit, to_unit); + case pressure : + return get_pressure_conversion_factor(from_unit, to_unit); + case viscosity : + return get_viscosity_conversion_factor(from_unit, to_unit); + case charge : + return get_charge_conversion_factor(from_unit, to_unit); + case dipole : + return get_dipole_conversion_factor(from_unit, to_unit); + case efield : + return get_efield_conversion_factor(from_unit, to_unit); + case density : + default : // This is here to a prevent a compiler warning + return get_density_conversion_factor(from_unit, to_unit); + } +} + +} // end of anonymous name space + +/* ---------------------------------------------------------------------- */ + +// Wrapper to the routine that gets the unit conversion. Translates strings +// to enumerations and then call get_unit_conversion_factor() +int lammps_unit_conversion(string const &unit_type_str, + string const &from_system_str, + string const &to_system_str, + double &conversion_factor) +{ + // initialize + conversion_factor = 0.0; + initialize_dictionaries(); + + // convert input to enumeration + unit_type unit_type_enum; + { + map::const_iterator itr = unit_dic.find(unit_type_str); + if (itr != unit_dic.end()) unit_type_enum = itr->second; + else return 1; // error + } + sys_type from_system_enum; + { + map::const_iterator + itr = system_dic.find(from_system_str); + if (itr != system_dic.end()) from_system_enum = itr->second; + else return 1; // error + } + sys_type to_system_enum; + { + map::const_iterator + itr = system_dic.find(to_system_str); + if (itr != system_dic.end()) to_system_enum = itr->second; + else return 1; + } + + // process unit conversions + conversion_factor = get_unit_conversion_factor(unit_type_enum, + from_system_enum, + to_system_enum); + return 0; +} + + diff --git a/src/KIM/kim_units.h b/src/KIM/kim_units.h new file mode 100644 index 0000000000..97e81a6222 --- /dev/null +++ b/src/KIM/kim_units.h @@ -0,0 +1,59 @@ +/* -*- c++ -*- ---------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Ellad B. Tadmor (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.0.2 (and newer) package +------------------------------------------------------------------------- */ + +int lammps_unit_conversion(std::string const &unit_type_str, + std::string const &from_system_str, + std::string const &to_system_str, + double &conversion_factor); -- GitLab From dbfd1fd0e739aa9ff263fe5e6d88f73d44d2569d Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Fri, 21 Jun 2019 22:11:58 -0500 Subject: [PATCH 035/236] Added atom-type-num-list mapping to kim_style --- src/KIM/kim_style.cpp | 156 +++++++++++++++++++++++++++++++++++++++--- src/KIM/kim_style.h | 5 +- 2 files changed, 149 insertions(+), 12 deletions(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index 44d5c411ab..161bc31643 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -77,6 +77,10 @@ extern "C" { #include "KIM_SimulatorModel.hpp" //@@@@@ +#define SNUM(x) \ + static_cast(std::ostringstream() \ + << std::dec << x).str() + using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -257,7 +261,7 @@ void KimStyle::determine_model_type_and_units(char * model_name, if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) { std::stringstream mesg; - mesg << "Incompatible units for KIM Simulator Model, required units = " + mesg << "Incompatible units for KIM Simulator Model, required units = " << *model_units; error->all(FLERR,mesg.str().c_str()); } @@ -357,18 +361,18 @@ void KimStyle::do_init(char *model_name, char *user_units, char* model_units) /* ---------------------------------------------------------------------- */ -void KimStyle::kim_style_log_delimiter(std::string begin_end, - std::string model_setup) +void KimStyle::kim_style_log_delimiter(std::string const begin_end, + std::string const model_setup) const { if (comm->me == 0) { std::string mesg; - if ((begin_end == "begin") && (model_setup == "model")) mesg = + if ((begin_end == "begin") && (model_setup == "model")) mesg = "#=== BEGIN kim-style MODEL ==================================\n"; - else if ((begin_end == "begin") && (model_setup == "setup")) mesg = + else if ((begin_end == "begin") && (model_setup == "setup")) mesg = "#=== BEGIN kim-style SETUP ==================================\n"; - else if ((begin_end == "end") && (model_setup == "model")) mesg = + else if ((begin_end == "end") && (model_setup == "model")) mesg = "#=== END kim-style MODEL ====================================\n\n"; - else if ((begin_end == "end") && (model_setup == "setup")) mesg = + else if ((begin_end == "end") && (model_setup == "setup")) mesg = "#=== END kim-style SETUP ====================================\n\n"; if (screen) fputs(mesg.c_str(),screen); @@ -403,12 +407,19 @@ void KimStyle::do_setup(int narg, char **arg) if (simulatorModel) { + std::string delimiter(""); std::string atom_type_sym_list; + std::string atom_type_num_list; for (int i = 0; i < narg; i++) - atom_type_sym_list += std::string(" ") + arg[i]; + { + atom_type_sym_list += delimiter + arg[i]; + atom_type_num_list += delimiter + SNUM(species_to_atomic_no(arg[i])); + delimiter = " "; + } simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); + simulatorModel->AddTemplateMap("atom-type-num-list",atom_type_num_list); simulatorModel->CloseTemplateMap(); int len = strlen(atom_type_sym_list.c_str())+1; @@ -533,10 +544,10 @@ void KimStyle::do_variables(char *user_units, char *model_units) (char *)"dipole", (char *)"efield", (char *)"density"}; - + if (comm->me == 0) { std::stringstream mesg; - mesg << "# Conversion factors from " << from << " to " << to + mesg << "# Conversion factors from " << from << " to " << to << ":" << std::endl; if (screen) fputs(mesg.str().c_str(),screen); if (logfile) fputs(mesg.str().c_str(),logfile); @@ -575,3 +586,128 @@ void KimStyle::do_variables(char *user_units, char *model_units) if (logfile) fputs("#\n",logfile); } } + +/* ---------------------------------------------------------------------- */ + +int KimStyle::species_to_atomic_no(std::string const species) const +{ + if (species == "H") return 1; + else if (species == "He") return 2; + else if (species == "Li") return 3; + else if (species == "Be") return 4; + else if (species == "B") return 5; + else if (species == "C") return 6; + else if (species == "N") return 7; + else if (species == "O") return 8; + else if (species == "F") return 9; + else if (species == "Ne") return 10; + else if (species == "Na") return 11; + else if (species == "Mg") return 12; + else if (species == "Al") return 13; + else if (species == "Si") return 14; + else if (species == "P") return 15; + else if (species == "S") return 16; + else if (species == "Cl") return 17; + else if (species == "Ar") return 18; + else if (species == "K") return 19; + else if (species == "Ca") return 20; + else if (species == "Sc") return 21; + else if (species == "Ti") return 22; + else if (species == "V") return 23; + else if (species == "Cr") return 24; + else if (species == "Mn") return 25; + else if (species == "Fe") return 26; + else if (species == "Co") return 27; + else if (species == "Ni") return 28; + else if (species == "Cu") return 29; + else if (species == "Zn") return 30; + else if (species == "Ga") return 31; + else if (species == "Ge") return 32; + else if (species == "As") return 33; + else if (species == "Se") return 34; + else if (species == "Br") return 35; + else if (species == "Kr") return 36; + else if (species == "Rb") return 37; + else if (species == "Sr") return 38; + else if (species == "Y") return 39; + else if (species == "Zr") return 40; + else if (species == "Nb") return 41; + else if (species == "Mo") return 42; + else if (species == "Tc") return 43; + else if (species == "Ru") return 44; + else if (species == "Rh") return 45; + else if (species == "Pd") return 46; + else if (species == "Ag") return 47; + else if (species == "Cd") return 48; + else if (species == "In") return 49; + else if (species == "Sn") return 50; + else if (species == "Sb") return 51; + else if (species == "Te") return 52; + else if (species == "I") return 53; + else if (species == "Xe") return 54; + else if (species == "Cs") return 55; + else if (species == "Ba") return 56; + else if (species == "La") return 57; + else if (species == "Ce") return 58; + else if (species == "Pr") return 59; + else if (species == "Nd") return 60; + else if (species == "Pm") return 61; + else if (species == "Sm") return 62; + else if (species == "Eu") return 63; + else if (species == "Gd") return 64; + else if (species == "Tb") return 65; + else if (species == "Dy") return 66; + else if (species == "Ho") return 67; + else if (species == "Er") return 68; + else if (species == "Tm") return 69; + else if (species == "Yb") return 70; + else if (species == "Lu") return 71; + else if (species == "Hf") return 72; + else if (species == "Ta") return 73; + else if (species == "W") return 74; + else if (species == "Re") return 75; + else if (species == "Os") return 76; + else if (species == "Ir") return 77; + else if (species == "Pt") return 78; + else if (species == "Au") return 79; + else if (species == "Hg") return 80; + else if (species == "Tl") return 81; + else if (species == "Pb") return 82; + else if (species == "Bi") return 83; + else if (species == "Po") return 84; + else if (species == "At") return 85; + else if (species == "Rn") return 86; + else if (species == "Fr") return 87; + else if (species == "Ra") return 88; + else if (species == "Ac") return 89; + else if (species == "Th") return 90; + else if (species == "Pa") return 91; + else if (species == "U") return 92; + else if (species == "Np") return 93; + else if (species == "Pu") return 94; + else if (species == "Am") return 95; + else if (species == "Cm") return 96; + else if (species == "Bk") return 97; + else if (species == "Cf") return 98; + else if (species == "Es") return 99; + else if (species == "Fm") return 100; + else if (species == "Md") return 101; + else if (species == "No") return 102; + else if (species == "Lr") return 103; + else if (species == "Rf") return 104; + else if (species == "Db") return 105; + else if (species == "Sg") return 106; + else if (species == "Bh") return 107; + else if (species == "Hs") return 108; + else if (species == "Mt") return 109; + else if (species == "Ds") return 110; + else if (species == "Rg") return 111; + else if (species == "Cn") return 112; + else if (species == "Nh") return 113; + else if (species == "Fl") return 114; + else if (species == "Mc") return 115; + else if (species == "Lv") return 116; + else if (species == "Ts") return 117; + else if (species == "Og") return 118; + else return -1; +} diff --git a/src/KIM/kim_style.h b/src/KIM/kim_style.h index b18f6627ea..626f2395bc 100644 --- a/src/KIM/kim_style.h +++ b/src/KIM/kim_style.h @@ -80,8 +80,9 @@ class KimStyle : protected Pointers { void do_init(char *, char *, char *); void do_setup(int, char **); void do_variables(char*, char*); - void kim_style_log_delimiter(std::string begin_end, - std::string model_setup); + int species_to_atomic_no(std::string const species) const; + void kim_style_log_delimiter(std::string const begin_end, + std::string const model_setup) const; }; } -- GitLab From f81c9c5322aa0d8e067f240639528b0292f83bb8 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sat, 22 Jun 2019 10:21:05 -0500 Subject: [PATCH 036/236] Changed _u_* output to log to variable commands --- src/KIM/kim_style.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_style.cpp index 161bc31643..a583908fc7 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_style.cpp @@ -576,7 +576,8 @@ void KimStyle::do_variables(char *user_units, char *model_units) variable->internal_set(v_unit,conversion_factor); if (comm->me == 0) { std::stringstream mesg; - mesg << "# " << var_str << " = " << conversion_factor << std::endl; + mesg << "variable " << var_str << " internal " << conversion_factor + << std::endl; if (screen) fputs(mesg.str().c_str(),screen); if (logfile) fputs(mesg.str().c_str(),logfile); } -- GitLab From 4a22e3bf70d03dd292319bdab315f2731da41eab Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Sat, 22 Jun 2019 15:21:57 -0500 Subject: [PATCH 037/236] Implement kim_init, kim_interactions & various updates --- src/KIM/README | 27 +- src/KIM/{kim_style.cpp => kim_init.cpp} | 421 +++++------------------- src/KIM/{kim_style.h => kim_init.h} | 35 +- src/KIM/kim_interactions.cpp | 367 +++++++++++++++++++++ src/KIM/kim_interactions.h | 116 +++++++ 5 files changed, 590 insertions(+), 376 deletions(-) rename src/KIM/{kim_style.cpp => kim_init.cpp} (52%) rename src/KIM/{kim_style.h => kim_init.h} (82%) create mode 100644 src/KIM/kim_interactions.cpp create mode 100644 src/KIM/kim_interactions.h diff --git a/src/KIM/README b/src/KIM/README index 4f52d69a67..e61f47426f 100644 --- a/src/KIM/README +++ b/src/KIM/README @@ -1,29 +1,30 @@ -This package provides a pair_style kim command which is a wrapper on -the Knowledge Base for Interatomic Models (KIM) repository of -interatomic potentials, so that they can be used by LAMMPS scripts. +This package provides the kim_init, kim_query, kim_interactions, and +the pair_style kim command which are wrappers on the Knowledgebase of +Interatomic Models (KIM) repository of interatomic potentials, so that +they can be used by LAMMPS scripts. Information about the KIM project can be found at https://openkim.org. -The KIM project is lead by Ellad Tadmor and Ryan Elliott (U Minn) and -James Sethna (Cornell U). Ryan Elliott is the main developer for the -KIM API and he also maintains the code that implements the pair_style -kim command. +The KIM project is lead by Ellad B. Tadmor and Ryan S. Elliott (UMN). +Ryan Elliott is the main developer for the KIM API and he also +maintains the code that implements these commands. -Using this package requires the KIM library and its models +Using this package requires the KIM-API library and its models (interatomic potentials) to be downloaded and installed on your system. The library can be downloaded and built in lib/kim or elsewhere on your system, which must be done before bulding LAMMPS with this package. Details of the download, build, and install -process for KIM are given in the lib/kim/README file, and scripts -are provided to help automate the process. Also see the LAMMPS -manual for general information on building LAMMPS with external +process for the KIM-API are given in the lib/kim/README file, and +scripts are provided to help automate the process. Also see the +LAMMPS manual for general information on building LAMMPS with external libraries. The settings in the Makefile.lammps file in lib/kim must be correct for LAMMPS to build correctly with this package installed. However, the default settings should be correct in most cases and the Makefile.lammps file usually will not need to be changed. Once you have successfully built LAMMPS with this package and the KIM -library you can test it using an input file from the examples dir: +library you can test it using an input files in the examples dir: ./lmp_serial -in lammps/examples/kim/in.kim.lj -This pair_style was written by Ryan S. Elliott (U Minn). +These commands were written by Ryan S. Elliott (UMN), Ellad B. Tadmor +(UMN) and Axel Kohlmeyer (Temple U). diff --git a/src/KIM/kim_style.cpp b/src/KIM/kim_init.cpp similarity index 52% rename from src/KIM/kim_style.cpp rename to src/KIM/kim_init.cpp index a583908fc7..695db0aa0d 100644 --- a/src/KIM/kim_style.cpp +++ b/src/KIM/kim_init.cpp @@ -14,6 +14,7 @@ /* ---------------------------------------------------------------------- Contributing authors: Axel Kohlmeyer (Temple U), Ryan S. Elliott (UMN) + Ellad B. Tadmor (UMN) ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- @@ -57,7 +58,8 @@ #include #include #include -#include "kim_style.h" +#include +#include "kim_init.h" #include "error.h" #include "atom.h" #include "comm.h" @@ -85,33 +87,26 @@ using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ -void KimStyle::command(int narg, char **arg) +void KimInit::command(int narg, char **arg) { - if ((narg < 2) || (narg > 4)) error->all(FLERR,"Illegal kim_style command"); - - if (strcmp(arg[0],"model") == 0) { - if (domain->box_exist) - error->all(FLERR,"Must use 'kim_style model' command before " - "simulation box is defined"); - int len1 = strlen(arg[1])+1; - int len2 = strlen(arg[2])+1; - char *model_name = new char[len1]; strcpy(model_name,arg[1]); - char *user_units = new char[len2]; strcpy(user_units,arg[2]); - if (narg == 4) { - if (strcmp(arg[3],"unit_conversion_mode")==0) unit_conversion_mode = true; - else { error->all(FLERR,"Illegal kim_style command"); } - } else unit_conversion_mode = false; - - char *model_units; - determine_model_type_and_units(model_name, user_units, &model_units); - - do_init(model_name, user_units, model_units); - } else if (strcmp(arg[0],"setup") == 0) { - if (!domain->box_exist) - error->all(FLERR,"Must use 'kim_style setup' command after " - "simulation box is defined"); - do_setup(narg-1,++arg); - } else error->all(FLERR,"Illegal kim_style command"); + if ((narg < 2) || (narg > 3)) error->all(FLERR,"Illegal kim_init command"); + + if (domain->box_exist) + error->all(FLERR,"Must use 'kim_init' command before " + "simulation box is defined"); + int len0 = strlen(arg[0])+1; + int len1 = strlen(arg[1])+1; + char *model_name = new char[len0]; strcpy(model_name,arg[0]); + char *user_units = new char[len1]; strcpy(user_units,arg[1]); + if (narg == 3) { + if (strcmp(arg[2],"unit_conversion_mode")==0) unit_conversion_mode = true; + else { error->all(FLERR,"Illegal kim_init command"); } + } else unit_conversion_mode = false; + + char *model_units; + determine_model_type_and_units(model_name, user_units, &model_units); + + do_init(model_name, user_units, model_units); } @@ -163,9 +158,9 @@ void get_kim_unit_names( } } } // namespace -void KimStyle::determine_model_type_and_units(char * model_name, - char * user_units, - char ** model_units) +void KimInit::determine_model_type_and_units(char * model_name, + char * user_units, + char ** model_units) { KIM_LengthUnit lengthUnit; KIM_EnergyUnit energyUnit; @@ -270,7 +265,7 @@ void KimStyle::determine_model_type_and_units(char * model_name, /* ---------------------------------------------------------------------- */ -void KimStyle::do_init(char *model_name, char *user_units, char* model_units) +void KimInit::do_init(char *model_name, char *user_units, char* model_units) { // create storage proxy fix. delete existing fix, if needed. @@ -288,229 +283,102 @@ void KimStyle::do_init(char *model_name, char *user_units, char* model_units) fix_store->setptr("user_units", (void *) user_units); fix_store->setptr("model_units", (void *) model_units); + // Begin output to log file + kim_init_log_delimiter("begin"); + int kimerror; // @@@@@ switch to c-bindings when they are available KIM::SimulatorModel * simulatorModel; - kimerror = KIM::SimulatorModel::Create(model_name,&simulatorModel); - - const std::string *sim_name, *sim_version; - simulatorModel->GetSimulatorNameAndVersion(&sim_name, &sim_version); - - if (*sim_name != "LAMMPS") - error->all(FLERR,"Incompatible KIM Simulator Model"); - - // Begin output to log file - kim_style_log_delimiter("begin","model"); - if (comm->me == 0) { - std::string mesg("# Using KIM Simulator Model : "); - mesg += model_name; - mesg += "\n"; - mesg += "# For Simulator : "; - mesg += *sim_name + " " + *sim_version + "\n"; - mesg += "# Running on : LAMMPS "; - mesg += universe->version; - mesg += "\n"; - mesg += "#\n"; - - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); - } - - // Define unit conversion factor variables and print to log - if (unit_conversion_mode) do_variables(user_units, model_units); - - // set units - - std::string cmd("units "); - cmd += model_units; - input->one(cmd.c_str()); - - // not a Kim Simulator Model; nothing else to do here. - - if (kimerror) return; - - fix_store->setptr("simulator_model", (void *) simulatorModel); - - // need to call this to have access to (some) simulator model init data. - - simulatorModel->CloseTemplateMap(); - - int sim_fields, sim_lines; - const std::string *sim_field, *sim_value; - simulatorModel->GetNumberOfSimulatorFields(&sim_fields); - - // init model - - for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "model-init") { - for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); - input->one(sim_value->c_str()); - } - break; - } - } - - // End output to log file - kim_style_log_delimiter("end","model"); + if (model_type == SM) + { + kimerror = KIM::SimulatorModel::Create(model_name,&simulatorModel); - // reset template map. - simulatorModel->OpenAndInitializeTemplateMap(); -} + const std::string *sim_name, *sim_version; + simulatorModel->GetSimulatorNameAndVersion(&sim_name, &sim_version); -/* ---------------------------------------------------------------------- */ + if (*sim_name != "LAMMPS") + error->all(FLERR,"Incompatible KIM Simulator Model"); -void KimStyle::kim_style_log_delimiter(std::string const begin_end, - std::string const model_setup) const -{ if (comm->me == 0) { - std::string mesg; - if ((begin_end == "begin") && (model_setup == "model")) mesg = - "#=== BEGIN kim-style MODEL ==================================\n"; - else if ((begin_end == "begin") && (model_setup == "setup")) mesg = - "#=== BEGIN kim-style SETUP ==================================\n"; - else if ((begin_end == "end") && (model_setup == "model")) mesg = - "#=== END kim-style MODEL ====================================\n\n"; - else if ((begin_end == "end") && (model_setup == "setup")) mesg = - "#=== END kim-style SETUP ====================================\n\n"; + std::string mesg("# Using KIM Simulator Model : "); + mesg += model_name; + mesg += "\n"; + mesg += "# For Simulator : "; + mesg += *sim_name + " " + *sim_version + "\n"; + mesg += "# Running on : LAMMPS "; + mesg += universe->version; + mesg += "\n"; + mesg += "#\n"; if (screen) fputs(mesg.c_str(),screen); if (logfile) fputs(mesg.c_str(),logfile); } -} - -/* ---------------------------------------------------------------------- */ - -void KimStyle::do_setup(int narg, char **arg) -{ - if (narg != atom->ntypes) - error->all(FLERR,"Illegal kim_style command"); - char *model = NULL; - KIM::SimulatorModel *simulatorModel(NULL); + fix_store->setptr("simulator_model", (void *) simulatorModel); - // check if we had a kim_style init command by finding fix STORE/KIM - // retrieve model name and pointer to simulator model class instance. - // validate model name if not given as NULL. - // if kim_style init wasn't run try to initialize simulator model now. + // need to call this to have access to (some) simulator model init data. - int ifix = modify->find_fix("KIM_MODEL_STORE"); - if (ifix >= 0) { - FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; - model = (char *)fix_store->getptr("model_name"); - simulatorModel = (KIM::SimulatorModel *)fix_store->getptr("simulator_model"); - } else error->all(FLERR,"Must use 'kim_style model' before 'kim_style setup'"); - - // Begin output to log file - kim_style_log_delimiter("begin","setup"); - - if (simulatorModel) { - - std::string delimiter(""); - std::string atom_type_sym_list; - std::string atom_type_num_list; - - for (int i = 0; i < narg; i++) - { - atom_type_sym_list += delimiter + arg[i]; - atom_type_num_list += delimiter + SNUM(species_to_atomic_no(arg[i])); - delimiter = " "; - } - - simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); - simulatorModel->AddTemplateMap("atom-type-num-list",atom_type_num_list); simulatorModel->CloseTemplateMap(); + } - int len = strlen(atom_type_sym_list.c_str())+1; - char *strbuf = new char[len]; - char *strword; - - // validate species selection - - int sim_num_species; - bool species_is_supported; - const std::string *sim_species; - simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); - strcpy(strbuf,atom_type_sym_list.c_str()); - strword = strtok(strbuf," \t"); - while (strword) { - species_is_supported = false; - if (strcmp(strword,"NULL") == 0) continue; - for (int i=0; i < sim_num_species; ++i) { - simulatorModel->GetSupportedSpecies(i, &sim_species); - if (strcmp(sim_species->c_str(),strword) == 0) - species_is_supported = true; - } - if (!species_is_supported) { - std::string msg("Species '"); - msg += strword; - msg += "' is not supported by this KIM Simulator Model"; - error->all(FLERR,msg.c_str()); - } - strword = strtok(NULL," \t"); - } - delete[] strbuf; + // Define unit conversion factor variables and print to log + if (unit_conversion_mode) do_variables(user_units, model_units); - // check if units are unchanged, and if kim_style init was required + // set units + std::string cmd("units "); + cmd += model_units; + input->one(cmd.c_str()); + + if (model_type == SM) + { int sim_fields, sim_lines; const std::string *sim_field, *sim_value; simulatorModel->GetNumberOfSimulatorFields(&sim_fields); - for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "units") { - simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); - if (*sim_value != update->unit_style) - error->all(FLERR,"Incompatible units for KIM Simulator Model"); - } - } + // init model - int sim_model_idx=-1; for (int i=0; i < sim_fields; ++i) { simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "model-defn") { - sim_model_idx = i; + if (*sim_field == "model-init") { for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); + simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); input->one(sim_value->c_str()); } + break; } } - if (sim_model_idx < 0) - error->all(FLERR,"KIM Simulator Model has no Model definition"); - + // reset template map. simulatorModel->OpenAndInitializeTemplateMap(); + } - } else { + // End output to log file + kim_init_log_delimiter("end"); - // not a simulator model. issue pair_style and pair_coeff commands. - // NOTE: all references to arg must appear before calls to input->one() - // as that will reset the argument vector. +} - std::string cmd1("pair_style kim "); - cmd1 += model; +/* ---------------------------------------------------------------------- */ - std::string cmd2("pair_coeff * * "); - for (int i=0; i < narg; ++i) { - cmd2 += arg[i]; - cmd2 += " "; - } +void KimInit::kim_init_log_delimiter(std::string const begin_end) const +{ + if (comm->me == 0) { + std::string mesg; + if (begin_end == "begin") + mesg = + "#=== BEGIN kim-init ==========================================\n"; + else if (begin_end == "end") + mesg = + "#=== END kim-init ============================================\n\n"; - input->one(cmd1.c_str()); - input->one(cmd2.c_str()); + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); } - - // End output to log file - kim_style_log_delimiter("end","setup"); - } /* ---------------------------------------------------------------------- */ -void KimStyle::do_variables(char *user_units, char *model_units) +void KimInit::do_variables(char *user_units, char *model_units) { char *from = user_units, *to = model_units; Variable *variable = input->variable; @@ -576,7 +444,9 @@ void KimStyle::do_variables(char *user_units, char *model_units) variable->internal_set(v_unit,conversion_factor); if (comm->me == 0) { std::stringstream mesg; - mesg << "variable " << var_str << " internal " << conversion_factor + mesg << "variable " << std::setw(15) << std::left << var_str + << " internal " + << std::setprecision(12) << std::scientific << conversion_factor << std::endl; if (screen) fputs(mesg.str().c_str(),screen); if (logfile) fputs(mesg.str().c_str(),logfile); @@ -587,128 +457,3 @@ void KimStyle::do_variables(char *user_units, char *model_units) if (logfile) fputs("#\n",logfile); } } - -/* ---------------------------------------------------------------------- */ - -int KimStyle::species_to_atomic_no(std::string const species) const -{ - if (species == "H") return 1; - else if (species == "He") return 2; - else if (species == "Li") return 3; - else if (species == "Be") return 4; - else if (species == "B") return 5; - else if (species == "C") return 6; - else if (species == "N") return 7; - else if (species == "O") return 8; - else if (species == "F") return 9; - else if (species == "Ne") return 10; - else if (species == "Na") return 11; - else if (species == "Mg") return 12; - else if (species == "Al") return 13; - else if (species == "Si") return 14; - else if (species == "P") return 15; - else if (species == "S") return 16; - else if (species == "Cl") return 17; - else if (species == "Ar") return 18; - else if (species == "K") return 19; - else if (species == "Ca") return 20; - else if (species == "Sc") return 21; - else if (species == "Ti") return 22; - else if (species == "V") return 23; - else if (species == "Cr") return 24; - else if (species == "Mn") return 25; - else if (species == "Fe") return 26; - else if (species == "Co") return 27; - else if (species == "Ni") return 28; - else if (species == "Cu") return 29; - else if (species == "Zn") return 30; - else if (species == "Ga") return 31; - else if (species == "Ge") return 32; - else if (species == "As") return 33; - else if (species == "Se") return 34; - else if (species == "Br") return 35; - else if (species == "Kr") return 36; - else if (species == "Rb") return 37; - else if (species == "Sr") return 38; - else if (species == "Y") return 39; - else if (species == "Zr") return 40; - else if (species == "Nb") return 41; - else if (species == "Mo") return 42; - else if (species == "Tc") return 43; - else if (species == "Ru") return 44; - else if (species == "Rh") return 45; - else if (species == "Pd") return 46; - else if (species == "Ag") return 47; - else if (species == "Cd") return 48; - else if (species == "In") return 49; - else if (species == "Sn") return 50; - else if (species == "Sb") return 51; - else if (species == "Te") return 52; - else if (species == "I") return 53; - else if (species == "Xe") return 54; - else if (species == "Cs") return 55; - else if (species == "Ba") return 56; - else if (species == "La") return 57; - else if (species == "Ce") return 58; - else if (species == "Pr") return 59; - else if (species == "Nd") return 60; - else if (species == "Pm") return 61; - else if (species == "Sm") return 62; - else if (species == "Eu") return 63; - else if (species == "Gd") return 64; - else if (species == "Tb") return 65; - else if (species == "Dy") return 66; - else if (species == "Ho") return 67; - else if (species == "Er") return 68; - else if (species == "Tm") return 69; - else if (species == "Yb") return 70; - else if (species == "Lu") return 71; - else if (species == "Hf") return 72; - else if (species == "Ta") return 73; - else if (species == "W") return 74; - else if (species == "Re") return 75; - else if (species == "Os") return 76; - else if (species == "Ir") return 77; - else if (species == "Pt") return 78; - else if (species == "Au") return 79; - else if (species == "Hg") return 80; - else if (species == "Tl") return 81; - else if (species == "Pb") return 82; - else if (species == "Bi") return 83; - else if (species == "Po") return 84; - else if (species == "At") return 85; - else if (species == "Rn") return 86; - else if (species == "Fr") return 87; - else if (species == "Ra") return 88; - else if (species == "Ac") return 89; - else if (species == "Th") return 90; - else if (species == "Pa") return 91; - else if (species == "U") return 92; - else if (species == "Np") return 93; - else if (species == "Pu") return 94; - else if (species == "Am") return 95; - else if (species == "Cm") return 96; - else if (species == "Bk") return 97; - else if (species == "Cf") return 98; - else if (species == "Es") return 99; - else if (species == "Fm") return 100; - else if (species == "Md") return 101; - else if (species == "No") return 102; - else if (species == "Lr") return 103; - else if (species == "Rf") return 104; - else if (species == "Db") return 105; - else if (species == "Sg") return 106; - else if (species == "Bh") return 107; - else if (species == "Hs") return 108; - else if (species == "Mt") return 109; - else if (species == "Ds") return 110; - else if (species == "Rg") return 111; - else if (species == "Cn") return 112; - else if (species == "Nh") return 113; - else if (species == "Fl") return 114; - else if (species == "Mc") return 115; - else if (species == "Lv") return 116; - else if (species == "Ts") return 117; - else if (species == "Og") return 118; - else return -1; -} diff --git a/src/KIM/kim_style.h b/src/KIM/kim_init.h similarity index 82% rename from src/KIM/kim_style.h rename to src/KIM/kim_init.h index 626f2395bc..c22e2be720 100644 --- a/src/KIM/kim_style.h +++ b/src/KIM/kim_init.h @@ -14,6 +14,7 @@ /* ---------------------------------------------------------------------- Contributing authors: Axel Kohlmeyer (Temple U), Ryan S. Elliott (UMN) + Ellad B. Tadmor (UMN) ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- @@ -56,20 +57,20 @@ #ifdef COMMAND_CLASS -CommandStyle(kim_style,KimStyle) +CommandStyle(kim_init,KimInit) #else -#ifndef LMP_KIM_STYLE_H -#define LMP_KIM_STYLE_H +#ifndef LMP_KIM_INIT_H +#define LMP_KIM_INIT_H #include "pointers.h" namespace LAMMPS_NS { -class KimStyle : protected Pointers { +class KimInit : protected Pointers { public: - KimStyle(class LAMMPS *lmp) : Pointers(lmp) {}; + KimInit(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); private: enum model_type_enum {MO, SM}; @@ -78,11 +79,8 @@ class KimStyle : protected Pointers { void determine_model_type_and_units(char *, char *, char **); void do_init(char *, char *, char *); - void do_setup(int, char **); void do_variables(char*, char*); - int species_to_atomic_no(std::string const species) const; - void kim_style_log_delimiter(std::string const begin_end, - std::string const model_setup) const; + void kim_init_log_delimiter(std::string const begin_end) const; }; } @@ -92,19 +90,11 @@ class KimStyle : protected Pointers { /* ERROR/WARNING messages: -E: Illegal kim_style command +E: Illegal kim_init command -Incorrect number or kind of arguments to kim_style. +Incorrect number or kind of arguments to kim_init. -E: Must use 'kim_style model' command before simulation box is defined - -Self-explanatory. - -E: Must use 'kim_style setup' command after simulation box is defined - -Self-explanatory. - -E: Must use 'kim_style model' command before 'kim_style setup' +E: Must use 'kim_init' command before simulation box is defined Self-explanatory. @@ -125,11 +115,6 @@ E: Incompatible KIM Simulator Model The requested KIM Simulator Model was defined for a different MD code and thus is not compatible with LAMMPS. -E: Species XXX is not supported by this KIM Simulator Model - -The kim_style define command was referencing a species that is not -present in the requested KIM Simulator Model. - E: Incompatible units for KIM Simulator Model The selected unit style is not compatible with the requested KIM diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp new file mode 100644 index 0000000000..491d406ae6 --- /dev/null +++ b/src/KIM/kim_interactions.cpp @@ -0,0 +1,367 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Axel Kohlmeyer (Temple U), + Ryan S. Elliott (UMN) + Ellad B. Tadmor (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.1.0 (and newer) package +------------------------------------------------------------------------- */ + +#include +#include +#include +#include "kim_interactions.h" +#include "error.h" +#include "atom.h" +#include "comm.h" +#include "domain.h" +#include "modify.h" +#include "update.h" +#include "universe.h" +#include "input.h" +#include "variable.h" +#include "fix_store_kim.h" + +extern "C" { +#include "KIM_SimulatorHeaders.h" +} +//@@@@@ Need to switch to c-bindings when they are available. +#include "KIM_SimulatorModel.hpp" +//@@@@@ + +#define SNUM(x) \ + static_cast(std::ostringstream() \ + << std::dec << x).str() + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +void KimInteractions::command(int narg, char **arg) +{ + if (narg < 1) error->all(FLERR,"Illegal kim_interactions command"); + + if (!domain->box_exist) + error->all(FLERR,"Must use 'kim_interactions' command after " + "simulation box is defined"); + do_setup(narg,arg); +} + +/* ---------------------------------------------------------------------- */ + +void KimInteractions::kim_interactions_log_delimiter( + std::string const begin_end) const +{ + if (comm->me == 0) { + std::string mesg; + if (begin_end == "begin") + mesg = + "#=== BEGIN kim_interactions ==================================\n"; + else if (begin_end == "end") + mesg = + "#=== END kim_interactions ====================================\n\n"; + + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); + } +} + +/* ---------------------------------------------------------------------- */ + +void KimInteractions::do_setup(int narg, char **arg) +{ + if (narg != atom->ntypes) + error->all(FLERR,"Illegal kim_interactions command"); + + char *model_name = NULL; + KIM::SimulatorModel *simulatorModel(NULL); + + // check if we had a kim_init command by finding fix STORE/KIM + // retrieve model name and pointer to simulator model class instance. + // validate model name if not given as NULL. + + int ifix = modify->find_fix("KIM_MODEL_STORE"); + if (ifix >= 0) { + FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; + model_name = (char *)fix_store->getptr("model_name"); + simulatorModel = (KIM::SimulatorModel *)fix_store->getptr("simulator_model"); + } else error->all(FLERR,"Must use 'kim_init' before 'kim_interactions'"); + + // Begin output to log file + kim_interactions_log_delimiter("begin"); + + if (simulatorModel) { + + std::string delimiter(""); + std::string atom_type_sym_list; + std::string atom_type_num_list; + + for (int i = 0; i < narg; i++) + { + atom_type_sym_list += delimiter + arg[i]; + atom_type_num_list += delimiter + SNUM(species_to_atomic_no(arg[i])); + delimiter = " "; + } + + simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); + simulatorModel->AddTemplateMap("atom-type-num-list",atom_type_num_list); + simulatorModel->CloseTemplateMap(); + + int len = strlen(atom_type_sym_list.c_str())+1; + char *strbuf = new char[len]; + char *strword; + + // validate species selection + + int sim_num_species; + bool species_is_supported; + const std::string *sim_species; + simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); + strcpy(strbuf,atom_type_sym_list.c_str()); + strword = strtok(strbuf," \t"); + while (strword) { + species_is_supported = false; + if (strcmp(strword,"NULL") == 0) continue; + for (int i=0; i < sim_num_species; ++i) { + simulatorModel->GetSupportedSpecies(i, &sim_species); + if (strcmp(sim_species->c_str(),strword) == 0) + species_is_supported = true; + } + if (!species_is_supported) { + std::string msg("Species '"); + msg += strword; + msg += "' is not supported by this KIM Simulator Model"; + error->all(FLERR,msg.c_str()); + } + strword = strtok(NULL," \t"); + } + delete[] strbuf; + + // check if units are unchanged + + int sim_fields, sim_lines; + const std::string *sim_field, *sim_value; + simulatorModel->GetNumberOfSimulatorFields(&sim_fields); + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + + if (*sim_field == "units") { + simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); + if (*sim_value != update->unit_style) + error->all(FLERR,"Incompatible units for KIM Simulator Model"); + } + } + + int sim_model_idx=-1; + for (int i=0; i < sim_fields; ++i) { + simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + if (*sim_field == "model-defn") { + sim_model_idx = i; + for (int j=0; j < sim_lines; ++j) { + simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); + input->one(sim_value->c_str()); + } + } + } + + if (sim_model_idx < 0) + error->all(FLERR,"KIM Simulator Model has no Model definition"); + + simulatorModel->OpenAndInitializeTemplateMap(); + + } else { + + // not a simulator model. issue pair_style and pair_coeff commands. + // NOTE: all references to arg must appear before calls to input->one() + // as that will reset the argument vector. + + std::string cmd1("pair_style kim "); + cmd1 += model_name; + + std::string cmd2("pair_coeff * * "); + for (int i=0; i < narg; ++i) { + cmd2 += arg[i]; + cmd2 += " "; + } + + input->one(cmd1.c_str()); + input->one(cmd2.c_str()); + } + + // End output to log file + kim_interactions_log_delimiter("end"); + +} + +/* ---------------------------------------------------------------------- */ + +int KimInteractions::species_to_atomic_no(std::string const species) const +{ + if (species == "H") return 1; + else if (species == "He") return 2; + else if (species == "Li") return 3; + else if (species == "Be") return 4; + else if (species == "B") return 5; + else if (species == "C") return 6; + else if (species == "N") return 7; + else if (species == "O") return 8; + else if (species == "F") return 9; + else if (species == "Ne") return 10; + else if (species == "Na") return 11; + else if (species == "Mg") return 12; + else if (species == "Al") return 13; + else if (species == "Si") return 14; + else if (species == "P") return 15; + else if (species == "S") return 16; + else if (species == "Cl") return 17; + else if (species == "Ar") return 18; + else if (species == "K") return 19; + else if (species == "Ca") return 20; + else if (species == "Sc") return 21; + else if (species == "Ti") return 22; + else if (species == "V") return 23; + else if (species == "Cr") return 24; + else if (species == "Mn") return 25; + else if (species == "Fe") return 26; + else if (species == "Co") return 27; + else if (species == "Ni") return 28; + else if (species == "Cu") return 29; + else if (species == "Zn") return 30; + else if (species == "Ga") return 31; + else if (species == "Ge") return 32; + else if (species == "As") return 33; + else if (species == "Se") return 34; + else if (species == "Br") return 35; + else if (species == "Kr") return 36; + else if (species == "Rb") return 37; + else if (species == "Sr") return 38; + else if (species == "Y") return 39; + else if (species == "Zr") return 40; + else if (species == "Nb") return 41; + else if (species == "Mo") return 42; + else if (species == "Tc") return 43; + else if (species == "Ru") return 44; + else if (species == "Rh") return 45; + else if (species == "Pd") return 46; + else if (species == "Ag") return 47; + else if (species == "Cd") return 48; + else if (species == "In") return 49; + else if (species == "Sn") return 50; + else if (species == "Sb") return 51; + else if (species == "Te") return 52; + else if (species == "I") return 53; + else if (species == "Xe") return 54; + else if (species == "Cs") return 55; + else if (species == "Ba") return 56; + else if (species == "La") return 57; + else if (species == "Ce") return 58; + else if (species == "Pr") return 59; + else if (species == "Nd") return 60; + else if (species == "Pm") return 61; + else if (species == "Sm") return 62; + else if (species == "Eu") return 63; + else if (species == "Gd") return 64; + else if (species == "Tb") return 65; + else if (species == "Dy") return 66; + else if (species == "Ho") return 67; + else if (species == "Er") return 68; + else if (species == "Tm") return 69; + else if (species == "Yb") return 70; + else if (species == "Lu") return 71; + else if (species == "Hf") return 72; + else if (species == "Ta") return 73; + else if (species == "W") return 74; + else if (species == "Re") return 75; + else if (species == "Os") return 76; + else if (species == "Ir") return 77; + else if (species == "Pt") return 78; + else if (species == "Au") return 79; + else if (species == "Hg") return 80; + else if (species == "Tl") return 81; + else if (species == "Pb") return 82; + else if (species == "Bi") return 83; + else if (species == "Po") return 84; + else if (species == "At") return 85; + else if (species == "Rn") return 86; + else if (species == "Fr") return 87; + else if (species == "Ra") return 88; + else if (species == "Ac") return 89; + else if (species == "Th") return 90; + else if (species == "Pa") return 91; + else if (species == "U") return 92; + else if (species == "Np") return 93; + else if (species == "Pu") return 94; + else if (species == "Am") return 95; + else if (species == "Cm") return 96; + else if (species == "Bk") return 97; + else if (species == "Cf") return 98; + else if (species == "Es") return 99; + else if (species == "Fm") return 100; + else if (species == "Md") return 101; + else if (species == "No") return 102; + else if (species == "Lr") return 103; + else if (species == "Rf") return 104; + else if (species == "Db") return 105; + else if (species == "Sg") return 106; + else if (species == "Bh") return 107; + else if (species == "Hs") return 108; + else if (species == "Mt") return 109; + else if (species == "Ds") return 110; + else if (species == "Rg") return 111; + else if (species == "Cn") return 112; + else if (species == "Nh") return 113; + else if (species == "Fl") return 114; + else if (species == "Mc") return 115; + else if (species == "Lv") return 116; + else if (species == "Ts") return 117; + else if (species == "Og") return 118; + else return -1; +} diff --git a/src/KIM/kim_interactions.h b/src/KIM/kim_interactions.h new file mode 100644 index 0000000000..6da1880f84 --- /dev/null +++ b/src/KIM/kim_interactions.h @@ -0,0 +1,116 @@ +/* -*- c++ -*- ---------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Contributing authors: Axel Kohlmeyer (Temple U), + Ryan S. Elliott (UMN) + Ellad B. Tadmor (UMN) +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, see . + + Linking LAMMPS statically or dynamically with other modules is making a + combined work based on LAMMPS. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + In addition, as a special exception, the copyright holders of LAMMPS give + you permission to combine LAMMPS with free software programs or libraries + that are released under the GNU LGPL and with code included in the standard + release of the "kim-api" under the CDDL (or modified versions of such code, + with unchanged license). You may copy and distribute such a system following + the terms of the GNU GPL for LAMMPS and the licenses of the other code + concerned, provided that you include the source code of that other code + when and as the GNU GPL requires distribution of source code. + + Note that people who make modified versions of LAMMPS are not obligated to + grant this special exception for their modified versions; it is their choice + whether to do so. The GNU General Public License gives permission to release + a modified version without this exception; this exception also makes it + possible to release a modified version which carries forward this exception. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + Designed for use with the kim-api-2.1.0 (and newer) package +------------------------------------------------------------------------- */ + +#ifdef COMMAND_CLASS + +CommandStyle(kim_interactions,KimInteractions) + +#else + +#ifndef LMP_KIM_INTERACTIONS_H +#define LMP_KIM_INTERACTIONS_H + +#include "pointers.h" + +namespace LAMMPS_NS { + +class KimInteractions : protected Pointers { + public: + KimInteractions(class LAMMPS *lmp) : Pointers(lmp) {}; + void command(int, char **); + private: + void do_setup(int, char **); + int species_to_atomic_no(std::string const species) const; + void kim_interactions_log_delimiter(std::string const begin_end) const; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal kim_interactions command + +Incorrect number or kind of arguments to kim_interactions. + +E: Must use 'kim_interactions' command after simulation box is defined + +Self-explanatory. + +E: Must use 'kim_init' command before 'kim_interactions' + +Self-explanatory. + +E: Species XXX is not supported by this KIM Simulator Model + +The kim_interactions command was referencing a species that is not +present in the requested KIM Simulator Model. + +E: Incompatible units for KIM Simulator Model + +The selected unit style is not compatible with the requested KIM +Simulator Model. + +E: KIM Simulator Model has no Model definition + +There is no model definition (key: model-defn) in the KIM Simulator +Model. Please contact the OpenKIM database maintainers to verify +and potentially correct this. + +*/ -- GitLab From 17fa2f787b58cb4c17bc6aa04b1015a9b2778a93 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sat, 22 Jun 2019 15:25:21 -0500 Subject: [PATCH 038/236] Added kim_command documentation structure --- doc/src/Commands_all.txt | 5 +- doc/src/commands_list.txt | 3 +- doc/src/kim_commands.txt | 108 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 4 deletions(-) create mode 100644 doc/src/kim_commands.txt diff --git a/doc/src/Commands_all.txt b/doc/src/Commands_all.txt index d76ffac14c..a201fd3f2d 100644 --- a/doc/src/Commands_all.txt +++ b/doc/src/Commands_all.txt @@ -68,8 +68,9 @@ An alphabetic list of all general LAMMPS commands. "improper_style"_improper_style.html, "include"_include.html, "jump"_jump.html, -"kim_query"_kim_query.html, -"kim_style"_kim_style.html, +"kim_init"_kim_commands.html, +"kim_interactions"_kim_commands.html, +"kim_query"_kim_commands.html, "kspace_modify"_kspace_modify.html, "kspace_style"_kspace_style.html, "label"_label.html, diff --git a/doc/src/commands_list.txt b/doc/src/commands_list.txt index 39d2f7c7d0..a5c9b568ed 100644 --- a/doc/src/commands_list.txt +++ b/doc/src/commands_list.txt @@ -53,8 +53,7 @@ Commands :h1 include info jump - kim_query - kim_style + kim_commands kspace_modify kspace_style label diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt new file mode 100644 index 0000000000..4c53746317 --- /dev/null +++ b/doc/src/kim_commands.txt @@ -0,0 +1,108 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Commands_all.html) + +:line + +kim_commands :h3 + +[Syntax:] + +kim_init model user_units :pre +kim_interactions typeargs :pre + +mode = {init model} or {define typeargs} or no mode chosen +model = name of the KIM model (KIM potential or KIM simulator model) +typeargs = atom type to species mapping (one entry per atom type) +args = {unit_variables unit_style} or {unit_from unit_style} (optional):ul + +[Examples:] + +kim_style init ex_sim_model_Si_mod_tersoff unit_variables metal +kim_style define Si Si +kim_style unit_variables real +kim_style init LennardJones_Ar unit_variables metal +kim_style unit_variables real unit_from metal +kim_style define Ar :pre + +[Description:] + +The kim_style command is a high-level wrapper around the +"Knowledge Base for Interatomic Models (OpenKIM)"_https://openkim.org +repository of interatomic potentials, so that they can be used by +LAMMPS scripts. It does not implement any computations directly, but +rather will generate LAMMPS input commands based on the information +retrieved from the OpenKIM repository. It is able to realize so-called +"KIM Simulator Models", which are OpenKIM repository entries of models +using native features of the simulation engine in use, i.e. LAMMPS +in this case, but it also supports realizing conventional KIM models +implicitly via generating a "pair_style kim"_pair_kim.html command +followed by a suitable "pair_coeff"_pair_coeff.html command. + +The kim_style command has two modes, {init} and {define}, indicated by +the first argument to the kim_style command. An {init} mode command +must be issued [before] the simulation box is created, while the {define} +mode version may only be used [after] the simulation box exists. Both +are required. The {init} mode version sets the model name and may issue +additional commands changing LAMMPS default settings that are required +for using a selected simulator model. If needed, those settings can be +overridden. The second argument to the {kim_style init} command is the +KIM model ID. + +In both modes, the keywords {unit_variables} and {unit_from} may be +added. They control the values of a set of +"internal style variables"_variable.html that can be used to convert +between different unit styles in LAMMPS. The argument to +each keyword is a LAMMPS unit style or NULL, which means to look up +the unit style from what was set with the "units"_units.html command. +Please note, that KIM simulator models will set their preferred unit style. +By default all conversion variables are set to 1.0. Converting to or +from the "lj" unit style is not supported. The following variables are defined: + +_u_length +_u_mass +_u_time :ul + + +The {kim_style define} command will issue commands that will realize +the selected model (through generating pair_style and pair_coeff commands, +but also other commands, as required). It has to be issued [after] the +the simulation box is defined. The {kim_style define} command allows a +varying number of additional arguments. Those are used to map the atom +types in LAMMPS to the available species in the KIM model. This is +equivalent to the arguments following "pair_coeff * *" in a +"kim"_pair_kim.html pair style. Thus the commands: + +kim_style init LennardJones_Ar +kim_style define Ar :pre + +will generate the LAMMPS input commands: + +pair_style kim LennardJones_Ar +pair_coeff * * Ar :pre + +For simulator models, the generated input commands may be more complex +and require that LAMMPS is built with the required packages included. +The commands generated by the kim_style command, can be copied to the +screen or log file, through the "echo"_echo.html command. +The kim_style command will also validate, that a selected simulator +model was generated for the LAMMPS MD code and not some other software. +In addition, the version strings for LAMMPS version used for defining +the simulator model and the LAMMPS version being currently run are +printed, so that it can be tracked down, if there are any incompatible +changes to input script or command syntax between the two LAMMPS versions. + +[Restrictions:] + +This command is part of the KIM package. It is only enabled if +LAMMPS was built with that package. Furthermore, its correct +functioning depends on compiling LAMMPS with all required packages +installed that are required by the commands embedded in any KIM +simulator models used. +See the "Build package"_Build_package.html doc page for more info. + +[Related commands:] + +"pair_style kim"_pair_kim.html, "kim_query"_kim_query.html -- GitLab From 33be7f259be9446edf9f75e17309d8bfe7f05e84 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sat, 22 Jun 2019 21:49:29 -0500 Subject: [PATCH 039/236] Working on kim_commands documentation --- doc/src/kim_commands.txt | 232 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 221 insertions(+), 11 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 4c53746317..06ad841240 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -10,25 +10,235 @@ kim_commands :h3 [Syntax:] -kim_init model user_units :pre -kim_interactions typeargs :pre +kim_init model user_units unitarg +kim_interactions typeargs +kim_query variable query_function web_query_flags :pre -mode = {init model} or {define typeargs} or no mode chosen -model = name of the KIM model (KIM potential or KIM simulator model) +model = designation of the KIM interatomic model (the KIM ID for models archived in OpenKIM) +user_units = the LAMMPS "units"_units.html style assumed in the user input script +unitarg = {unit_conversion_mode} (optional) typeargs = atom type to species mapping (one entry per atom type) -args = {unit_variables unit_style} or {unit_from unit_style} (optional):ul +variable = name of a (string style) variable where the result of the query is stored +query_function = name of the OpenKIM web API query function to be used +web_query_flags = a series of keyword=value pairs that represent the web query; supported keywords depend on query function :ul + [Examples:] -kim_style init ex_sim_model_Si_mod_tersoff unit_variables metal -kim_style define Si Si -kim_style unit_variables real -kim_style init LennardJones_Ar unit_variables metal -kim_style unit_variables real unit_from metal -kim_style define Ar :pre +kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 metal +kim_interactions Si +kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real +kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode +kim_interactions C H O +kim_query NEED EXAMPLES :pre [Description:] +The "Open Knowledgebase for Interatomic Models (OpenKIM)"_https://openkim.org +archives interatomic models (IMs) (potentials and force fields) in a format +that can be directly used with LAMMPS using the commands documented on this +page. + +Benefits of Using OpenKIM IMs :h4 + +Employing OpenKIM IMs provides LAMMPS users with multiple benefits: + +Reliability :h5 + +All content archived in OpenKIM is subject to quality control by the "KIM Editor"_https://openkim.org/governance/. +IMs in OpenKIM are archived with full provenance control. Each is associated with a maintainer responsible for the integrity of the content. All changes are tracked and recorded. +IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/getting-started/kim-tests/ that compute a host of material properties, and "KIM Verification Checks"_https://openkim.org/about-verification-checks/ that provide the user with information on various aspects of the IM behavior and coding correctness. This information is displayed on the IM's page on "OpenKIM"_https://openkim.org. :ul + +Reproducibility :h5 + +Each IM in OpenKIM is issued a unique identifier ("KIM ID"_https://openkim.org/about-kim-ids/), which includes a version number (last three digits). Any changes that can result in different numerical values lead to a version increment in the KIM ID. This makes it possible to reproduce simulations since the specific version of a specific IM used can be retrieved using its KIM ID. +OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues digitial object identifiers (DOIs) to all IMs archived in OpenKIM. This makes it possible to cite the IM code used in a simulation in a publications to give credit to the developers and further facilitate reproducibility. :ul + +Convenience :h5 + +IMs in OpenKIM are distributed in binary form along with LAMMPS and can be used in a LAMMPS input script simply by providing their KIM ID in the {kim_init} command documented on this page. (For more on using KIM with LAMMPS, see the KIM section of the "Packages details"_Packages_details.html doc page.) +The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"https://openkim.org/getting-started/kim-tests/) as part of a LAMMPS input script setup and analysis. +Support is provided for unit conversion between the "units"_units.html system used in the LAMMPS input script and the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the liklihood of errors due to incompatible units. :ul + +Types of KIM IMs :h4 + +There are two types of IMs archived in OpenKIM: + +The first type is called a {KIM Model}. A KIM Model is an independent computer implemention of an IM written in one of the languages supported by KIM (C, C++, Fortran, Python), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that support the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). +The second type is called a {KIM Simulator Model} (SM). In this case, the IM is implemented natively within the simulation code ({simulator}), i.e. LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol + +With these two IM tpes, OpenKIM can archive and test almost all IMs that +can be used by LAMMPS. (It is easy to contribute new IMs to OpenKIM, see +the "upload instructions"_https://openkim.org/getting-started/adding-content/.) + +OpenKIM IMs are uniquely identified by a +"KIM ID"_https://openkim.org/about-kim-ids/. The extended KIM ID consists of +a human-readable prefix identifying the type of IM, authors, publication year, +and supported species, separated by two underscores from the KIM ID itself, +which begins with an IM code +({MO} for a KIM Model, and {SM} for a KIM Simulator Model) +followed by a unique 12-digit code and a 3-digit version identifier. +By convension SM prefixes begin with {SM} to readily identify them. + +SW_StillingerWeber_1985_Si__MO_405512056662_005 +Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 :pre + +NOTE: It is also possible to locally install IMs not archived in OpenKIM, +in which case their designation does not have to conform to the KIM ID format. + +Using OpenKIM IMs with LAMMPS :h4 + +Two commands are employed when using OpenKIM IMs, one to select the +IM and perform necessary initializations ({kim_init}), and the second +to set up the IM for use by executing any necessary LAMMPS commands +({kim_interactions}). + +OpenKIM IM Initialization :h5 + +The kim_init command must be located at the top of the input script +before any other commands. Input scripts containing a kim_init command +shoud {not} include a "units"_units.html command or an +"atom_style"_atom_style.html command. These are set by the kim_init +command based on its arguments. + +The required arguments of kim_init are the {model} designation of the +IM to be used in the simulation (for an IM archived in OpenKIM this is +its "extended KIM ID"_https://openkim.org/about-kim-ids/), and +the {user_units}, which are the LAMMPS "units"_units.html system used +in the input script. (Any numerical values in the input script and values +read in from files are expected to be in the {user_units} system.) + +Based on the selected model kim_init may modify "atom_style"_atom_style.html. +Some SMs have requirements for this variable. If this is the case, then +atom_style will be set to the required style. Otherwise, the value is left +unchanged (which in the absence of an atom_style command in the input script +is the default LAMMPS value). + +Regarding units, the kim_init command behaves in different ways depending +on whether or not "unit conversion mode" is activated as indicated by the +optional {unitarg} argument. +If unit conversion mode is {not} active, then {user_units} must +either match the required units of the IM or the IM must be able +to adjust its units to match. (The latter is only possible with some KIM Models; +SMs can never adjust their units.) If a match is possible, the LAMMPS +"units"_units.html command is called to set the units to +{user_units}. If the match fails, the simulation is terminated with +an error. + +If unit conversion mode {is} active, then the LAMMPS "units"_units.html +command is called to set the units to the IM's required or preferred units. +Conversion factors between the IM's units and the {user_units} are +defined for all "physical quantities"_units.html (mass, distance, etc.). +These factors are stored as internal "variables"_variable.html with +standard names: + +_u_mass +_u_distance +_u_time +_u_energy +_u_velocity +_u_force +_u_torque +_u_temperature +_u_pressure +_u_viscosity +_u_charge +_u_dipole +_u_efield +_u_density :pre + +If desired, the input script can be designed to work with these conversion +factors so that the script will work without change with any OpenKIM IM. +(This approach is used in the +"OpenKIM Testing Framework"_https://openkim.org/getting-started/kim-tests/.) +For example, the following simple script constructs an fcc lattice with +a lattice parameter defined in meters, computes the total energy, +and prints the cohesive energy in Joules regardless of the units of the IM. + +kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 si unit_conversion_mode +boundary p p p +lattice fcc 4.032e-10*$\{_u_distance\} +region simbox block 0 1 0 1 0 1 units lattice +create_box 1 simbox +create_atoms 1 box +mass 1 4.480134e-26*$\{_u_mass\} +kim_interactions Al +run 0 +variable Ec_in_J equal (pe/count(all))/$\{_u_energy\} +print "Cohesive Energy = $\{Ec_in_J\} J" :pre + +Note the multiplication by $\{_u_distance\} and $\{_u_mass\} to convert +from SI units (specified in the kim_init command) to whatever units the +IM uses (metal in this case), and the division by $\{_u_energy\} +to convert from the IM's energy units to SI units (Joule). This script +will work correctly for any IM for Al (KIM Model or SM) selected by the +kim_init command. + +Care must be taken to apply unit conversion to dimensional variables read in +from a file. For example if a configuration of atoms is read in from a +dump file using the "read_dump"_read_dump.html command, the following can +be done to convert the box and all atomic positions to the correct units: + +change_box all x scale $\{_u_distance\} y scale $\{_u_distance\} z scale $\{_u_distance\} remap :pre + +NOTE: Unit conversion will only work if the conversion factors are placed in +all appropriate places in the input script. It is up to the user to do this +correctly. + +OpenKIM IM Execution :h5 + +The second and final step in using an OpenKIM IM is to execute the +kim_interaction command. This command must be preceded by a kim_init +command and must follow the "create_box"_create_box.html command, +which defines the number of atom types {N}. +The kim_interaction command has one argument {typeargs}, which contains +a list of {N} chemical species that are mapped to the atom types. + +For example, imagine the OpenKIM IM supports Si and C species. +If the LAMMPS simulation has 4 atom types and you want the first three to be Si, +and the fourth to be C, you would use the following kim_interaction command: + +kim_interaction Si Si Si C :pre + +The kim_interaction command performs all the necessary steps to set up +the OpenKIM IM set in the kim_init command. The specific actions depend +on whether the IM is a KIM Model or a KIM SM. For a KIM Model, +a "pair_style kim"_pair_kim.html command will be executed followed by +the appropriate pair_coeff command. + +For a KIM SM, the set of commands defined in the SM speficiation file +will be executed. For example, consider the ReaxFF SM due to +Strachan et al. (2003) executed by the following commands: + +kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real +... +... box specification lines skipped +... +kim_interactions C H N O :pre + +The kim_interactions command executes the following commands defined for this +SM: + +pair_style reax/c lmp_control safezone 2.0 mincap 100 +pair_coeff * * ffield.reax.rdx C H N O +fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq :pre + +Note that the files lmp_control, ffield.reax.rdx and param.qeq are specific +to Strachan et al. (2003) ReaxFF parameterization and are archived as part +of the SM package in OpenKIM. Note also that parameters like cutoff radii +and charge tolerances that have an effect on IM predictions are also +included in the SM definition ensuring reproducibility. + +NOTE: Clearly when using using kim_init and kim_interactions to select +and set up an OpenKIM IM, other LAMMPS commands +for the same functions (such as pair_style, pair_coeff, bond_style, +bond_coeff, fixes related to charge equilibration, etc.) should not +appear in the input script. + +Using OpenKIM Web Queries in LAMMPS :h4 + +@@@@@@@@@ + The kim_style command is a high-level wrapper around the "Knowledge Base for Interatomic Models (OpenKIM)"_https://openkim.org repository of interatomic potentials, so that they can be used by -- GitLab From c11caf45095d96aeb2a1477ce78d6e0c03ea7505 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Sun, 23 Jun 2019 10:34:43 -0500 Subject: [PATCH 040/236] update kim examples to temp. current state of code --- examples/kim/data.VOH | 118 ---------------------- examples/kim/in.kim.VOH.simulator_model | 23 ----- examples/kim/in.kim.ex_si.simulator_model | 69 ------------- examples/kim/in.kim.lj.simulator_model | 10 +- 4 files changed, 2 insertions(+), 218 deletions(-) delete mode 100644 examples/kim/data.VOH delete mode 100644 examples/kim/in.kim.VOH.simulator_model delete mode 100644 examples/kim/in.kim.ex_si.simulator_model diff --git a/examples/kim/data.VOH b/examples/kim/data.VOH deleted file mode 100644 index c093705adc..0000000000 --- a/examples/kim/data.VOH +++ /dev/null @@ -1,118 +0,0 @@ -# VOH example - -100 atoms -4 atom types - -0 25.000 xlo xhi -0 25.000 ylo yhi -0 25.000 zlo zhi - -Masses - -1 1.0080 -2 12.0107 -3 15.9994 -4 50.9415 - -Atoms - - 1 2 0.0 12.35333 12.56112 11.08925 - 2 4 0.0 12.32916 12.62071 13.13099 - 3 3 0.0 14.09425 12.56218 13.76130 - 4 3 0.0 11.42814 11.10330 13.76732 - 5 3 0.0 11.63260 13.89286 13.64097 - 6 1 0.0 10.61647 11.29221 14.30535 - 7 1 0.0 14.38026 13.34626 14.29055 - 8 1 0.0 11.32479 12.58820 10.70253 - 9 1 0.0 12.90918 13.42567 10.69612 - 10 1 0.0 12.84043 11.63643 10.74688 - 11 2 0.0 0.93670 23.74637 24.45218 - 12 4 0.0 2.18151 24.36876 0.94725 - 13 3 0.0 3.93452 24.44779 0.28384 - 14 3 0.0 2.13668 23.10529 2.33362 - 15 3 0.0 1.76108 0.74666 1.48323 - 16 1 0.0 1.82070 23.45305 3.20745 - 17 1 0.0 4.35555 0.34186 0.31083 - 18 1 0.0 24.90472 23.68735 24.82586 - 19 1 0.0 0.97611 24.45631 23.61244 - 20 1 0.0 1.24583 22.75250 24.09589 - 21 2 0.0 2.25730 12.18969 18.74792 - 22 4 0.0 0.67140 13.31162 19.37385 - 23 3 0.0 0.71106 13.43250 21.24545 - 24 3 0.0 24.08603 12.44025 18.87949 - 25 3 0.0 0.70486 14.71920 18.75808 - 26 1 0.0 23.49516 12.95430 18.26686 - 27 1 0.0 0.79723 14.34808 21.60818 - 28 1 0.0 2.24383 12.10285 17.65239 - 29 1 0.0 3.19860 12.66607 19.06030 - 30 1 0.0 2.20214 11.18299 19.18774 - 31 2 0.0 9.32237 8.16220 23.74501 - 32 4 0.0 9.41775 7.26178 21.91463 - 33 3 0.0 8.54752 8.34565 20.65588 - 34 3 0.0 8.50942 5.62151 22.00137 - 35 3 0.0 10.87539 7.02683 21.48455 - 36 1 0.0 9.06507 4.82324 21.80615 - 37 1 0.0 9.11458 8.67119 19.91477 - 38 1 0.0 9.82196 7.53487 24.49616 - 39 1 0.0 9.81855 9.14254 23.70532 - 40 1 0.0 8.27176 8.30387 24.03831 - 41 2 0.0 9.10113 13.98748 23.44281 - 42 4 0.0 8.84954 12.89163 21.73780 - 43 3 0.0 10.01387 13.54293 20.42005 - 44 3 0.0 7.08992 13.11522 21.12954 - 45 3 0.0 9.12937 11.39982 21.99065 - 46 1 0.0 6.55309 12.28287 21.08224 - 47 1 0.0 10.67858 12.89258 20.08249 - 48 1 0.0 8.42108 13.62252 24.22498 - 49 1 0.0 10.13926 13.89766 23.79639 - 50 1 0.0 8.88118 15.04646 23.24289 - 51 2 0.0 17.73225 3.40708 8.28945 - 52 4 0.0 18.49877 5.29835 8.37599 - 53 3 0.0 19.48472 5.62627 6.81505 - 54 3 0.0 19.66498 5.40961 9.84118 - 55 3 0.0 17.38120 6.34466 8.51889 - 56 1 0.0 19.41208 6.07779 10.52927 - 57 1 0.0 19.15960 6.37609 6.25924 - 58 1 0.0 17.15579 3.19557 9.20103 - 59 1 0.0 17.07197 3.31049 7.41454 - 60 1 0.0 18.54903 2.67524 8.20436 - 61 2 0.0 5.18346 20.97409 24.28840 - 62 4 0.0 7.06396 20.17968 24.34847 - 63 3 0.0 7.63220 19.82889 22.59578 - 64 3 0.0 7.00272 18.55243 0.28036 - 65 3 0.0 8.05085 21.13715 0.03620 - 66 1 0.0 7.56109 18.51690 1.09952 - 67 1 0.0 8.44257 20.31624 22.30833 - 68 1 0.0 4.83239 21.17976 0.30904 - 69 1 0.0 5.19182 21.91237 23.71419 - 70 1 0.0 4.49282 20.26573 23.80772 - 71 2 0.0 21.82701 12.79861 20.63056 - 72 4 0.0 21.27646 11.09990 19.63611 - 73 3 0.0 19.52930 10.64327 20.13923 - 74 3 0.0 22.41924 9.70346 20.14638 - 75 3 0.0 21.34556 11.30206 18.11274 - 76 1 0.0 22.94464 9.30084 19.40876 - 77 1 0.0 18.86743 10.62817 19.40629 - 78 1 0.0 22.85378 13.07853 20.35349 - 79 1 0.0 21.14666 13.62206 20.37063 - 80 1 0.0 21.78702 12.62668 21.71522 - 81 2 0.0 4.84801 10.63893 5.85720 - 82 4 0.0 2.99668 11.06158 5.10490 - 83 3 0.0 3.09505 11.09458 3.23258 - 84 3 0.0 2.48053 12.76555 5.69567 - 85 3 0.0 1.96195 10.01780 5.55634 - 86 1 0.0 1.65323 12.78746 6.24245 - 87 1 0.0 2.52753 10.43264 2.76734 - 88 1 0.0 4.80984 10.62196 6.95551 - 89 1 0.0 5.18492 9.65688 5.49273 - 90 1 0.0 5.56737 11.40648 5.53568 - 91 2 0.0 13.58126 9.47098 19.40329 - 92 4 0.0 14.17691 10.17243 21.22692 - 93 3 0.0 14.44428 12.02521 21.10583 - 94 3 0.0 15.81206 9.37183 21.67632 - 95 3 0.0 13.12907 9.86545 22.30960 - 96 1 0.0 15.80034 8.83149 22.50703 - 97 1 0.0 13.87232 12.57457 21.69672 - 98 1 0.0 13.42563 8.38456 19.45392 - 99 1 0.0 12.63978 9.95672 19.10431 - 100 1 0.0 14.35123 9.68789 18.64825 diff --git a/examples/kim/in.kim.VOH.simulator_model b/examples/kim/in.kim.VOH.simulator_model deleted file mode 100644 index 8696cf265a..0000000000 --- a/examples/kim/in.kim.VOH.simulator_model +++ /dev/null @@ -1,23 +0,0 @@ -# REAX potential for VOH system -# ..... - -units real -atom_style charge - -kim_style init Sim_LAMMPS_ReaxFF_ChenowethVanDuinPersson_2008_CHOV__SM_429148913211_000 - -read_data data.VOH - -kim_style define H C O V - -neighbor 2 bin -neigh_modify every 10 delay 0 check no - -fix 1 all nve -fix 3 all temp/berendsen 500.0 500.0 100.0 - -timestep 0.25 - -#dump 1 all atom 30 dump.reax.voh - -run 300 diff --git a/examples/kim/in.kim.ex_si.simulator_model b/examples/kim/in.kim.ex_si.simulator_model deleted file mode 100644 index 2f9e79ef4e..0000000000 --- a/examples/kim/in.kim.ex_si.simulator_model +++ /dev/null @@ -1,69 +0,0 @@ - -units metal -kim_style init ex_sim_model_Si_mod_tersoff - -atom_style atomic -atom_modify map array -boundary p p p - -# temperatures -variable tlo equal 1800.0 -variable thi equal 2400.0 - -# coordination number cutoff - -variable r equal 2.835 - -# minimization parameters - -variable etol equal 1.0e-5 -variable ftol equal 1.0e-5 -variable maxiter equal 100 -variable maxeval equal 100 -variable dmax equal 1.0e-1 - -# diamond unit cell - -variable a equal 5.431 -lattice custom $a & - a1 1.0 0.0 0.0 & - a2 0.0 1.0 0.0 & - a3 0.0 0.0 1.0 & - basis 0.0 0.0 0.0 & - basis 0.0 0.5 0.5 & - basis 0.5 0.0 0.5 & - basis 0.5 0.5 0.0 & - basis 0.25 0.25 0.25 & - basis 0.25 0.75 0.75 & - basis 0.75 0.25 0.75 & - basis 0.75 0.75 0.25 - -region myreg block 0 4 & - 0 4 & - 0 4 -create_box 1 myreg -create_atoms 1 region myreg - -mass 1 28.06 - -group Si type 1 - -velocity all create ${thi} 5287286 mom yes rot yes dist gaussian - -# make a vacancy - -group del id 300 -delete_atoms group del -kim_style define Si - -thermo 10 - -fix 1 all nve -fix 2 all langevin ${thi} ${thi} 0.1 48278 - -timestep 1.0e-3 -neighbor 1.0 bin -neigh_modify every 1 delay 10 check yes - -run 100 - diff --git a/examples/kim/in.kim.lj.simulator_model b/examples/kim/in.kim.lj.simulator_model index 01ee5aa64c..cb7a2e14ed 100644 --- a/examples/kim/in.kim.lj.simulator_model +++ b/examples/kim/in.kim.lj.simulator_model @@ -14,9 +14,7 @@ variable xx equal 20*$x variable yy equal 20*$y variable zz equal 20*$z -echo both -#kim_style model LennardJones_Ar metal -kim_style model Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real unit_conversion_mode +kim_init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real unit_conversion_mode newton on lattice fcc 4.4300 @@ -24,10 +22,7 @@ region box block 0 ${xx} 0 ${yy} 0 ${zz} create_box 1 box create_atoms 1 box -#pair_style lj/cut 8.1500 -#pair_coeff 1 1 0.0104 3.4000 - -kim_style setup Au +kim_interactions Au mass 1 39.95 velocity all create 200.0 232345 loop geom @@ -36,6 +31,5 @@ neighbor 0.3 bin neigh_modify delay 0 every 1 check yes fix 1 all nve -#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 run 100 -- GitLab From d08867ce0a05e090056f9dea1e3bbdd2fc4c6afa Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 11:39:06 -0500 Subject: [PATCH 041/236] Completed first version of kim_commands documentation --- doc/src/kim_commands.txt | 318 +++++++++++++++++++++++---------------- 1 file changed, 189 insertions(+), 129 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 06ad841240..c3ab799821 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -12,15 +12,15 @@ kim_commands :h3 kim_init model user_units unitarg kim_interactions typeargs -kim_query variable query_function web_query_flags :pre +kim_query variable query_function queryargs :pre -model = designation of the KIM interatomic model (the KIM ID for models archived in OpenKIM) -user_units = the LAMMPS "units"_units.html style assumed in the user input script +model = name of the KIM interatomic model (the KIM ID for models archived in OpenKIM) +user_units = the LAMMPS "units"_units.html style assumed in the LAMMPS input script unitarg = {unit_conversion_mode} (optional) typeargs = atom type to species mapping (one entry per atom type) variable = name of a (string style) variable where the result of the query is stored query_function = name of the OpenKIM web API query function to be used -web_query_flags = a series of keyword=value pairs that represent the web query; supported keywords depend on query function :ul +queryargs = a series of {keyword=value} pairs that represent the web query; supported keywords depend on the query function :ul [Examples:] @@ -30,14 +30,20 @@ kim_interactions Si kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode kim_interactions C H O -kim_query NEED EXAMPLES :pre +kim_query a0 get_lattice_constant_fcc units=\["angstrom"\] :pre + [Description:] -The "Open Knowledgebase for Interatomic Models (OpenKIM)"_https://openkim.org -archives interatomic models (IMs) (potentials and force fields) in a format -that can be directly used with LAMMPS using the commands documented on this -page. +The set of {kim_commands} provide a high-level wrapper around the +"Open Knowledgebase of Interatomic Models (OpenKIM)"_https://openkim.org +repository of interatomic models (IMs) (potentials and force fields), +so that they can be used by LAMMPS scripts. These commands do not implement +any computations directly, but rather generate LAMMPS input commands based +on the information retrieved from the OpenKIM repository to initialize and +activate OpenKIM IMs and query their predictions for use in the LAMMPS script. +All LAMMPS input commands executed by {kim_commands} are echoed to the +LAMMPS log file. Benefits of Using OpenKIM IMs :h4 @@ -52,22 +58,23 @@ IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/get Reproducibility :h5 Each IM in OpenKIM is issued a unique identifier ("KIM ID"_https://openkim.org/about-kim-ids/), which includes a version number (last three digits). Any changes that can result in different numerical values lead to a version increment in the KIM ID. This makes it possible to reproduce simulations since the specific version of a specific IM used can be retrieved using its KIM ID. -OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues digitial object identifiers (DOIs) to all IMs archived in OpenKIM. This makes it possible to cite the IM code used in a simulation in a publications to give credit to the developers and further facilitate reproducibility. :ul +OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues digital object identifiers (DOIs) to all IMs archived in OpenKIM. This makes it possible to cite the IM code used in a simulation in a publications to give credit to the developers and further facilitate reproducibility. :ul Convenience :h5 -IMs in OpenKIM are distributed in binary form along with LAMMPS and can be used in a LAMMPS input script simply by providing their KIM ID in the {kim_init} command documented on this page. (For more on using KIM with LAMMPS, see the KIM section of the "Packages details"_Packages_details.html doc page.) +IMs in OpenKIM are distributed in binary form along with LAMMPS and can be used in a LAMMPS input script simply by providing their KIM ID in the {kim_init} command documented on this page. The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"https://openkim.org/getting-started/kim-tests/) as part of a LAMMPS input script setup and analysis. -Support is provided for unit conversion between the "units"_units.html system used in the LAMMPS input script and the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the liklihood of errors due to incompatible units. :ul +Support is provided for unit conversion between the "units style"_units.html used in the LAMMPS input script and the units required by the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the likelihood of errors due to incompatible units. :ul +:link(IM_types) Types of KIM IMs :h4 There are two types of IMs archived in OpenKIM: -The first type is called a {KIM Model}. A KIM Model is an independent computer implemention of an IM written in one of the languages supported by KIM (C, C++, Fortran, Python), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that support the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). +The first type is called a {KIM Model}. A KIM Model is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran, Python), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that support the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). The second type is called a {KIM Simulator Model} (SM). In this case, the IM is implemented natively within the simulation code ({simulator}), i.e. LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol -With these two IM tpes, OpenKIM can archive and test almost all IMs that +With these two IM types, OpenKIM can archive and test almost all IMs that can be used by LAMMPS. (It is easy to contribute new IMs to OpenKIM, see the "upload instructions"_https://openkim.org/getting-started/adding-content/.) @@ -78,46 +85,59 @@ and supported species, separated by two underscores from the KIM ID itself, which begins with an IM code ({MO} for a KIM Model, and {SM} for a KIM Simulator Model) followed by a unique 12-digit code and a 3-digit version identifier. -By convension SM prefixes begin with {SM} to readily identify them. +By convention SM prefixes begin with {Sim_} to readily identify them. SW_StillingerWeber_1985_Si__MO_405512056662_005 Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 :pre NOTE: It is also possible to locally install IMs not archived in OpenKIM, -in which case their designation does not have to conform to the KIM ID format. +in which case their names do not have to conform to the KIM ID format. Using OpenKIM IMs with LAMMPS :h4 Two commands are employed when using OpenKIM IMs, one to select the IM and perform necessary initializations ({kim_init}), and the second to set up the IM for use by executing any necessary LAMMPS commands -({kim_interactions}). +({kim_interactions}). Both are required. -OpenKIM IM Initialization :h5 +OpenKIM IM Initialization ({kim_init}) :h5 -The kim_init command must be located at the top of the input script -before any other commands. Input scripts containing a kim_init command -shoud {not} include a "units"_units.html command or an -"atom_style"_atom_style.html command. These are set by the kim_init -command based on its arguments. +The {kim_init} mode command must be issued [before] +the simulation box is created (normally at the top of the file). +This command sets the OpenKIM IM that will be used and may issue +additional commands changing LAMMPS default settings that are required +for using the selected IM (such as "units"_units.html or +"atom_style"_atom_style.html). If needed, those settings can be overridden, +however, typically a script containing a {kim_init} command +would not include {units} and {atom_style} commands. -The required arguments of kim_init are the {model} designation of the +The required arguments of {kim_init} are the {model} name of the IM to be used in the simulation (for an IM archived in OpenKIM this is its "extended KIM ID"_https://openkim.org/about-kim-ids/), and -the {user_units}, which are the LAMMPS "units"_units.html system used -in the input script. (Any numerical values in the input script and values -read in from files are expected to be in the {user_units} system.) - -Based on the selected model kim_init may modify "atom_style"_atom_style.html. +the {user_units}, which are the LAMMPS "units style"_units.html used +in the input script. (Any dimensioned numerical values in the input +script and values read in from files are expected to be in the +{user_units} system.) + +The selected IM can be either a "KIM Model or a KIM SM"_#IM_types. +For a KIM SM, the {kim_init} command verifies that the SM is designed +to work with LAMMPS (and not another simulation code). +In addition, the version strings for the LAMMPS version used for defining +the SM and the LAMMPS version being currently run are +printed, to help diagnose any incompatible changes to input script or +command syntax between the two LAMMPS versions. + +Based on the selected model {kim_init} may modify the +"atom_style"_atom_style.html. Some SMs have requirements for this variable. If this is the case, then -atom_style will be set to the required style. Otherwise, the value is left -unchanged (which in the absence of an atom_style command in the input script -is the default LAMMPS value). +{atom_style} will be set to the required style. Otherwise, the value is left +unchanged (which in the absence of an {atom_style} command in the input script +is the "default atom_style value"_atom_style.html). -Regarding units, the kim_init command behaves in different ways depending -on whether or not "unit conversion mode" is activated as indicated by the +Regarding units, the {kim_init} command behaves in different ways depending +on whether or not {unit conversion mode} is activated as indicated by the optional {unitarg} argument. -If unit conversion mode is {not} active, then {user_units} must +If unit conversion mode is [not] active, then {user_units} must either match the required units of the IM or the IM must be able to adjust its units to match. (The latter is only possible with some KIM Models; SMs can never adjust their units.) If a match is possible, the LAMMPS @@ -129,7 +149,8 @@ If unit conversion mode {is} active, then the LAMMPS "units"_units.html command is called to set the units to the IM's required or preferred units. Conversion factors between the IM's units and the {user_units} are defined for all "physical quantities"_units.html (mass, distance, etc.). -These factors are stored as internal "variables"_variable.html with +(Note that converting to or from the "lj" unit style is not supported.) +These factors are stored as "internal style variables"_variable.html with standard names: _u_mass @@ -168,11 +189,11 @@ variable Ec_in_J equal (pe/count(all))/$\{_u_energy\} print "Cohesive Energy = $\{Ec_in_J\} J" :pre Note the multiplication by $\{_u_distance\} and $\{_u_mass\} to convert -from SI units (specified in the kim_init command) to whatever units the +from SI units (specified in the {kim_init} command) to whatever units the IM uses (metal in this case), and the division by $\{_u_energy\} to convert from the IM's energy units to SI units (Joule). This script will work correctly for any IM for Al (KIM Model or SM) selected by the -kim_init command. +{kim_init} command. Care must be taken to apply unit conversion to dimensional variables read in from a file. For example if a configuration of atoms is read in from a @@ -185,30 +206,47 @@ NOTE: Unit conversion will only work if the conversion factors are placed in all appropriate places in the input script. It is up to the user to do this correctly. -OpenKIM IM Execution :h5 +OpenKIM IM Execution ({kim_interactions}) :h5 The second and final step in using an OpenKIM IM is to execute the -kim_interaction command. This command must be preceded by a kim_init -command and must follow the "create_box"_create_box.html command, +{kim_interaction} command. This command must be preceded by a {kim_init} +command and a "create_box"_create_box.html command, which defines the number of atom types {N}. -The kim_interaction command has one argument {typeargs}, which contains -a list of {N} chemical species that are mapped to the atom types. +The {kim_interaction} command has one argument {typeargs}. This argument +contains a list of {N} chemical species, which defines a mapping between +atom types in LAMMPS to the available species in the OpenKIM IM. -For example, imagine the OpenKIM IM supports Si and C species. -If the LAMMPS simulation has 4 atom types and you want the first three to be Si, -and the fourth to be C, you would use the following kim_interaction command: +For example, consider an OpenKIM IM that supports Si and C species. +If the LAMMPS simulation has four atom types, where the first three are Si, +and the fourth is C, the following {kim_interaction} command would be used: kim_interaction Si Si Si C :pre -The kim_interaction command performs all the necessary steps to set up -the OpenKIM IM set in the kim_init command. The specific actions depend +The {kim_interaction} command performs all the necessary steps to set up +the OpenKIM IM selected in the {kim_init} command. The specific actions depend on whether the IM is a KIM Model or a KIM SM. For a KIM Model, -a "pair_style kim"_pair_kim.html command will be executed followed by -the appropriate pair_coeff command. +a "pair_style kim"_pair_kim.html command is executed followed by +the appropriate {pair_coeff} command. For example, for the +Ercolessi and Adams (1994) KIM Model for Al set by the following commands: + +kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal +... +... box specification lines skipped +... +kim_interactions Al :pre + +the {kim_interactions} command executes the following LAMMPS input commands: -For a KIM SM, the set of commands defined in the SM speficiation file -will be executed. For example, consider the ReaxFF SM due to -Strachan et al. (2003) executed by the following commands: +pair_style kim EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 +pair_coeff * * Al :pre + +For a KIM SM, the generated input commands may be more complex +and require that LAMMPS is built with the required packages included +for the type of potential being used. The set of commands to be executed +is defined in the SM specification file, which is part of the SM package +on "OpenKIM"_https://openkim.org. +For example, for the Strachan et al. (2003) ReaxFF SM +set by the following commands: kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real ... @@ -216,103 +254,125 @@ kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657 ... kim_interactions C H N O :pre -The kim_interactions command executes the following commands defined for this -SM: +the {kim_interactions} command executes the following LAMMPS input commands: pair_style reax/c lmp_control safezone 2.0 mincap 100 pair_coeff * * ffield.reax.rdx C H N O fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 param.qeq :pre -Note that the files lmp_control, ffield.reax.rdx and param.qeq are specific -to Strachan et al. (2003) ReaxFF parameterization and are archived as part -of the SM package in OpenKIM. Note also that parameters like cutoff radii -and charge tolerances that have an effect on IM predictions are also -included in the SM definition ensuring reproducibility. +Note that the files {lmp_control}, {ffield.reax.rdx} and {param.qeq} +are specific to the Strachan et al. (2003) ReaxFF parameterization +and are archived as part of the SM package in OpenKIM. +Note also that parameters like cutoff radii and charge tolerances, +which have an effect on IM predictions, are also included in the +SM definition ensuring reproducibility. -NOTE: Clearly when using using kim_init and kim_interactions to select +NOTE: When using using {kim_init} and {kim_interactions} to select and set up an OpenKIM IM, other LAMMPS commands for the same functions (such as pair_style, pair_coeff, bond_style, -bond_coeff, fixes related to charge equilibration, etc.) should not -appear in the input script. - -Using OpenKIM Web Queries in LAMMPS :h4 - -@@@@@@@@@ - -The kim_style command is a high-level wrapper around the -"Knowledge Base for Interatomic Models (OpenKIM)"_https://openkim.org -repository of interatomic potentials, so that they can be used by -LAMMPS scripts. It does not implement any computations directly, but -rather will generate LAMMPS input commands based on the information -retrieved from the OpenKIM repository. It is able to realize so-called -"KIM Simulator Models", which are OpenKIM repository entries of models -using native features of the simulation engine in use, i.e. LAMMPS -in this case, but it also supports realizing conventional KIM models -implicitly via generating a "pair_style kim"_pair_kim.html command -followed by a suitable "pair_coeff"_pair_coeff.html command. - -The kim_style command has two modes, {init} and {define}, indicated by -the first argument to the kim_style command. An {init} mode command -must be issued [before] the simulation box is created, while the {define} -mode version may only be used [after] the simulation box exists. Both -are required. The {init} mode version sets the model name and may issue -additional commands changing LAMMPS default settings that are required -for using a selected simulator model. If needed, those settings can be -overridden. The second argument to the {kim_style init} command is the -KIM model ID. - -In both modes, the keywords {unit_variables} and {unit_from} may be -added. They control the values of a set of -"internal style variables"_variable.html that can be used to convert -between different unit styles in LAMMPS. The argument to -each keyword is a LAMMPS unit style or NULL, which means to look up -the unit style from what was set with the "units"_units.html command. -Please note, that KIM simulator models will set their preferred unit style. -By default all conversion variables are set to 1.0. Converting to or -from the "lj" unit style is not supported. The following variables are defined: - -_u_length -_u_mass -_u_time :ul +bond_coeff, fixes related to charge equilibration, etc.) should normally +not appear in the input script. + +Using OpenKIM Web Queries in LAMMPS ({kim_query}) :h5 +The {kim_query} command performs a web query to retrieve the predictions +of the IM set by {kim_init} for material properties archived in +"OpenKIM"_https://openkim.org. The {kim_query} command must be preceded +by a {kim_init} command. The result of the query is stored in a +"string style variable"_variable.html, the name of which is given as the first +argument of the {kim_query command}. The second required argument +{query_function} is the name of the query function to be called +(e.g. {get_lattice_constant_fcc}). +All following arguments are parameters handed over to the web query +in the format {keyword=value}. The list of supported keywords and +and the type and format of their values depend on the query function +used. -The {kim_style define} command will issue commands that will realize -the selected model (through generating pair_style and pair_coeff commands, -but also other commands, as required). It has to be issued [after] the -the simulation box is defined. The {kim_style define} command allows a -varying number of additional arguments. Those are used to map the atom -types in LAMMPS to the available species in the KIM model. This is -equivalent to the arguments following "pair_coeff * *" in a -"kim"_pair_kim.html pair style. Thus the commands: +NOTE: The current list of supported query functions is available on the OpenKIM +webpage at "https://query.openkim.org"_https://query.openkim.org/ -kim_style init LennardJones_Ar -kim_style define Ar :pre +The data obtained by {kim_query} commands can be used as part of the setup +or analysis phases of LAMMPS simulations. Some examples are given below. -will generate the LAMMPS input commands: +[Define a crystal at its equilibrium lattice constant] -pair_style kim LennardJones_Ar -pair_coeff * * Ar :pre +kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal +boundary p p p +kim_query a0 get_lattice_constant_fcc units=\["angstrom"\] +lattice fcc $\{a0\} +... :pre + +The {kim_query} command retrieves from "OpenKIM"_https://openkim.org +the equilibrium lattice constant predicted by the Ercolessi and Adams (1994) +potential for the face-centered cubic (fcc) structure and places it in +variable {a0}. This variable is then used on the next line to set up the +crystal. By using {kim_query}, the user is saved the trouble and possible +error of tracking this value down, or of having to perform an energy +minimization to find the equilibrium lattice constant. + +[Define a crystal at finite temperature accounting for thermal expansion] + +kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal +boundary p p p +kim_query a0 get_lattice_constant_fcc units=\["angstrom"\] +kim_query alpha get_linear_thermal_expansion_fcc +variable DeltaT equal 300 +lattice fcc $\{a0\}*$\{alpha\}*$\{DeltaT\} +... :pre + +As in the previous example, the equilibrium lattice constant is obtained +for the Ercolessi and Adams (1994) potential. However, in this case the +crystal is scaled to the appropriate lattice constant at 300 K by using +the linear thermal expansion coefficient predicted by the potential. + +[Compute defect formation energy] + +kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal +... +... Build fcc crystal containing some defect and compute the total energy +... which is stored in the variable {Etot} +... +kim_query Ec get_cohesive_energy_fcc units=\["eV"\] +variable Eform equal $\{Etot\} - count(all)*$\{Ec\} +... :pre + +The defect formation energy {Eform} is computed by subtracting from {Etot} the +ideal fcc cohesive energy of the atoms in the system obtained from +"OpenKIM"_https://openkim.org for the Ercolessi and Adams (1994) potential. + +Citation of OpenKIM IMs :h4 + +When publishing results obtained using OpenKIM IMs researchers are requested +to cite the OpenKIM project "(Tadmor)"_#kim-mainpaper and KIM API +"(Elliott)"_#kim-api as well as the specific IM codes used in the simulations. +The citation format for an IM is displayed on its page on +"OpenKIM"_https://openkim.org along with the corresponding BibTex file. + +Citing the codes used in the simulation gives credit +to the researchers who developed them and enables open source efforts like +OpenKIM to function. -For simulator models, the generated input commands may be more complex -and require that LAMMPS is built with the required packages included. -The commands generated by the kim_style command, can be copied to the -screen or log file, through the "echo"_echo.html command. -The kim_style command will also validate, that a selected simulator -model was generated for the LAMMPS MD code and not some other software. -In addition, the version strings for LAMMPS version used for defining -the simulator model and the LAMMPS version being currently run are -printed, so that it can be tracked down, if there are any incompatible -changes to input script or command syntax between the two LAMMPS versions. [Restrictions:] -This command is part of the KIM package. It is only enabled if +The set of {kim_commands} is part of the KIM package. It is only enabled if LAMMPS was built with that package. Furthermore, its correct functioning depends on compiling LAMMPS with all required packages installed that are required by the commands embedded in any KIM -simulator models used. +SM used. See the "Build package"_Build_package.html doc page for more info. [Related commands:] -"pair_style kim"_pair_kim.html, "kim_query"_kim_query.html +"pair_style kim"_pair_kim.html + +:line + +:link(kim-mainpaper) +[(Tadmor)] Tadmor, Elliott, Sethna, Miller and Becker, JOM, 63, 17 (2011). +doi: "https://doi.org/10.1007/s11837-011-0102-6"_https://doi.org/10.1007/s11837-011-0102-6 + +:link(kim-api) +[(Elliott)] Elliott, Tadmor and Bernstein, "https://openkim.org/kim-api"_https://openkim.org/kim-api (2011) +doi: "https://doi.org/10.25950/FF8F563A"_https://doi.org/10.25950/FF8F563A + -- GitLab From a6f6c9bed0c804f039e83943cb9c22a1a66d1429 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 12:41:29 -0400 Subject: [PATCH 042/236] fix up links, spelling issues, and inconsistent names in kim commands docs --- doc/src/Build_extras.txt | 2 +- doc/src/Packages_details.txt | 14 ++++----- doc/src/kim_commands.txt | 34 +++++++++++---------- doc/src/pair_kim.txt | 4 +-- doc/utils/sphinx-config/false_positives.txt | 6 ++++ 5 files changed, 34 insertions(+), 26 deletions(-) diff --git a/doc/src/Build_extras.txt b/doc/src/Build_extras.txt index 17d18243f2..220e9420fc 100644 --- a/doc/src/Build_extras.txt +++ b/doc/src/Build_extras.txt @@ -173,7 +173,7 @@ KIM package :h4,link(kim) To build with this package, the KIM library with API v2 must be downloaded and built on your system. It must include the KIM models that you want to -use with LAMMPS. If you want to use the "kim_query"_kim_query.html +use with LAMMPS. If you want to use the "kim_query"_kim_commands.html command, you also need to have libcurl installed with the matching development headers and the curl-config tool. diff --git a/doc/src/Packages_details.txt b/doc/src/Packages_details.txt index 19c7e96fe9..d6e8f8639f 100644 --- a/doc/src/Packages_details.txt +++ b/doc/src/Packages_details.txt @@ -341,11 +341,11 @@ KIM package :link(PKG-KIM),h4 A "pair_style kim"_pair_kim.html command which is a wrapper on the Knowledge Base for Interatomic Models (KIM) repository of interatomic potentials, enabling any of them to be used in LAMMPS simulations. -Also a "kim_query"_kim_query.html command, which allows to query -the OpenKIM database for stored properties, and a -"kim_style"_kim_style.html command, which serves as a front end to -generating LAMMPS input on-the-fly for KIM simulator models and native -KIM models. +Also a "kim_query"_kim_commands.html command, which allows to query +the OpenKIM database for stored properties, and the commands +"kim_init and kim_interactions"_kim_commands.html, which serve as +front end to generating LAMMPS input on-the-fly for KIM simulator +models and native KIM models. To use this package you must have the KIM library available on your system. @@ -357,8 +357,8 @@ Elliott (U Minnesota). [Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM API which the "pair_style kim"_pair_kim.html command uses. He developed the pair style. Axel Kohlmeyer (Temple U) contributed the -"kim_query"_kim_query.html and "kim_style"_kim_style.html commands in -close collaboration with Ryan. +"kim_query"_kim_commands.html and "kim_init"_kim_commands.html commands +in close collaboration with Ryan. [Install:] diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 06ad841240..7377c0186c 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -30,7 +30,8 @@ kim_interactions Si kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode kim_interactions C H O -kim_query NEED EXAMPLES :pre +kim_query latconst get_test_result test=TE_156715955670 model=MO_800509458712 & + prop=structure-cubic-crystal-npt species=\["Al"\] keys=\["a"\] units=\["angstrom"\] :pre [Description:] @@ -52,22 +53,22 @@ IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/get Reproducibility :h5 Each IM in OpenKIM is issued a unique identifier ("KIM ID"_https://openkim.org/about-kim-ids/), which includes a version number (last three digits). Any changes that can result in different numerical values lead to a version increment in the KIM ID. This makes it possible to reproduce simulations since the specific version of a specific IM used can be retrieved using its KIM ID. -OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues digitial object identifiers (DOIs) to all IMs archived in OpenKIM. This makes it possible to cite the IM code used in a simulation in a publications to give credit to the developers and further facilitate reproducibility. :ul +OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues digital object identifiers (DOIs) to all IMs archived in OpenKIM. This makes it possible to cite the IM code used in a simulation in a publications to give credit to the developers and further facilitate reproducibility. :ul Convenience :h5 IMs in OpenKIM are distributed in binary form along with LAMMPS and can be used in a LAMMPS input script simply by providing their KIM ID in the {kim_init} command documented on this page. (For more on using KIM with LAMMPS, see the KIM section of the "Packages details"_Packages_details.html doc page.) The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"https://openkim.org/getting-started/kim-tests/) as part of a LAMMPS input script setup and analysis. -Support is provided for unit conversion between the "units"_units.html system used in the LAMMPS input script and the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the liklihood of errors due to incompatible units. :ul +Support is provided for unit conversion between the "units"_units.html system used in the LAMMPS input script and the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the likelihood of errors due to incompatible units. :ul Types of KIM IMs :h4 There are two types of IMs archived in OpenKIM: -The first type is called a {KIM Model}. A KIM Model is an independent computer implemention of an IM written in one of the languages supported by KIM (C, C++, Fortran, Python), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that support the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). +The first type is called a {KIM Model}. A KIM Model is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran, Python), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that support the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). The second type is called a {KIM Simulator Model} (SM). In this case, the IM is implemented natively within the simulation code ({simulator}), i.e. LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol -With these two IM tpes, OpenKIM can archive and test almost all IMs that +With these two IM types, OpenKIM can archive and test almost all IMs that can be used by LAMMPS. (It is easy to contribute new IMs to OpenKIM, see the "upload instructions"_https://openkim.org/getting-started/adding-content/.) @@ -78,7 +79,7 @@ and supported species, separated by two underscores from the KIM ID itself, which begins with an IM code ({MO} for a KIM Model, and {SM} for a KIM Simulator Model) followed by a unique 12-digit code and a 3-digit version identifier. -By convension SM prefixes begin with {SM} to readily identify them. +By convention SM prefixes begin with {SM} to readily identify them. SW_StillingerWeber_1985_Si__MO_405512056662_005 Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 :pre @@ -89,7 +90,7 @@ in which case their designation does not have to conform to the KIM ID format. Using OpenKIM IMs with LAMMPS :h4 Two commands are employed when using OpenKIM IMs, one to select the -IM and perform necessary initializations ({kim_init}), and the second +IM and perform necessary initialization ({kim_init}), and the second to set up the IM for use by executing any necessary LAMMPS commands ({kim_interactions}). @@ -97,7 +98,7 @@ OpenKIM IM Initialization :h5 The kim_init command must be located at the top of the input script before any other commands. Input scripts containing a kim_init command -shoud {not} include a "units"_units.html command or an +should {not} include a "units"_units.html command or an "atom_style"_atom_style.html command. These are set by the kim_init command based on its arguments. @@ -188,25 +189,26 @@ correctly. OpenKIM IM Execution :h5 The second and final step in using an OpenKIM IM is to execute the -kim_interaction command. This command must be preceded by a kim_init +kim_interactions command. This command must be preceded by a kim_init command and must follow the "create_box"_create_box.html command, which defines the number of atom types {N}. -The kim_interaction command has one argument {typeargs}, which contains +The kim_interactions command has one argument {typeargs}, which contains a list of {N} chemical species that are mapped to the atom types. For example, imagine the OpenKIM IM supports Si and C species. If the LAMMPS simulation has 4 atom types and you want the first three to be Si, -and the fourth to be C, you would use the following kim_interaction command: +and the fourth to be C, you would use the following kim_interactions command: -kim_interaction Si Si Si C :pre +kim_interactions Si Si Si C +:pre -The kim_interaction command performs all the necessary steps to set up +The kim_interactions command performs all the necessary steps to set up the OpenKIM IM set in the kim_init command. The specific actions depend on whether the IM is a KIM Model or a KIM SM. For a KIM Model, a "pair_style kim"_pair_kim.html command will be executed followed by the appropriate pair_coeff command. -For a KIM SM, the set of commands defined in the SM speficiation file +For a KIM SM, the set of commands defined in the SM specification file will be executed. For example, consider the ReaxFF SM due to Strachan et al. (2003) executed by the following commands: @@ -306,7 +308,7 @@ changes to input script or command syntax between the two LAMMPS versions. [Restrictions:] -This command is part of the KIM package. It is only enabled if +These commands are part of the KIM package. It is only enabled if LAMMPS was built with that package. Furthermore, its correct functioning depends on compiling LAMMPS with all required packages installed that are required by the commands embedded in any KIM @@ -315,4 +317,4 @@ See the "Build package"_Build_package.html doc page for more info. [Related commands:] -"pair_style kim"_pair_kim.html, "kim_query"_kim_query.html +"pair_style kim"_pair_kim.html, "units"_units.html diff --git a/doc/src/pair_kim.txt b/doc/src/pair_kim.txt index 523bd89d7c..7e399b7ce0 100644 --- a/doc/src/pair_kim.txt +++ b/doc/src/pair_kim.txt @@ -112,7 +112,7 @@ kim-api package version 2.0.0 and higher. [Related commands:] -"pair_coeff"_pair_coeff.html, "kim_style"_kim_style.html, -"kim_query"_kim_query.html +"pair_coeff"_pair_coeff.html, "kim_init"_kim_commands.html, +"kim_interactions"_kim_commands, "kim_query"_kim_commands.html [Default:] none diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index a8bfa8f193..6a75f0555a 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1606,6 +1606,7 @@ meso mesoparticle mesoscale mesoscopic +metadata metadynamics Metadynamics Methfessel @@ -2271,6 +2272,7 @@ rcutfac rdc rdf RDideal +rdx README realtime reamin @@ -2297,6 +2299,8 @@ Rensselaer reparameterizing repo representable +Reproducibility +reproducibility repuls rescale rescaled @@ -2585,6 +2589,7 @@ Stoll stopstep Stouch Straatsma +Strachan Stratford Strathclyde Straub @@ -2822,6 +2827,7 @@ undump uniaxial uniaxially unimodal +unitarg unitless Universite unix -- GitLab From c9cb6e3658e66f4cf9086e9ed50232e477f7ed3e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 13:12:23 -0400 Subject: [PATCH 043/236] remove obsolete files --- doc/src/kim_query.txt | 47 ------------------- doc/src/kim_style.txt | 107 ------------------------------------------ 2 files changed, 154 deletions(-) delete mode 100644 doc/src/kim_query.txt delete mode 100644 doc/src/kim_style.txt diff --git a/doc/src/kim_query.txt b/doc/src/kim_query.txt deleted file mode 100644 index 84eca6e676..0000000000 --- a/doc/src/kim_query.txt +++ /dev/null @@ -1,47 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Commands_all.html) - -:line - -kim_query command :h3 - -[Syntax:] - -kim_query variable query_function web_query_flags :pre - -variable = name of a (string style) variable where the result of the query is stored -query_function = name of the OpenKIM web API query function to be used -web_query_flags = a series of keyword=value pairs that represent the web query; supported keywords depend on query function :ul - -[Examples:] - -kim_query latconst get_test_result test=TE_156715955670 model=MO_800509458712 & - prop=structure-cubic-crystal-npt species=\["Al"\] keys=\["a"\] units=\["angstrom"\] :pre - -[Description:] - -The kim_query command allows to retrieve properties from the OpenKIM -through a web query. The result is stored in a string style -"variable"_variable.html, the name of which must be given as the first -argument of the kim_query command. The second required argument is the -name of the actual query function (e.g. {get_test_result}). All following -arguments are parameters handed over to the web query in the format -{keyword=value}. The list of supported keywords and the type of how -the value has to be encoded depends on the query function used. This -mirrors the functionality available on the OpenKIM webpage at -"https://query.openkim.org"_https://query.openkim.org/ - -[Restrictions:] - -This command is part of the KIM package. It is only enabled if -LAMMPS was built with that package. Furthermore, its correct -functioning depends on compiling LAMMPS with libcurl support. -See the "Build package"_Build_package.html doc page for more info. - -[Related commands:] - -"pair_style kim"_pair_kim.html, "kim_style"_kim_style.html, -"variable"_variable.html diff --git a/doc/src/kim_style.txt b/doc/src/kim_style.txt deleted file mode 100644 index c24cfe8581..0000000000 --- a/doc/src/kim_style.txt +++ /dev/null @@ -1,107 +0,0 @@ -"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c - -:link(lws,http://lammps.sandia.gov) -:link(ld,Manual.html) -:link(lc,Commands_all.html) - -:line - -kim_style command :h3 - -[Syntax:] - -kim_style mode args :pre - -mode = {init model} or {define typeargs} or no mode chosen -model = name of the KIM model (KIM potential or KIM simulator model) -typeargs = atom type to species mapping (one entry per atom type) -args = {unit_variables unit_style} or {unit_from unit_style} (optional):ul - -[Examples:] - -kim_style init ex_sim_model_Si_mod_tersoff unit_variables metal -kim_style define Si Si -kim_style unit_variables real -kim_style init LennardJones_Ar unit_variables metal -kim_style unit_variables real unit_from metal -kim_style define Ar :pre - -[Description:] - -The kim_style command is a high-level wrapper around the -"Knowledge Base for Interatomic Models (OpenKIM)"_https://openkim.org -repository of interatomic potentials, so that they can be used by -LAMMPS scripts. It does not implement any computations directly, but -rather will generate LAMMPS input commands based on the information -retrieved from the OpenKIM repository. It is able to realize so-called -"KIM Simulator Models", which are OpenKIM repository entries of models -using native features of the simulation engine in use, i.e. LAMMPS -in this case, but it also supports realizing conventional KIM models -implicitly via generating a "pair_style kim"_pair_kim.html command -followed by a suitable "pair_coeff"_pair_coeff.html command. - -The kim_style command has two modes, {init} and {define}, indicated by -the first argument to the kim_style command. An {init} mode command -must be issued [before] the simulation box is created, while the {define} -mode version may only be used [after] the simulation box exists. Both -are required. The {init} mode version sets the model name and may issue -additional commands changing LAMMPS default settings that are required -for using a selected simulator model. If needed, those settings can be -overridden. The second argument to the {kim_style init} command is the -KIM model ID. - -In both modes, the keywords {unit_variables} and {unit_from} may be -added. They control the values of a set of -"internal style variables"_variable.html that can be used to convert -between different unit styles in LAMMPS. The argument to -each keyword is a LAMMPS unit style or NULL, which means to look up -the unit style from what was set with the "units"_units.html command. -Please note, that KIM simulator models will set their preferred unit style. -By default all conversion variables are set to 1.0. Converting to or -from the "lj" unit style is not supported. The following variables are defined: - -_u_length -_u_mass -_u_time :ul - - -The {kim_style define} command will issue commands that will realize -the selected model (through generating pair_style and pair_coeff commands, -but also other commands, as required). It has to be issued [after] the -the simulation box is defined. The {kim_style define} command allows a -varying number of additional arguments. Those are used to map the atom -types in LAMMPS to the available species in the KIM model. This is -equivalent to the arguments following "pair_coeff * *" in a -"kim"_pair_kim.html pair style. Thus the commands: - -kim_style init LennardJones_Ar -kim_style define Ar :pre - -will generate the LAMMPS input commands: - -pair_style kim LennardJones_Ar -pair_coeff * * Ar :pre - -For simulator models, the generated input commands may be more complex -and require that LAMMPS is built with the required packages included. -The commands generated by the kim_style command, can be copied to the -screen or log file, through the "echo"_echo.html command. -The kim_style command will also validate, that a selected simulator -model was generated for the LAMMPS MD code and not some other software. -In addition, the version strings for LAMMPS version used for defining -the simulator model and the LAMMPS version being currently run are -printed, so that it can be tracked down, if there are any incompatible -changes to input script or command syntax between the two LAMMPS versions. - -[Restrictions:] - -This command is part of the KIM package. It is only enabled if -LAMMPS was built with that package. Furthermore, its correct -functioning depends on compiling LAMMPS with all required packages -installed that are required by the commands embedded in any KIM -simulator models used. -See the "Build package"_Build_package.html doc page for more info. - -[Related commands:] - -"pair_style kim"_pair_kim.html, "kim_query"_kim_query.html -- GitLab From ac82aa754b583886e193471bc042635c9c82955c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 13:13:05 -0400 Subject: [PATCH 044/236] correct off-by-one error and simplify code by using std::string instead of std::stringstream --- src/KIM/kim_init.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 695db0aa0d..6339f7397e 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -246,7 +246,7 @@ void KimInit::determine_model_type_and_units(char * model_name, if (*sim_field == "units") { kim_SM->GetSimulatorFieldLine(i,0,&sim_value); - int len=(*sim_value).length(); + int len=(*sim_value).length()+1; *model_units = new char[len]; strcpy(*model_units,sim_value->c_str()); break; } @@ -414,15 +414,16 @@ void KimInit::do_variables(char *user_units, char *model_units) (char *)"density"}; if (comm->me == 0) { - std::stringstream mesg; - mesg << "# Conversion factors from " << from << " to " << to - << ":" << std::endl; - if (screen) fputs(mesg.str().c_str(),screen); - if (logfile) fputs(mesg.str().c_str(),logfile); + std::string mesg("# Conversion factors from "); + mesg += from; + mesg += " to "; + mesg += to; + mesg += ":\n"; + if (screen) fputs(mesg.c_str(),screen); + if (logfile) fputs(mesg.c_str(),logfile); } - for (int i = 0; i < nunits; i++) - { + for (int i = 0; i < nunits; i++) { var_str = std::string("_u_") + std::string(units[i]); args[0] = (char *)var_str.c_str(); v_unit = variable->find(args[0]); -- GitLab From c557c7492b4ce0ab90ca80e2ba6c100b9a83c825 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 13:31:12 -0400 Subject: [PATCH 045/236] adapt names of stored properties to code that uses fix STORE/KIM --- src/KIM/fix_store_kim.cpp | 43 ++++++++++++++++++--------------------- src/KIM/fix_store_kim.h | 4 ++-- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/src/KIM/fix_store_kim.cpp b/src/KIM/fix_store_kim.cpp index 6423a57e18..8209a6d13e 100644 --- a/src/KIM/fix_store_kim.cpp +++ b/src/KIM/fix_store_kim.cpp @@ -66,7 +66,7 @@ using namespace FixConst; FixStoreKIM::FixStoreKIM(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg), simulator_model(NULL), model_name(NULL), - units_from(NULL), units_to(NULL) + model_units(NULL), user_units(NULL) { if (narg != 3) error->all(FLERR,"Illegal fix STORE/KIM command"); } @@ -89,16 +89,15 @@ FixStoreKIM::~FixStoreKIM() model_name = NULL; } - if (units_from) { - char *uf = (char *)units_from; - delete[] uf; - units_from = NULL; + if (model_units) { + char *mu = (char *)model_units; + delete[] mu; + model_units = NULL; } - - if (units_to) { - char *ut = (char *)units_to; - delete[] ut; - units_to = NULL; + if (user_units) { + char *uu = (char *)user_units; + delete[] uu; + user_units = NULL; } } @@ -127,19 +126,17 @@ void FixStoreKIM::setptr(const char *name, void *ptr) delete[] mn; } model_name = ptr; - } else if (strcmp(name,"units_from") == 0) { - if (units_from) { - char *uf = (char *)units_from; - delete[] uf; + } else if (strcmp(name,"model_units") == 0) { + if (model_units) { + char *mu = (char *)model_units; + delete[] mu; } - units_from = ptr; - } else if (strcmp(name,"units_to") == 0) { - if (units_to) { - char *ut = (char *)units_to; - delete[] ut; + } else if (strcmp(name,"user_units") == 0) { + if (user_units) { + char *uu = (char *)user_units; + delete[] uu; } - units_to = ptr; - } + } else error->all(FLERR,"Unknown property in fix STORE/KIM"); } /* ---------------------------------------------------------------------- */ @@ -148,7 +145,7 @@ void *FixStoreKIM::getptr(const char *name) { if (strcmp(name,"simulator_model") == 0) return simulator_model; else if (strcmp(name,"model_name") == 0) return model_name; - else if (strcmp(name,"units_from") == 0) return units_from; - else if (strcmp(name,"units_to") == 0) return units_to; + else if (strcmp(name,"model_units") == 0) return model_units; + else if (strcmp(name,"user_units") == 0) return user_units; else return NULL; } diff --git a/src/KIM/fix_store_kim.h b/src/KIM/fix_store_kim.h index 5bca2a3dd0..655be83ad0 100644 --- a/src/KIM/fix_store_kim.h +++ b/src/KIM/fix_store_kim.h @@ -80,8 +80,8 @@ class FixStoreKIM : public Fix { private: void *simulator_model; // pointer to KIM simulator model class void *model_name; // string of KIM model name - void *units_from; // string of unit conversion origin or NULL - void *units_to; // string of unit conversion target or NULL + void *model_units; // string of unit conversion origin or NULL + void *user_units; // string of unit conversion target or NULL }; } -- GitLab From 065638edba999ab91b078e089b807d58c205b6ae Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 13:31:43 -0400 Subject: [PATCH 046/236] remove unused macro and reformat to closer match LAMMPS programming style --- src/KIM/kim_init.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 6339f7397e..0d8849c51c 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -79,10 +79,6 @@ extern "C" { #include "KIM_SimulatorModel.hpp" //@@@@@ -#define SNUM(x) \ - static_cast(std::ostringstream() \ - << std::dec << x).str() - using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ @@ -187,14 +183,11 @@ void KimInit::determine_model_type_and_units(char * model_name, model_type = MO; KIM_Model_Destroy(&kim_MO); - if (units_accepted) - { + if (units_accepted) { int len=strlen(user_units); *model_units = new char[len]; strcpy(*model_units,user_units); return; - } - else if (unit_conversion_mode) - { + } else if (unit_conversion_mode) { int const num_systems = 5; char const * const systems[num_systems] = {"metal", "real", "si", "cgs", "electron"}; -- GitLab From 27d1f79fe37e5ba2153590731092997d0bdf9890 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 13:39:12 -0400 Subject: [PATCH 047/236] simplify another case of stringstream to use plain std::string --- src/KIM/kim_init.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 0d8849c51c..1ca55d7adc 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -246,12 +246,11 @@ void KimInit::determine_model_type_and_units(char * model_name, } KIM::SimulatorModel::Destroy(&kim_SM); - if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) - { - std::stringstream mesg; - mesg << "Incompatible units for KIM Simulator Model, required units = " - << *model_units; - error->all(FLERR,mesg.str().c_str()); + if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) { + std::string mesg("Incompatible units for KIM Simulator Model, " + "required units = "); + mesg += *model_units; + error->all(FLERR,mesg.c_str()); } } -- GitLab From c6d0f807b569bdf6ab6e9ed0665ca81d80f1d3d5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 14:13:24 -0400 Subject: [PATCH 048/236] output messages that would otherwise only show up in logs only when logs are enable for screen or logfile --- src/KIM/kim_init.cpp | 16 ++++++++-------- src/KIM/kim_interactions.cpp | 4 ++-- src/input.h | 6 ++++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 1ca55d7adc..ce1b944792 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -363,8 +363,8 @@ void KimInit::kim_init_log_delimiter(std::string const begin_end) const mesg = "#=== END kim-init ============================================\n\n"; - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); + if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); + if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); } } @@ -411,8 +411,8 @@ void KimInit::do_variables(char *user_units, char *model_units) mesg += " to "; mesg += to; mesg += ":\n"; - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); + if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); + if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); } for (int i = 0; i < nunits; i++) { @@ -441,12 +441,12 @@ void KimInit::do_variables(char *user_units, char *model_units) << " internal " << std::setprecision(12) << std::scientific << conversion_factor << std::endl; - if (screen) fputs(mesg.str().c_str(),screen); - if (logfile) fputs(mesg.str().c_str(),logfile); + if ((screen) && (input->echo_screen)) fputs(mesg.str().c_str(),screen); + if ((logfile) && (input->echo_log)) fputs(mesg.str().c_str(),logfile); } } if (comm->me == 0) { - if (screen) fputs("#\n",screen); - if (logfile) fputs("#\n",logfile); + if ((screen) && (input->echo_screen)) fputs("#\n",screen); + if ((logfile) && (input->echo_log)) fputs("#\n",logfile); } } diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp index 491d406ae6..4771272ff8 100644 --- a/src/KIM/kim_interactions.cpp +++ b/src/KIM/kim_interactions.cpp @@ -109,8 +109,8 @@ void KimInteractions::kim_interactions_log_delimiter( mesg = "#=== END kim_interactions ====================================\n\n"; - if (screen) fputs(mesg.c_str(),screen); - if (logfile) fputs(mesg.c_str(),logfile); + if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); + if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); } } diff --git a/src/input.h b/src/input.h index 47ad7779f1..ebd015619c 100644 --- a/src/input.h +++ b/src/input.h @@ -25,6 +25,8 @@ class Input : protected Pointers { friend class Info; friend class Error; friend class Deprecated; + friend class KimInit; + friend class KimInteractions; public: int narg; // # of command args @@ -42,14 +44,14 @@ class Input : protected Pointers { protected: char *command; // ptr to current command + int echo_screen; // 0 = no, 1 = yes + int echo_log; // 0 = no, 1 = yes private: int me; // proc ID int maxarg; // max # of args in arg char *line,*copy,*work; // input line & copy and work string int maxline,maxcopy,maxwork; // max lengths of char strings - int echo_screen; // 0 = no, 1 = yes - int echo_log; // 0 = no, 1 = yes int nfile,maxfile; // current # and max # of open input files int label_active; // 0 = no label, 1 = looking for label char *labelstr; // label string being looked for -- GitLab From 493269431c354d5177a10acaec2b94c3aed18b67 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 14:16:38 -0400 Subject: [PATCH 049/236] add a few more false positives --- doc/utils/sphinx-config/false_positives.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index 6a75f0555a..5ea7388cd6 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -570,6 +570,7 @@ Dihedrals dihydride Dij dimdim +dimensioned dimensionality dimgray dipolar @@ -599,6 +600,7 @@ Dobson Dodds dodgerblue dof +doi Donadio dotc Doty @@ -749,6 +751,7 @@ equilibrating equilibration Equilibria equilization +Ercolessi eradius erate erc @@ -2243,6 +2246,7 @@ quati quatj quatk quatw +queryargs Queteschiner qw qx -- GitLab From b2ba0550d70d6829fa3b2b40a86025e2faf95a2e Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Sun, 23 Jun 2019 13:18:57 -0500 Subject: [PATCH 050/236] Some minor typo fixes in kim_commands.txt --- doc/src/kim_commands.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 2e94271763..e51aec5dc7 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -71,7 +71,7 @@ Types of KIM IMs :h4 There are two types of IMs archived in OpenKIM: -The first type is called a {KIM Model}. A KIM Model is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran, Python), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that support the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). +The first type is called a {KIM Model}. A KIM Model is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that supports the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). The second type is called a {KIM Simulator Model} (SM). In this case, the IM is implemented natively within the simulation code ({simulator}), i.e. LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol With these two IM types, OpenKIM can archive and test almost all IMs that @@ -212,13 +212,13 @@ The second and final step in using an OpenKIM IM is to execute the {kim_interactions} command. This command must be preceded by a {kim_init} command and a "create_box"_create_box.html command, which defines the number of atom types {N}. -The {kim_interaction} command has one argument {typeargs}. This argument +The {kim_interactions} command has one argument {typeargs}. This argument contains a list of {N} chemical species, which defines a mapping between atom types in LAMMPS to the available species in the OpenKIM IM. For example, consider an OpenKIM IM that supports Si and C species. If the LAMMPS simulation has four atom types, where the first three are Si, -and the fourth is C, the following {kim_interaction} command would be used: +and the fourth is C, the following {kim_interactions} command would be used: kim_interactions Si Si Si C :pre @@ -376,4 +376,3 @@ doi: "https://doi.org/10.1007/s11837-011-0102-6"_https://doi.org/10.1007/s11837- :link(kim-api) [(Elliott)] Elliott, Tadmor and Bernstein, "https://openkim.org/kim-api"_https://openkim.org/kim-api (2011) doi: "https://doi.org/10.25950/FF8F563A"_https://doi.org/10.25950/FF8F563A - -- GitLab From e42e1e64a894e7b52c3c75a8b830918819cfdafa Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 14:50:52 -0500 Subject: [PATCH 051/236] Added explanation on Model and SM pages --- doc/src/kim_commands.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index e51aec5dc7..5a50a76879 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -90,6 +90,24 @@ By convention SM prefixes begin with {Sim_} to readily identify them. SW_StillingerWeber_1985_Si__MO_405512056662_005 Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 :pre +Each OpenKIM IM has a dedicated page on "OpenKIM"_https://openkim.org +providing all the information on the IM including a title, description, +authorship and citation information, test and verification check results, +visualizations of results, a wiki with documentation and user comments, and +access to raw files, and other information. +This is referred to as the "Model Page" or "SM Page". +The URL for such a page is constructed from the +"extended KIM ID"_https://openkim.org/about-kim-ids/ of the IM: + +https://openkim.org/id/extended_KIM_ID +:pre + +For example for the Stillinger-Weber potential +listed above the Model Page is located at: + +"https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005"_https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005 +:pre + NOTE: It is also possible to locally install IMs not archived in OpenKIM, in which case their names do not have to conform to the KIM ID format. -- GitLab From 36649f0534d3b20211953c1dbecedc33e7dd3857 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 16:47:12 -0400 Subject: [PATCH 052/236] add workaround for handline include files --- src/input.cpp | 7 +++++++ src/input.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/input.cpp b/src/input.cpp index f88c8ca0c0..dd445b10f3 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -77,6 +77,7 @@ Input::Input(LAMMPS *lmp, int argc, char **argv) : Pointers(lmp) echo_screen = 0; echo_log = 1; + eof_return = 0; label_active = 0; labelstr = NULL; @@ -205,6 +206,7 @@ void Input::file() MPI_Bcast(&n,1,MPI_INT,0,world); if (n == 0) { if (label_active) error->all(FLERR,"Label wasn't found in input script"); + if (eof_return) break; if (me == 0) { if (infile != stdin) { fclose(infile); @@ -1051,6 +1053,11 @@ void Input::include() error->one(FLERR,str); } infiles[nfile++] = infile; + eof_return = 1; + file(); + eof_return = 0; + nfile--; + infile = infiles[nfile-1]; } } diff --git a/src/input.h b/src/input.h index ebd015619c..7fb125ffb5 100644 --- a/src/input.h +++ b/src/input.h @@ -46,6 +46,7 @@ class Input : protected Pointers { char *command; // ptr to current command int echo_screen; // 0 = no, 1 = yes int echo_log; // 0 = no, 1 = yes + int eof_return; // if 1: at EOF return from parsing in file() private: int me; // proc ID -- GitLab From bfe6cc29e81b84c6dada9bc9cbd942b3d0a21c93 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 17:52:43 -0400 Subject: [PATCH 053/236] fix bug of not storing pointers --- src/KIM/fix_store_kim.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/KIM/fix_store_kim.cpp b/src/KIM/fix_store_kim.cpp index 8209a6d13e..c9a99acca9 100644 --- a/src/KIM/fix_store_kim.cpp +++ b/src/KIM/fix_store_kim.cpp @@ -131,11 +131,13 @@ void FixStoreKIM::setptr(const char *name, void *ptr) char *mu = (char *)model_units; delete[] mu; } + model_units = ptr; } else if (strcmp(name,"user_units") == 0) { if (user_units) { char *uu = (char *)user_units; delete[] uu; } + user_units = ptr; } else error->all(FLERR,"Unknown property in fix STORE/KIM"); } -- GitLab From 6d54cf6a07d38d97be5157d4977ea831c10d9f48 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 17:53:12 -0400 Subject: [PATCH 054/236] programming style changes --- src/KIM/kim_init.cpp | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index ce1b944792..080e3dac3f 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -90,10 +90,10 @@ void KimInit::command(int narg, char **arg) if (domain->box_exist) error->all(FLERR,"Must use 'kim_init' command before " "simulation box is defined"); - int len0 = strlen(arg[0])+1; - int len1 = strlen(arg[1])+1; - char *model_name = new char[len0]; strcpy(model_name,arg[0]); - char *user_units = new char[len1]; strcpy(user_units,arg[1]); + char *model_name = new char[strlen(arg[0])+1]; + strcpy(model_name,arg[0]); + char *user_units = new char[strlen(arg[1])+1]; + strcpy(user_units,arg[1]); if (narg == 3) { if (strcmp(arg[2],"unit_conversion_mode")==0) unit_conversion_mode = true; else { error->all(FLERR,"Illegal kim_init command"); } @@ -178,21 +178,19 @@ void KimInit::determine_model_type_and_units(char * model_name, &units_accepted, &kim_MO); - if (!kim_error) // model is an MO - { + if (!kim_error) { // model is an MO model_type = MO; KIM_Model_Destroy(&kim_MO); if (units_accepted) { - int len=strlen(user_units); - *model_units = new char[len]; strcpy(*model_units,user_units); + *model_units = new char[strlen(user_units)+1]; + strcpy(*model_units,user_units); return; } else if (unit_conversion_mode) { int const num_systems = 5; char const * const systems[num_systems] = {"metal", "real", "si", "cgs", "electron"}; - for (int i=0; i < num_systems; ++i) - { + for (int i=0; i < num_systems; ++i) { get_kim_unit_names(systems[i], lengthUnit, energyUnit, chargeUnit, temperatureUnit, timeUnit, error); kim_error = KIM_Model_Create(KIM_NUMBERING_zeroBased, @@ -205,17 +203,13 @@ void KimInit::determine_model_type_and_units(char * model_name, &units_accepted, &kim_MO); KIM_Model_Destroy(&kim_MO); - if (units_accepted) - { - int len=strlen(systems[i]); - *model_units = new char[len]; strcpy(*model_units,systems[i]); + if (units_accepted) { + *model_units = new char[strlen(systems[i])+1]; + strcpy(*model_units,systems[i]); return; } - } - error->all(FLERR,"KIM Model does not support any lammps unit system"); - } - else - { + } error->all(FLERR,"KIM Model does not support any lammps unit system"); + } else { error->all(FLERR,"KIM Model does not support the requested unit system"); } } @@ -223,9 +217,7 @@ void KimInit::determine_model_type_and_units(char * model_name, KIM::SimulatorModel * kim_SM; kim_error = KIM::SimulatorModel::Create(model_name, &kim_SM); if (kim_error) - { error->all(FLERR,"KIM model name not found"); - } model_type = SM; int sim_fields; @@ -257,7 +249,7 @@ void KimInit::determine_model_type_and_units(char * model_name, /* ---------------------------------------------------------------------- */ -void KimInit::do_init(char *model_name, char *user_units, char* model_units) +void KimInit::do_init(char *model_name, char *user_units, char *model_units) { // create storage proxy fix. delete existing fix, if needed. @@ -322,8 +314,7 @@ void KimInit::do_init(char *model_name, char *user_units, char* model_units) cmd += model_units; input->one(cmd.c_str()); - if (model_type == SM) - { + if (model_type == SM) { int sim_fields, sim_lines; const std::string *sim_field, *sim_value; simulatorModel->GetNumberOfSimulatorFields(&sim_fields); -- GitLab From d10fdda6765c6cbe905509bf3eae7888cadb00ad Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 23 Jun 2019 17:53:52 -0400 Subject: [PATCH 055/236] simplify nested include file handling --- src/input.cpp | 17 ++--------------- src/input.h | 1 - 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index dd445b10f3..268be5b774 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -77,7 +77,6 @@ Input::Input(LAMMPS *lmp, int argc, char **argv) : Pointers(lmp) echo_screen = 0; echo_log = 1; - eof_return = 0; label_active = 0; labelstr = NULL; @@ -206,18 +205,7 @@ void Input::file() MPI_Bcast(&n,1,MPI_INT,0,world); if (n == 0) { if (label_active) error->all(FLERR,"Label wasn't found in input script"); - if (eof_return) break; - if (me == 0) { - if (infile != stdin) { - fclose(infile); - infile = NULL; - } - nfile--; - } - MPI_Bcast(&nfile,1,MPI_INT,0,world); - if (nfile == 0) break; - if (me == 0) infile = infiles[nfile-1]; - continue; + break; } if (n > maxline) reallocate(line,maxline,n); @@ -1053,9 +1041,8 @@ void Input::include() error->one(FLERR,str); } infiles[nfile++] = infile; - eof_return = 1; file(); - eof_return = 0; + fclose(infile); nfile--; infile = infiles[nfile-1]; } diff --git a/src/input.h b/src/input.h index 7fb125ffb5..ebd015619c 100644 --- a/src/input.h +++ b/src/input.h @@ -46,7 +46,6 @@ class Input : protected Pointers { char *command; // ptr to current command int echo_screen; // 0 = no, 1 = yes int echo_log; // 0 = no, 1 = yes - int eof_return; // if 1: at EOF return from parsing in file() private: int me; // proc ID -- GitLab From b5d4cf4bfdff3b33a76198bcdb070798bbe908ab Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 17:23:21 -0500 Subject: [PATCH 056/236] Updated KIM package information --- doc/src/Packages_details.txt | 51 ++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/doc/src/Packages_details.txt b/doc/src/Packages_details.txt index d6e8f8639f..bf71e058f5 100644 --- a/doc/src/Packages_details.txt +++ b/doc/src/Packages_details.txt @@ -338,27 +338,37 @@ KIM package :link(PKG-KIM),h4 [Contents:] -A "pair_style kim"_pair_kim.html command which is a wrapper on the -Knowledge Base for Interatomic Models (KIM) repository of interatomic -potentials, enabling any of them to be used in LAMMPS simulations. -Also a "kim_query"_kim_commands.html command, which allows to query -the OpenKIM database for stored properties, and the commands -"kim_init and kim_interactions"_kim_commands.html, which serve as -front end to generating LAMMPS input on-the-fly for KIM simulator -models and native KIM models. - -To use this package you must have the KIM library available on your -system. +This package contains a set of commands that serve as a wrapper on the +"Open Knowledgebase of Interatomic Models (OpenKIM)"_https://openkim.org +repository of interatomic models (IMs) +enabling compatible ones to be used in LAMMPS simulations. +This includes "kim_init and kim_interactions"_kim_commands.html +commands to select, initialize and instantiate the IM, and a +"kim_query"_kim_commands.html command to perform web queries +for material property predictions of OpenKIM IMs. +Support for KIM IMs that conform to the +"KIM Application Programming Interface (API)"_https://openkim.org/kim-api/ +is provided by the "pair_style kim"_pair_kim.html command. + +NOTE: The command {pair_style kim} is called by {kim_interactions} and +is not recommended to be directly used in input scripts. + +To use this package you must have the KIM API library available on your +system. The KIM API is available for download on the +"OpenKIM website"_https://openkim.org/kim-api/. +When installing LAMMPS from binary, the kim-api package +is a dependency that is automatically downloaded and installed. Information about the KIM project can be found at its website: -https://openkim.org. The KIM project is led by Ellad Tadmor and Ryan -Elliott (U Minnesota). +"https://openkim.org"_https://openkim.org. +The KIM project is led by Ellad Tadmor and Ryan Elliott (U Minnesota) +and is funded by the "National Science Foundation"_https://www.nsf.gov/. [Authors:] Ryan Elliott (U Minnesota) is the main developer for the KIM -API which the "pair_style kim"_pair_kim.html command uses. He developed -the pair style. Axel Kohlmeyer (Temple U) contributed the -"kim_query"_kim_commands.html and "kim_init"_kim_commands.html commands -in close collaboration with Ryan. +API and the {pair_style kim} command. Axel Kohlmeyer (Temple U) and +Ellad Tadmor (U Minnesota) contributed to the "kim_commands"_kim_commands.html +interface in close collaboration with Ryan Elliott. + [Install:] @@ -368,10 +378,11 @@ extras"_Build_extras.html doc page. [Supporting info:] +"kim_commands"_kim_commands.html +"pair_style kim"_pair_kim.html src/KIM: filenames -> commands src/KIM/README lib/kim/README -"pair_style kim"_pair_kim.html examples/kim :ul :line @@ -987,9 +998,9 @@ USER-ADIOS package :link(PKG-USER-ADIOS),h4 [Contents:] -ADIOS is a high-performance I/O library. This package implements the +ADIOS is a high-performance I/O library. This package implements the dump "atom/adios" and dump "custom/adios" commands to write data using -the ADIOS library. +the ADIOS library. [Authors:] Norbert Podhorszki (ORNL) from the ADIOS developer team. -- GitLab From 881f9ff04337c6e743f2fa9a7e0b71af28e85107 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 17:36:10 -0500 Subject: [PATCH 057/236] Updated the pair_kim docs --- doc/src/pair_kim.txt | 85 ++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 46 deletions(-) diff --git a/doc/src/pair_kim.txt b/doc/src/pair_kim.txt index 7e399b7ce0..86d13808b0 100644 --- a/doc/src/pair_kim.txt +++ b/doc/src/pair_kim.txt @@ -12,76 +12,71 @@ pair_style kim command :h3 pair_style kim model :pre -model = name of KIM model (potential) +model = name of a KIM model (the KIM ID for models archived in OpenKIM) [Examples:] -pair_style kim ex_model_Ar_P_LJ -pair_coeff * * Ar Ar :pre +pair_style kim SW_StillingerWeber_1985_Si__MO_405512056662_005 +pair_coeff * * Si :pre [Description:] -This pair style is a wrapper on the "Knowledge Base for Interatomic +This pair style is a wrapper on the "Open Knowledgebase of Interatomic Models (OpenKIM)"_https://openkim.org repository of interatomic -potentials, so that they can be used by LAMMPS scripts. +potentials to enable their use in LAMMPS scripts. -Note that in LAMMPS lingo, a KIM model driver is a pair style -(e.g. EAM or Tersoff). A KIM model is a pair style for a particular -element or alloy and set of parameters, e.g. EAM for Cu with a -specific EAM potential file. +The preferred interface for using interatomic models archived in +OpenKIM is the "kim_commands interface"_kim_commands.html. That +interface supports both "KIM Models" that conform to the KIM API +and can be used by any KIM-compliant simulation code, and +"KIM Simulator Models" that are natively implemented within a single +simulation code (like LAMMPS) and can only be used with it. +The {pair_style kim} command is limited to KIM Models. It is +used by the "kim_commands interface"_kim_commands.html as needed. -See the current list of "KIM model -drivers"_https://openkim.org/browse/model-drivers/alphabetical. +NOTE: Since {pair_style kim} is called by {kim_interactions} as needed, +is not recommended to be directly used in input scripts. -See the current list of all "KIM -models"_https://openkim.org/browse/models/by-model-drivers - -To use this pair style, you must first download and install the KIM -API library from the "OpenKIM website"_https://openkim.org. The KIM -section of the "Packages details"_Packages_details.html doc page has -instructions on how to do this with a simple make command, when -building LAMMPS. - -See the examples/kim dir for an input script that uses a KIM model -(potential) for Lennard-Jones. - :line The argument {model} is the name of the KIM model for a specific -potential as KIM defines it. In principle, LAMMPS can invoke any KIM -model. You should get an error or warning message from either LAMMPS -or KIM if there is an incompatibility. - -Only a single pair_coeff command is used with the {kim} style which -specifies the mapping of LAMMPS atom types to KIM elements. This is -done by specifying N additional arguments after the * * in the -pair_coeff command, where N is the number of LAMMPS atom types: +potential as KIM defines it. For potentials archived in OpenKIM +this is the extended KIM ID (see "kim_commands"_kim_commands.html +for details). LAMMPS can invoke any KIM Model, however there can +be incompatibilities (for example unit matching issues). +In the event of an incompatibility, the code will terminate with +an error message. Check both the LAMMPS and KIM log files for details. + +Only a single {pair_coeff} command is used with the {kim} style, which +specifies the mapping of LAMMPS atom types to the species supported by +the KIM Model. This is done by specifying {N} additional arguments +after the * * in the {pair_coeff} command, where {N} is the number of +LAMMPS atom types: N element names = mapping of KIM elements to atom types :ul -As an example, imagine the KIM model supports Si and C atoms. If your -LAMMPS simulation has 4 atom types and you want the 1st 3 to be Si, -and the 4th to be C, you would use the following pair_coeff command: +For example, consider a KIM Model that supports Si and C species. +If the LAMMPS simulation has four atom types, where the first three are Si, +and the fourth is C, the following {pair_coeff} command would be used: pair_coeff * * Si Si Si C :pre -The 1st 2 arguments must be * * so as to span all LAMMPS atom types. -The first three Si arguments map LAMMPS atom types 1,2,3 to Si as -defined within KIM. The final C argument maps LAMMPS atom type 4 to C -as defined within KIM. +The first two arguments must be * * so as to span all LAMMPS atom types. +The first three Si arguments map LAMMPS atom types 1, 2, and 3 to Si as +defined within KIM Model. The final C argument maps LAMMPS atom type 4 to C. :line In addition to the usual LAMMPS error messages, the KIM library itself may generate errors, which should be printed to the screen. In this -case it is also useful to check the kim.log file for additional error +case it is also useful to check the {kim.log} file for additional error information. The file kim.log should be generated in the same directory where LAMMPS is running. To download, build, and install the KIM library on your system, see -the lib/kim/README file. Once you have done this and built LAMMPS +the {lib/kim/README} file. Once you have done this and built LAMMPS with the KIM package installed you can run the example input scripts -in examples/kim. +in {examples/kim}. :line @@ -103,16 +98,14 @@ This pair style can only be used via the {pair} keyword of the [Restrictions:] -This pair style is part of the KIM package. It is only enabled if -LAMMPS was built with that package. See the "Build -package"_Build_package.html doc page for more info. +This pair style is part of the KIM package. See details on +restrictions in "kim_commands"_kim_commands.html. This current version of pair_style kim is compatible with the kim-api package version 2.0.0 and higher. [Related commands:] -"pair_coeff"_pair_coeff.html, "kim_init"_kim_commands.html, -"kim_interactions"_kim_commands, "kim_query"_kim_commands.html +"pair_coeff"_pair_coeff.html, "kim_commands"_kim_commands.html [Default:] none -- GitLab From 94e1f87cb81ecd3b6f0d89e457ab94ae82f2641b Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 17:36:36 -0500 Subject: [PATCH 058/236] Moved some content from pair_kim docs to kim_commands --- doc/src/kim_commands.txt | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 5a50a76879..99ed068c44 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -67,7 +67,7 @@ The {kim_query} web query tool provides the ability to use the predictions of IM Support is provided for unit conversion between the "unit style"_units.html used in the LAMMPS input script and the units required by the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the likelihood of errors due to incompatible units. :ul :link(IM_types) -Types of KIM IMs :h4 +Types of IMs in OpenKIM :h4 There are two types of IMs archived in OpenKIM: @@ -108,6 +108,10 @@ listed above the Model Page is located at: "https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005"_https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005 :pre +See the "current list of KIM Models and SMs archived in OpenKIM"_https://openkim.org/browse/models/by-species. +This list is sorted by species and can be filtered to display only +IMs for certain species combinations. + NOTE: It is also possible to locally install IMs not archived in OpenKIM, in which case their names do not have to conform to the KIM ID format. @@ -118,6 +122,9 @@ IM and perform necessary initialization ({kim_init}), and the second to set up the IM for use by executing any necessary LAMMPS commands ({kim_interactions}). Both are required. +See the {examples/kim} directory for example input scripts that use KIM Models +and KIM SMs. + OpenKIM IM Initialization ({kim_init}) :h5 The {kim_init} mode command must be issued [before] @@ -375,11 +382,16 @@ OpenKIM to function. [Restrictions:] The set of {kim_commands} is part of the KIM package. It is only enabled if -LAMMPS was built with that package. Furthermore, its correct -functioning depends on compiling LAMMPS with all required packages -installed that are required by the commands embedded in any KIM -SM used. -See the "Build package"_Build_package.html doc page for more info. +LAMMPS is built with that package. A requirement for the KIM package, +is the KIM API library that must be downloaded from the +"OpenKIM website"_https://openkim.org/kim-api/ and installed before +LAMMPS is compiled. When installing LAMMPS from binary, the kim-api package +is a dependency that is automatically downloaded and installed. See the KIM +section of the "Packages details"_Packages_details.html for details. + +Furthermore, when using {kim_commands} to run KIM SMs, any packages required +by the native potential being used or other commands or fixes that it invokes +must be installed. [Related commands:] -- GitLab From d150feb41aa7c13858d56d8dd7ac18212e626492 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 17:46:00 -0500 Subject: [PATCH 059/236] Small change to KIM package build --- doc/src/Build_extras.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/src/Build_extras.txt b/doc/src/Build_extras.txt index 220e9420fc..38d50522bb 100644 --- a/doc/src/Build_extras.txt +++ b/doc/src/Build_extras.txt @@ -177,11 +177,12 @@ use with LAMMPS. If you want to use the "kim_query"_kim_commands.html command, you also need to have libcurl installed with the matching development headers and the curl-config tool. -Note that in LAMMPS lingo, a KIM model driver is a pair style +Note that in LAMMPS jargon, a KIM model driver is a pair style (e.g. EAM or Tersoff). A KIM model is a pair style for a particular element or alloy and set of parameters, e.g. EAM for Cu with a -specific EAM potential file. Also note that downloading and installing -the KIM API library with all its models, may take a long time (10s of +specific EAM potential file. Also note that when downloading and +installing from source +the KIM API library with all its models, may take a long time (tens of minutes to hours) to build. Of course you only need to do that once. See the list of KIM model drivers here: -- GitLab From cf008c163def0bf64d77c8602b092cf4268261ed Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 18:01:35 -0500 Subject: [PATCH 060/236] Corrected box rescaling --- doc/src/kim_commands.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 99ed068c44..f039202e4e 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -225,7 +225,16 @@ from a file. For example if a configuration of atoms is read in from a dump file using the "read_dump"_read_dump.html command, the following can be done to convert the box and all atomic positions to the correct units: -change_box all x scale $\{_u_distance\} y scale $\{_u_distance\} z scale $\{_u_distance\} remap :pre +variable xyfinal equal xy*$\{_u_distance\} +variable xzfinal equal xz*$\{_u_distance\} +variable yzfinal equal yz*$\{_u_distance\} +change_box all x scale $\{_u_distance\} & +               y scale $\{_u_distance\} & +               z scale $\{_u_distance\} & +               xy final $\{xyfinal\} & +               xz final $\{xzfinal\} & +               yz final $\{yzfinal\} & +               remap :pre NOTE: Unit conversion will only work if the conversion factors are placed in all appropriate places in the input script. It is up to the user to do this -- GitLab From bfd0c4228d3505da1fad1028cb1629cab68375a6 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Sun, 23 Jun 2019 18:29:59 -0500 Subject: [PATCH 061/236] Added text that ADP potentials are available in KIM as well as NIST --- doc/src/pair_adp.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/src/pair_adp.txt b/doc/src/pair_adp.txt index fc888ffbff..d5b07e8431 100644 --- a/doc/src/pair_adp.txt +++ b/doc/src/pair_adp.txt @@ -42,16 +42,18 @@ the ADP potential files themselves. Likewise, the ADP potential files list atomic masses; thus you do not need to use the "mass"_mass.html command to specify them. -The NIST WWW site distributes and documents ADP potentials: +[ADP potentials are available from:] -http://www.ctcms.nist.gov/potentials :pre +The NIST WWW site at http://www.ctcms.nist.gov/potentials. +Note that ADP potentials obtained from NIST must be converted +into the extended DYNAMO {setfl} format discussed below. +:l -Note that these must be converted into the extended DYNAMO {setfl} -format discussed below. +The OpenKIM Project at https://openkim.org provides ADP potentials +as Simulator Models that can be used directly in LAMMPS with +the "kim_commands interface"_kim_commands.html. +:l -The NIST site is maintained by Chandler Becker (cbecker at nist.gov) -who is good resource for info on interatomic potentials and file -formats. :line -- GitLab From 7afcfccf48fb06deccf9d185cabc377a5124d437 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 24 Jun 2019 13:51:41 -0400 Subject: [PATCH 062/236] follow convention to list all commands in a file as header --- doc/src/kim_commands.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index f039202e4e..2aa705b483 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -6,7 +6,9 @@ :line -kim_commands :h3 +kim_init command :h3 +kim_interactions command :h3 +kim_query command :h3 [Syntax:] -- GitLab From f2380a24ef90945f421a90e5d482c58e0bef49b5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 24 Jun 2019 14:27:05 -0400 Subject: [PATCH 063/236] fix parallel processing input include bug --- src/input.cpp | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/input.cpp b/src/input.cpp index 268be5b774..2f617d2cd0 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -239,8 +239,8 @@ void Input::file() } /* ---------------------------------------------------------------------- - process all input from filename - called from library interface + process all input from file at filename + mostly called from library interface ------------------------------------------------------------------------- */ void Input::file(const char *filename) @@ -250,21 +250,30 @@ void Input::file(const char *filename) // call to file() will close filename and decrement nfile if (me == 0) { - if (nfile > 1) - error->one(FLERR,"Invalid use of library file() function"); + if (nfile == maxfile) { + maxfile++; + infiles = (FILE **) + memory->srealloc(infiles,maxfile*sizeof(FILE *),"input:infiles"); + } - if (infile && infile != stdin) fclose(infile); infile = fopen(filename,"r"); if (infile == NULL) { char str[128]; snprintf(str,128,"Cannot open input script %s",filename); error->one(FLERR,str); } - infiles[0] = infile; - nfile = 1; + infiles[nfile++] = infile; } + // process contents of file + file(); + + if (me == 0) { + fclose(infile); + nfile--; + infile = infiles[nfile-1]; + } } /* ---------------------------------------------------------------------- @@ -1041,7 +1050,13 @@ void Input::include() error->one(FLERR,str); } infiles[nfile++] = infile; - file(); + } + + // process contents of file + + file(); + + if (me == 0) { fclose(infile); nfile--; infile = infiles[nfile-1]; -- GitLab From 0ddcc023a5074e10b7e5974011e15542a2c5b105 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Mon, 24 Jun 2019 13:54:55 -0500 Subject: [PATCH 064/236] Improvements and additions to kim_commands doc --- doc/src/kim_commands.txt | 54 +++++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index f039202e4e..68306ad6b7 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -170,10 +170,30 @@ SMs can never adjust their units.) If a match is possible, the LAMMPS {user_units}. If the match fails, the simulation is terminated with an error. -If unit conversion mode {is} active, then the LAMMPS "units"_units.html -command is called to set the units to the IM's required or preferred units. -Conversion factors between the IM's units and the {user_units} are -defined for all "physical quantities"_units.html (mass, distance, etc.). +Here is an example of a LAMMPS script to compute the cohesive energy +of a face-centered cubic (fcc) lattice for the Ercolessi and Adams (1994) +potential for Al: + +kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal +boundary p p p +lattice fcc 4.032 +region simbox block 0 1 0 1 0 1 units lattice +create_box 1 simbox +create_atoms 1 box +mass 1 26.981539 +kim_interactions Al +run 0 +variable Ec equal (pe/count(all))/$\{_u_energy\} +print "Cohesive Energy = $\{EcJ\} eV" +:pre + +The above script will end with an error in the {kim_init} line if the +IM is changed to another potential for Al that does not work with {metal} +units. To address this {kim_init} offers the {unit_conversion_mode}. +If unit conversion mode {is} active, then {kim_init} calls the LAMMPS +"units"_units.html command to set the units to the IM's required or +preferred units. Conversion factors between the IM's units and the {user_units} +are defined for all "physical quantities"_units.html (mass, distance, etc.). (Note that converting to or from the "lj" unit style is not supported.) These factors are stored as "internal style variables"_variable.html with standard names: @@ -197,9 +217,11 @@ If desired, the input script can be designed to work with these conversion factors so that the script will work without change with any OpenKIM IM. (This approach is used in the "OpenKIM Testing Framework"_https://openkim.org/getting-started/kim-tests/.) -For example, the following simple script constructs an fcc lattice with -a lattice parameter defined in meters, computes the total energy, -and prints the cohesive energy in Joules regardless of the units of the IM. +For example, the script given above for the cohesive energy of fcc Al +can be rewritten to work with any IM regardless of units. The following +script constructs an fcc lattice with a lattice parameter defined in +meters, computes the total energy, and prints the cohesive energy in +Joules regardless of the units of the IM. kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 si unit_conversion_mode boundary p p p @@ -339,18 +361,23 @@ lattice fcc $\{a0\} The {kim_query} command retrieves from "OpenKIM"_https://openkim.org the equilibrium lattice constant predicted by the Ercolessi and Adams (1994) -potential for the face-centered cubic (fcc) structure and places it in +potential for the fcc structure and places it in variable {a0}. This variable is then used on the next line to set up the crystal. By using {kim_query}, the user is saved the trouble and possible error of tracking this value down, or of having to perform an energy minimization to find the equilibrium lattice constant. +Note that in {unit_conversion_mode} the results obtained from a +{kim_query} would need to be converted to the appropriate units system. +For example, in the above script, the lattice command would need to be +changed to: "lattice fcc $\{a0\}*$\{_u_distance\}". + [Define a crystal at finite temperature accounting for thermal expansion] kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p kim_query a0 get_lattice_constant_fcc units=\["angstrom"\] -kim_query alpha get_linear_thermal_expansion_fcc +kim_query alpha get_linear_thermal_expansion_fcc units=\{"1/K"\} variable DeltaT equal 300 lattice fcc $\{a0\}*$\{alpha\}*$\{DeltaT\} ... :pre @@ -375,6 +402,15 @@ The defect formation energy {Eform} is computed by subtracting from {Etot} the ideal fcc cohesive energy of the atoms in the system obtained from "OpenKIM"_https://openkim.org for the Ercolessi and Adams (1994) potential. +NOTE: {kim_query} commands return results archived in +"OpenKIM"_https://openkim.org. These results are obtained +using programs for computing material properties +(KIM Tests and KIM Test Drivers) that were contributed to OpenKIM. +In order to give credit to Test developers, the number of times results +from these programs are queried is tracked. No other information about +the nature of the query or its source is recorded. + + Citation of OpenKIM IMs :h4 When publishing results obtained using OpenKIM IMs researchers are requested -- GitLab From 1047d8f80e10a8c267eb4b022720da8f61f844c0 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Mon, 24 Jun 2019 14:32:40 -0500 Subject: [PATCH 065/236] Change of terminology to "KIM Portable Model" and streamlining --- doc/src/kim_commands.txt | 55 ++++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index d42b509449..9be4a79db5 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -44,8 +44,8 @@ so that they can be used by LAMMPS scripts. These commands do not implement any computations directly, but rather generate LAMMPS input commands based on the information retrieved from the OpenKIM repository to initialize and activate OpenKIM IMs and query their predictions for use in the LAMMPS script. -All LAMMPS input commands executed by {kim_commands} are echoed to the -LAMMPS log file. +All LAMMPS input commands generated and executed by {kim_commands} are +echoed to the LAMMPS log file. Benefits of Using OpenKIM IMs :h4 @@ -65,7 +65,7 @@ OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues Convenience :h5 IMs in OpenKIM are distributed in binary form along with LAMMPS and can be used in a LAMMPS input script simply by providing their KIM ID in the {kim_init} command documented on this page. -The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"https://openkim.org/getting-started/kim-tests/) as part of a LAMMPS input script setup and analysis. +The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"_https://openkim.org/getting-started/kim-tests/) as part of a LAMMPS input script setup and analysis. Support is provided for unit conversion between the "unit style"_units.html used in the LAMMPS input script and the units required by the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the likelihood of errors due to incompatible units. :ul :link(IM_types) @@ -73,8 +73,8 @@ Types of IMs in OpenKIM :h4 There are two types of IMs archived in OpenKIM: -The first type is called a {KIM Model}. A KIM Model is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/). A KIM Model will work seamlessly with any simulation code that supports the KIM API (including LAMMPS; see "complete list of supported code"_https://openkim.org/projects-using-kim/). -The second type is called a {KIM Simulator Model} (SM). In this case, the IM is implemented natively within the simulation code ({simulator}), i.e. LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol +The first type is called a {KIM Portable Model} (PM). A KIM PM is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/) Portable Model Interface (PMI) standard. A KIM PM will work seamlessly with any simulation code that supports the KIM API/PMI standard (including LAMMPS; see "complete list of supported codes"_https://openkim.org/projects-using-kim/). +The second type is called a {KIM Simulator Model} (SM). A KIM SM is an IM that is implemented natively within a simulation code ({simulator}) that supports the KIM API/SMI (Simulator Model Interface); in this case LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol With these two IM types, OpenKIM can archive and test almost all IMs that can be used by LAMMPS. (It is easy to contribute new IMs to OpenKIM, see @@ -85,7 +85,7 @@ OpenKIM IMs are uniquely identified by a a human-readable prefix identifying the type of IM, authors, publication year, and supported species, separated by two underscores from the KIM ID itself, which begins with an IM code -({MO} for a KIM Model, and {SM} for a KIM Simulator Model) +({MO} for a KIM Portable Model, and {SM} for a KIM Simulator Model) followed by a unique 12-digit code and a 3-digit version identifier. By convention SM prefixes begin with {Sim_} to readily identify them. @@ -97,7 +97,7 @@ providing all the information on the IM including a title, description, authorship and citation information, test and verification check results, visualizations of results, a wiki with documentation and user comments, and access to raw files, and other information. -This is referred to as the "Model Page" or "SM Page". +This is referred to as the "PM Page" or "SM Page". The URL for such a page is constructed from the "extended KIM ID"_https://openkim.org/about-kim-ids/ of the IM: @@ -110,7 +110,7 @@ listed above the Model Page is located at: "https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005"_https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005 :pre -See the "current list of KIM Models and SMs archived in OpenKIM"_https://openkim.org/browse/models/by-species. +See the "current list of KIM PMs and SMs archived in OpenKIM"_https://openkim.org/browse/models/by-species. This list is sorted by species and can be filtered to display only IMs for certain species combinations. @@ -124,7 +124,7 @@ IM and perform necessary initialization ({kim_init}), and the second to set up the IM for use by executing any necessary LAMMPS commands ({kim_interactions}). Both are required. -See the {examples/kim} directory for example input scripts that use KIM Models +See the {examples/kim} directory for example input scripts that use KIM PMs and KIM SMs. OpenKIM IM Initialization ({kim_init}) :h5 @@ -146,17 +146,17 @@ in the input script. (Any dimensioned numerical values in the input script and values read in from files are expected to be in the {user_units} system.) -The selected IM can be either a "KIM Model or a KIM SM"_#IM_types. +The selected IM can be either a "KIM PM or a KIM SM"_#IM_types. For a KIM SM, the {kim_init} command verifies that the SM is designed to work with LAMMPS (and not another simulation code). -In addition, the version strings for the LAMMPS version used for defining +In addition, the LAMMPS version used for defining the SM and the LAMMPS version being currently run are -printed, to help diagnose any incompatible changes to input script or +printed to help diagnose any incompatible changes to input script or command syntax between the two LAMMPS versions. Based on the selected model {kim_init} may modify the "atom_style"_atom_style.html. -Some SMs have requirements for this variable. If this is the case, then +Some SMs have requirements for this setting. If this is the case, then {atom_style} will be set to the required style. Otherwise, the value is left unchanged (which in the absence of an {atom_style} command in the input script is the "default atom_style value"_atom_style.html). @@ -166,7 +166,7 @@ on whether or not {unit conversion mode} is activated as indicated by the optional {unitarg} argument. If unit conversion mode is [not] active, then {user_units} must either match the required units of the IM or the IM must be able -to adjust its units to match. (The latter is only possible with some KIM Models; +to adjust its units to match. (The latter is only possible with some KIM PMs; SMs can never adjust their units.) If a match is possible, the LAMMPS "units"_units.html command is called to set the units to {user_units}. If the match fails, the simulation is terminated with @@ -198,7 +198,7 @@ preferred units. Conversion factors between the IM's units and the {user_units} are defined for all "physical quantities"_units.html (mass, distance, etc.). (Note that converting to or from the "lj" unit style is not supported.) These factors are stored as "internal style variables"_variable.html with -standard names: +the following standard names: _u_mass _u_distance @@ -241,7 +241,7 @@ Note the multiplication by $\{_u_distance\} and $\{_u_mass\} to convert from SI units (specified in the {kim_init} command) to whatever units the IM uses (metal in this case), and the division by $\{_u_energy\} to convert from the IM's energy units to SI units (Joule). This script -will work correctly for any IM for Al (KIM Model or SM) selected by the +will work correctly for any IM for Al (KIM PM or SM) selected by the {kim_init} command. Care must be taken to apply unit conversion to dimensional variables read in @@ -283,10 +283,10 @@ kim_interactions Si Si Si C The {kim_interactions} command performs all the necessary steps to set up the OpenKIM IM selected in the {kim_init} command. The specific actions depend -on whether the IM is a KIM Model or a KIM SM. For a KIM Model, +on whether the IM is a KIM PM or a KIM SM. For a KIM PM, a "pair_style kim"_pair_kim.html command is executed followed by the appropriate {pair_coeff} command. For example, for the -Ercolessi and Adams (1994) KIM Model for Al set by the following commands: +Ercolessi and Adams (1994) KIM PM for Al set by the following commands: kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal ... @@ -302,8 +302,7 @@ pair_coeff * * Al :pre For a KIM SM, the generated input commands may be more complex and require that LAMMPS is built with the required packages included for the type of potential being used. The set of commands to be executed -is defined in the SM specification file, which is part of the SM package -on "OpenKIM"_https://openkim.org. +is defined in the SM specification file, which is part of the SM package. For example, for the Strachan et al. (2003) ReaxFF SM set by the following commands: @@ -416,14 +415,16 @@ the nature of the query or its source is recorded. Citation of OpenKIM IMs :h4 When publishing results obtained using OpenKIM IMs researchers are requested -to cite the OpenKIM project "(Tadmor)"_#kim-mainpaper and KIM API -"(Elliott)"_#kim-api as well as the specific IM codes used in the simulations. +to cite the OpenKIM project "(Tadmor)"_#kim-mainpaper, KIM API +"(Elliott)"_#kim-api, and the specific IM codes used in the simulations, +in addition to the relevant scientific references for the IM. The citation format for an IM is displayed on its page on -"OpenKIM"_https://openkim.org along with the corresponding BibTex file. +"OpenKIM"_https://openkim.org along with the corresponding BibTex file, +and is automatically added to the LAMMPS {log.cite} file. -Citing the codes used in the simulation gives credit -to the researchers who developed them and enables open source efforts like -OpenKIM to function. +Citing the IM software (KIM infrastucture and specific PM or SM codes) +used in the simulation gives credit to the researchers who developed them +and enables open source efforts like OpenKIM to function. [Restrictions:] @@ -442,7 +443,7 @@ must be installed. [Related commands:] -"pair_style kim"_pair_kim.html, "units"_units.html +"pair_style kim"_pair_kim.html :line -- GitLab From b6535367501e4f9c3e85c32ade7cea6ef6cd6f9d Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Mon, 24 Jun 2019 14:38:44 -0500 Subject: [PATCH 066/236] Switched pair_style kim doc to "KIM Portable Model" terminology --- doc/src/pair_kim.txt | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/src/pair_kim.txt b/doc/src/pair_kim.txt index 86d13808b0..41593675ba 100644 --- a/doc/src/pair_kim.txt +++ b/doc/src/pair_kim.txt @@ -27,11 +27,12 @@ potentials to enable their use in LAMMPS scripts. The preferred interface for using interatomic models archived in OpenKIM is the "kim_commands interface"_kim_commands.html. That -interface supports both "KIM Models" that conform to the KIM API -and can be used by any KIM-compliant simulation code, and +interface supports both "KIM Portable Models" (PMs) that conform to the +KIM API Portable Model Interface (PMI) and can be used by any +simulation code that conforms to the KIM API/PMI, and "KIM Simulator Models" that are natively implemented within a single simulation code (like LAMMPS) and can only be used with it. -The {pair_style kim} command is limited to KIM Models. It is +The {pair_style kim} command is limited to KIM PMs. It is used by the "kim_commands interface"_kim_commands.html as needed. NOTE: Since {pair_style kim} is called by {kim_interactions} as needed, @@ -39,23 +40,23 @@ is not recommended to be directly used in input scripts. :line -The argument {model} is the name of the KIM model for a specific -potential as KIM defines it. For potentials archived in OpenKIM +The argument {model} is the name of the KIM PM. +For potentials archived in OpenKIM this is the extended KIM ID (see "kim_commands"_kim_commands.html -for details). LAMMPS can invoke any KIM Model, however there can -be incompatibilities (for example unit matching issues). +for details). LAMMPS can invoke any KIM PM, however there can +be incompatibilities (for example due to unit matching issues). In the event of an incompatibility, the code will terminate with an error message. Check both the LAMMPS and KIM log files for details. Only a single {pair_coeff} command is used with the {kim} style, which specifies the mapping of LAMMPS atom types to the species supported by -the KIM Model. This is done by specifying {N} additional arguments +the KIM PM. This is done by specifying {N} additional arguments after the * * in the {pair_coeff} command, where {N} is the number of LAMMPS atom types: N element names = mapping of KIM elements to atom types :ul -For example, consider a KIM Model that supports Si and C species. +For example, consider a KIM PM that supports Si and C species. If the LAMMPS simulation has four atom types, where the first three are Si, and the fourth is C, the following {pair_coeff} command would be used: @@ -63,14 +64,14 @@ pair_coeff * * Si Si Si C :pre The first two arguments must be * * so as to span all LAMMPS atom types. The first three Si arguments map LAMMPS atom types 1, 2, and 3 to Si as -defined within KIM Model. The final C argument maps LAMMPS atom type 4 to C. +defined within KIM PM. The final C argument maps LAMMPS atom type 4 to C. :line In addition to the usual LAMMPS error messages, the KIM library itself may generate errors, which should be printed to the screen. In this case it is also useful to check the {kim.log} file for additional error -information. The file kim.log should be generated in the same +information. The file {kim.log} should be generated in the same directory where LAMMPS is running. To download, build, and install the KIM library on your system, see -- GitLab From 4284a4fac41a36d0d897ff9a3f079719f57973a0 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Mon, 24 Jun 2019 14:51:35 -0500 Subject: [PATCH 067/236] Changed me to me_si and fixed some typos in comments --- src/KIM/kim_units.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/KIM/kim_units.cpp b/src/KIM/kim_units.cpp index fe90d58e9e..40f4917601 100644 --- a/src/KIM/kim_units.cpp +++ b/src/KIM/kim_units.cpp @@ -76,9 +76,9 @@ double const Nav = 6.022140857e23; // [unitless] Avogadro's number // (NIST value) // double const Nav = 6.02214076e23; // [unitless] Avogadro's number // (official value May 2019) -double const me = 9.10938356e-31; // [kg] electron rest mass +double const me_si = 9.10938356e-31; // [kg] electron rest mass // (NIST value) -// double me = 9.10938291e-31; // [kg] electron rest mass +// double me_si = 9.10938291e-31; // [kg] electron rest mass double const e_si = 1.6021766208e-19; // [C] elementary charge // (charge of an electron/proton) // (NIST value) @@ -114,8 +114,9 @@ double const attogram_si = 1e-21; // [kg[ attogram double const atu_si = 2.418884326509e-17; // [s] atomic time unit // ( = hbar/E_h where E_h is the // Hartree energy) (NIST value) -double const atu_electron_si = atu_si*sqrt(amu_si/me); // [s] atomic time unit - // used in electron system (see https://sourceforge.net/p/lammps/mailman/lammps-users/thread/BCA2BDB2-BA03-4280-896F-1E6120EF47B2%40caltech.edu/) +double const atu_electron_si = atu_si*sqrt(amu_si/me_si); + // [s] atomic time unit + // used in electron system (see https://sourceforge.net/p/lammps/mailman/lammps-users/thread/BCA2BDB2-BA03-4280-896F-1E6120EF47B2%40caltech.edu/) double const microsecond_si = 1e-6; // [s] microsecond double const nanosecond_si = 1e-9; // [s] nanosecond double const picosecond_si = 1e-12; // [s] picosecond @@ -130,13 +131,12 @@ double const amu_per_bohrcu_si = amu_si/pow(bohr_si,3); // [kg/m^3] amu/bohr^3 double const picogram_per_micrometercu_si = picogram_si/pow(micrometer_si,3); // [kg/m^3] picogram/micrometer^3 double const attogram_per_nanometercu_si = - attogram_si/pow(nanometer_si,3); // [kg/m^3] attogram/ - // nanomaterial^3 + attogram_si/pow(nanometer_si,3); // [kg/m^3] attogram/nanometer^3 /*---------------------- Energy/torque units ------------------------ */ -double const kcal_si = 4184.0; // [J] kilocalroie (heat energy +double const kcal_si = 4184.0; // [J] kilocalorie (heat energy // involved in warming up one // kilogram of water by one // degree Kelvin) @@ -155,8 +155,8 @@ double const erg_si = 1e-7; // [J] erg double const dyne_centimeter_si = 1e-7; // [J[ dyne*centimeter double const picogram_micrometersq_per_microsecondsq_si = picogram_si*pow(micrometer_si,2)/pow(microsecond_si,2); - // [J] pigogram*micrometer^2/ - // micorsecond^2 + // [J] picogram*micrometer^2/ + // microsecond^2 double const attogram_nanometersq_per_nanosecondsq_si = attogram_si*pow(nanometer_si,2)/pow(nanosecond_si,2); // [J] attogram*nanometer^2/ -- GitLab From 86d878a7eb4b73432eab53538a2c114571be63e0 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Mon, 24 Jun 2019 15:26:41 -0500 Subject: [PATCH 068/236] Updated language on availability of ADP potentials in OpenKIM --- doc/src/pair_adp.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/src/pair_adp.txt b/doc/src/pair_adp.txt index d5b07e8431..de6717a6c3 100644 --- a/doc/src/pair_adp.txt +++ b/doc/src/pair_adp.txt @@ -49,12 +49,11 @@ Note that ADP potentials obtained from NIST must be converted into the extended DYNAMO {setfl} format discussed below. :l -The OpenKIM Project at https://openkim.org provides ADP potentials -as Simulator Models that can be used directly in LAMMPS with -the "kim_commands interface"_kim_commands.html. +The OpenKIM Project at https://openkim.org/browse/models/by-type provides +ADP potentials that can be used directly in LAMMPS with the "kim_commands +interface"_kim_commands.html. :l - :line Only a single pair_coeff command is used with the {adp} style which -- GitLab From 6a6d08e18ef9f47e679dd79b841bdc1faf05d849 Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Tue, 25 Jun 2019 12:01:29 +0200 Subject: [PATCH 069/236] Better compute_pressure hybrid and doc --- doc/src/compute_pressure.txt | 8 ++++-- src/compute_pressure.cpp | 50 ++++++++++++++++++++++++++---------- 2 files changed, 42 insertions(+), 16 deletions(-) diff --git a/doc/src/compute_pressure.txt b/doc/src/compute_pressure.txt index bd6e38e392..fd9bfb7aff 100644 --- a/doc/src/compute_pressure.txt +++ b/doc/src/compute_pressure.txt @@ -16,12 +16,13 @@ ID, group-ID are documented in "compute"_compute.html command pressure = style name of this compute command temp-ID = ID of compute that calculates temperature, can be NULL if not needed zero or more keywords may be appended -keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} :ul +keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} or {hybridpair} :ul [Examples:] compute 1 all pressure thermo_temp -compute 1 all pressure NULL pair bond :pre +compute 1 all pressure NULL pair bond +compute 1 all pressure NULL hybridpair lj/cut :pre [Description:] @@ -67,6 +68,9 @@ extra keywords are listed, then only those components are summed to compute temperature or ke and/or the virial. The {virial} keyword means include all terms except the kinetic energy {ke}. +The {hybridpair} keyword means to only include contribution +from a subpair in a {hybrid} or {hybrid/overlay} pair style. + Details of how LAMMPS computes the virial efficiently for the entire system, including for many-body potentials and accounting for the effects of periodic boundary conditions are discussed in diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index 8381e04fa8..96f577219d 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -81,8 +81,37 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : int iarg = 4; while (iarg < narg) { if (strcmp(arg[iarg],"ke") == 0) keflag = 1; - else if (strcmp(arg[iarg],"hybridpair") == 0) - hybridpairflag = force->inumeric(FLERR, arg[++iarg]); + else if (strcmp(arg[iarg],"hybridpair") == 0) { + int n = strlen(arg[++iarg]) + 1; + if (lmp->suffix) n += strlen(lmp->suffix) + 1; + pstyle = new char[n]; + strcpy(pstyle,arg[iarg++]); + + nsub = 0; + + if (narg > iarg) { + if (isdigit(arg[iarg][0])) { + nsub = force->inumeric(FLERR,arg[iarg]); + ++iarg; + if (nsub <= 0) + error->all(FLERR,"Illegal compute pressure command"); + } + } + + // check if pair style with and without suffix exists + + hybridpair = (Pair *) force->pair_match(pstyle,1,nsub); + if (!hybridpair && lmp->suffix) { + strcat(pstyle,"/"); + strcat(pstyle,lmp->suffix); + hybridpair = (Pair *) force->pair_match(pstyle,1,nsub); + } + + if (!hybridpair) + error->all(FLERR,"Unrecognized pair style in compute pressure command"); + + hybridpairflag = 1; + } else if (strcmp(arg[iarg],"pair") == 0) pairflag = 1; else if (strcmp(arg[iarg],"bond") == 0) bondflag = 1; else if (strcmp(arg[iarg],"angle") == 0) angleflag = 1; @@ -144,12 +173,7 @@ void ComputePressure::init() nvirial = 0; vptr = NULL; - if (hybridpairflag > 0 && force->pair) { - if (strstr(force->pair_style, "hybrid")) { - PairHybrid *ph = (PairHybrid *) force->pair; - if (hybridpairflag <= ph->nstyles) nvirial++; - } - } + if (hybridpairflag && force->pair) nvirial++; if (pairflag && force->pair) nvirial++; if (bondflag && atom->molecular && force->bond) nvirial++; if (angleflag && atom->molecular && force->angle) nvirial++; @@ -162,12 +186,10 @@ void ComputePressure::init() if (nvirial) { vptr = new double*[nvirial]; nvirial = 0; - if (hybridpairflag > 0 && force->pair) { - if (strstr(force->pair_style, "hybrid")) { - PairHybrid *ph = (PairHybrid *) force->pair; - if (hybridpairflag <= ph->nstyles) - vptr[nvirial++] = ph->styles[hybridpairflag-1]->virial; - } + if (hybridpairflag && force->pair) { + PairHybrid *ph = (PairHybrid *) force->pair; + ph->no_virial_fdotr_compute = 1; + vptr[nvirial++] = hybridpair->virial; } if (pairflag && force->pair) vptr[nvirial++] = force->pair->virial; if (bondflag && force->bond) vptr[nvirial++] = force->bond->virial; -- GitLab From 61ddc98a5a9ef9d53dc7f3227262b755c20fb7f7 Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Tue, 25 Jun 2019 13:30:41 +0200 Subject: [PATCH 070/236] Missing compute_pressure.h --- src/compute_pressure.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/compute_pressure.h b/src/compute_pressure.h index 3259377bd8..31983e8e2c 100644 --- a/src/compute_pressure.h +++ b/src/compute_pressure.h @@ -42,10 +42,15 @@ class ComputePressure : public Compute { char *id_temp; double virial[6]; int hybridpairflag; + class Pair *hybridpair; int keflag,pairflag,bondflag,angleflag,dihedralflag,improperflag; int fixflag,kspaceflag; void virial_compute(int, int); + + private: + int nsub; + char *pstyle; }; } -- GitLab From 2fd924562b94c9fb4d1b6a933211416e07b3b869 Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Tue, 25 Jun 2019 15:15:30 +0200 Subject: [PATCH 071/236] Spell correction --- doc/src/compute_pressure.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/compute_pressure.txt b/doc/src/compute_pressure.txt index fd9bfb7aff..070376075e 100644 --- a/doc/src/compute_pressure.txt +++ b/doc/src/compute_pressure.txt @@ -69,7 +69,7 @@ compute temperature or ke and/or the virial. The {virial} keyword means include all terms except the kinetic energy {ke}. The {hybridpair} keyword means to only include contribution -from a subpair in a {hybrid} or {hybrid/overlay} pair style. +from a sub-style in a {hybrid} or {hybrid/overlay} pair style. Details of how LAMMPS computes the virial efficiently for the entire system, including for many-body potentials and accounting for the -- GitLab From f6319146b04b04e4887fdfe44a47ebc45544d97a Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Tue, 25 Jun 2019 15:03:24 -0500 Subject: [PATCH 072/236] Update kim_query to new interface --- src/KIM/kim_query.cpp | 24 ++++++++++++++++++++---- src/KIM/kim_query.h | 3 +-- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index e4818abc94..2bb404ec26 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -51,7 +51,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Designed for use with the kim-api-2.0.2 (and newer) package + Designed for use with the kim-api-2.1.0 (and newer) package ------------------------------------------------------------------------- */ #include @@ -61,7 +61,9 @@ #include "comm.h" #include "error.h" #include "input.h" +#include "modify.h" #include "variable.h" +#include "fix_store_kim.h" #if defined(LMP_KIM_CURL) #include @@ -77,7 +79,7 @@ struct WriteBuf { size_t sizeleft; }; -static char *do_query(char *, int, char **, int, MPI_Comm); +static char *do_query(char *, char *, int, char **, int, MPI_Comm); static size_t write_callback(void *, size_t, size_t, void *); #endif @@ -90,12 +92,23 @@ void KimQuery::command(int narg, char **arg) if (narg < 2) error->all(FLERR,"Illegal kim_query command"); + // check if we had a kim_init command by finding fix STORE/KIM + // retrieve model name. + char * model_name; + + int ifix = modify->find_fix("KIM_MODEL_STORE"); + if (ifix >= 0) { + FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; + model_name = (char *)fix_store->getptr("model_name"); + } else error->all(FLERR,"Must use 'kim_init' before 'kim_query'"); + + varname = arg[0]; function = arg[1]; #if defined(LMP_KIM_CURL) - value = do_query(function, narg-2, arg+2, comm->me, world); + value = do_query(function, model_name, narg-2, arg+2, comm->me, world); // check for valid result // on error the content of "value" is a '\0' byte @@ -147,7 +160,8 @@ size_t write_callback(void *data, size_t size, size_t nmemb, void *userp) return 0; // done } -char *do_query(char *qfunction, int narg, char **arg, int rank, MPI_Comm comm) +char *do_query(char *qfunction, char * model_name, int narg, char **arg, + int rank, MPI_Comm comm) { char value[512], *retval; @@ -173,6 +187,8 @@ char *do_query(char *qfunction, int narg, char **arg, int rank, MPI_Comm comm) url += qfunction; std::string query(arg[0]); + query += "&model="; + query += model_name; for (int i=1; i < narg; ++i) { query += '&'; query += arg[i]; diff --git a/src/KIM/kim_query.h b/src/KIM/kim_query.h index 3644e4519b..b5433def79 100644 --- a/src/KIM/kim_query.h +++ b/src/KIM/kim_query.h @@ -51,7 +51,7 @@ ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- - Designed for use with the kim-api-2.0.2 (and newer) package + Designed for use with the kim-api-2.1.0 (and newer) package ------------------------------------------------------------------------- */ #ifdef COMMAND_CLASS @@ -71,7 +71,6 @@ class KimQuery : protected Pointers { public: KimQuery(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); - }; } -- GitLab From ff36bad09964fecad2b6569fef6992b164e9b56d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 00:33:48 -0400 Subject: [PATCH 073/236] cleanup includes in variable.h --- src/variable.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/variable.h b/src/variable.h index 512195bd14..c5f501f266 100644 --- a/src/variable.h +++ b/src/variable.h @@ -14,9 +14,8 @@ #ifndef LMP_VARIABLE_H #define LMP_VARIABLE_H -#include +#include #include "pointers.h" -#include "input.h" namespace LAMMPS_NS { -- GitLab From f7507512b131e2c515db82751b1a793de66aa657 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 00:39:47 -0400 Subject: [PATCH 074/236] apply memory alignment settings from my_page.h to my_pool_chunk.h --- src/my_pool_chunk.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/my_pool_chunk.h b/src/my_pool_chunk.h index 8bf88d35bb..a313e45f05 100644 --- a/src/my_pool_chunk.h +++ b/src/my_pool_chunk.h @@ -43,6 +43,10 @@ public variables: #ifndef LAMMPS_MY_POOL_CHUNK_H #define LAMMPS_MY_POOL_CHUNK_H +#if defined(LMP_USER_INTEL) && !defined(LAMMPS_MEMALIGN) && !defined(_WIN32) +#define LAMMPS_MEMALIGN 64 +#endif + #include namespace LAMMPS_NS { @@ -190,9 +194,17 @@ class MyPoolChunk { for (int i = oldpage; i < npage; i++) { whichbin[i] = ibin; +#if defined(LAMMPS_MEMALIGN) + void *ptr; + if (posix_memalign(&ptr, LAMMPS_MEMALIGN, + chunkperpage*chunksize[ibin]*sizeof(T))) + errorflag = 2; + pages[i] = (T *) ptr; +#else pages[i] = (T *) malloc(chunkperpage*chunksize[ibin]*sizeof(T)); size += chunkperpage*chunksize[ibin]; if (!pages[i]) errorflag = 2; +#endif } // reset free list for unused chunks on new pages -- GitLab From 17602b4c26fa94e02e204b3e8e85a48cecc65569 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 01:02:17 -0400 Subject: [PATCH 075/236] some more include file cleanup. include cstdlib where functions like atoi() are used remove unneeded include statements from headers --- src/PYTHON/python_impl.cpp | 1 + src/USER-MEAMC/meam.h | 1 - src/compute_reduce_chunk.cpp | 3 ++- src/fix_vector.cpp | 1 + src/lammps.cpp | 1 + src/variable.cpp | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index aaa4f74c69..9c650330af 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -15,6 +15,7 @@ Contributing author: Richard Berger and Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include #include #include "lmppython.h" #include "force.h" diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 42fd722e01..bb40202243 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -3,7 +3,6 @@ #include "memory.h" #include -#include #define maxelt 5 diff --git a/src/compute_reduce_chunk.cpp b/src/compute_reduce_chunk.cpp index f31672ef74..5eda71b21b 100644 --- a/src/compute_reduce_chunk.cpp +++ b/src/compute_reduce_chunk.cpp @@ -12,7 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include +#include +#include #include "compute_reduce_chunk.h" #include "atom.h" #include "update.h" diff --git a/src/fix_vector.cpp b/src/fix_vector.cpp index 6387af7676..5657e59ab0 100644 --- a/src/fix_vector.cpp +++ b/src/fix_vector.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "fix_vector.h" #include "update.h" diff --git a/src/lammps.cpp b/src/lammps.cpp index f8d04c9323..320d89ed52 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/src/variable.cpp b/src/variable.cpp index ea7f3044d7..1416754073 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -26,6 +26,7 @@ #include "region.h" #include "modify.h" #include "compute.h" +#include "input.h" #include "fix.h" #include "fix_store.h" #include "force.h" -- GitLab From 08ac695a062079390a47d7115e10428493c5cf75 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 01:03:08 -0400 Subject: [PATCH 076/236] move include statements from headers to implementation files where possible in USER-REAXC --- src/USER-OMP/reaxc_multi_body_omp.cpp | 1 + src/USER-REAXC/pair_reaxc.cpp | 1 + src/USER-REAXC/reaxc_control.cpp | 2 ++ src/USER-REAXC/reaxc_ffield.cpp | 2 ++ src/USER-REAXC/reaxc_forces.cpp | 1 + src/USER-REAXC/reaxc_init_md.cpp | 1 + src/USER-REAXC/reaxc_io_tools.cpp | 3 ++- src/USER-REAXC/reaxc_multi_body.cpp | 1 + src/USER-REAXC/reaxc_reset_tools.cpp | 1 + src/USER-REAXC/reaxc_tool_box.cpp | 5 +++++ src/USER-REAXC/reaxc_traj.cpp | 1 + src/USER-REAXC/reaxc_types.h | 10 +--------- 12 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index 7552e7a733..d791f945a8 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -26,6 +26,7 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc_omp.h" #include "thr_data.h" diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index 8f8dcfb8fc..224f3e2568 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -20,6 +20,7 @@ Hybrid and hybrid/overlay compatibility added by Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include #include "pair_reaxc.h" #include "atom.h" #include "update.h" diff --git a/src/USER-REAXC/reaxc_control.cpp b/src/USER-REAXC/reaxc_control.cpp index 535226fff8..060c1a0342 100644 --- a/src/USER-REAXC/reaxc_control.cpp +++ b/src/USER-REAXC/reaxc_control.cpp @@ -24,6 +24,8 @@ . ----------------------------------------------------------------------*/ +#include +#include #include "pair_reaxc.h" #include "reaxc_control.h" #include "reaxc_tool_box.h" diff --git a/src/USER-REAXC/reaxc_ffield.cpp b/src/USER-REAXC/reaxc_ffield.cpp index 9534637645..2160d180cf 100644 --- a/src/USER-REAXC/reaxc_ffield.cpp +++ b/src/USER-REAXC/reaxc_ffield.cpp @@ -24,6 +24,8 @@ . ----------------------------------------------------------------------*/ +#include +#include #include "pair_reaxc.h" #include "error.h" #include "reaxc_ffield.h" diff --git a/src/USER-REAXC/reaxc_forces.cpp b/src/USER-REAXC/reaxc_forces.cpp index 186cde681a..79094ece43 100644 --- a/src/USER-REAXC/reaxc_forces.cpp +++ b/src/USER-REAXC/reaxc_forces.cpp @@ -24,6 +24,7 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc.h" #include "reaxc_forces.h" #include "reaxc_bond_orders.h" diff --git a/src/USER-REAXC/reaxc_init_md.cpp b/src/USER-REAXC/reaxc_init_md.cpp index df5de49034..a0e15e98f5 100644 --- a/src/USER-REAXC/reaxc_init_md.cpp +++ b/src/USER-REAXC/reaxc_init_md.cpp @@ -24,6 +24,7 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc.h" #include "reaxc_init_md.h" #include "reaxc_allocate.h" diff --git a/src/USER-REAXC/reaxc_io_tools.cpp b/src/USER-REAXC/reaxc_io_tools.cpp index 51aa8bca0f..f4a1486c48 100644 --- a/src/USER-REAXC/reaxc_io_tools.cpp +++ b/src/USER-REAXC/reaxc_io_tools.cpp @@ -24,6 +24,7 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc.h" #include "update.h" #include "reaxc_io_tools.h" @@ -85,7 +86,7 @@ int Init_Output_Files( reax_system *system, control_params *control, /************************ close output files ************************/ -int Close_Output_Files( reax_system *system, control_params *control, +int Close_Output_Files( reax_system *system, control_params * /* control */, output_controls *out_control, mpi_datatypes * /*mpi_data*/ ) { if (out_control->write_steps > 0) diff --git a/src/USER-REAXC/reaxc_multi_body.cpp b/src/USER-REAXC/reaxc_multi_body.cpp index f7d72a2678..371b8ed65e 100644 --- a/src/USER-REAXC/reaxc_multi_body.cpp +++ b/src/USER-REAXC/reaxc_multi_body.cpp @@ -24,6 +24,7 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc.h" #include "reaxc_multi_body.h" #include "reaxc_bond_orders.h" diff --git a/src/USER-REAXC/reaxc_reset_tools.cpp b/src/USER-REAXC/reaxc_reset_tools.cpp index e00656694c..c72ccbadcd 100644 --- a/src/USER-REAXC/reaxc_reset_tools.cpp +++ b/src/USER-REAXC/reaxc_reset_tools.cpp @@ -24,6 +24,7 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc.h" #include "reaxc_reset_tools.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_tool_box.cpp b/src/USER-REAXC/reaxc_tool_box.cpp index ffe42e37bb..2cf66d8655 100644 --- a/src/USER-REAXC/reaxc_tool_box.cpp +++ b/src/USER-REAXC/reaxc_tool_box.cpp @@ -24,9 +24,14 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc.h" #include "reaxc_tool_box.h" +#if !defined(_MSC_VER) +#include +#endif + #include "error.h" struct timeval tim; diff --git a/src/USER-REAXC/reaxc_traj.cpp b/src/USER-REAXC/reaxc_traj.cpp index 356d7b6eeb..a536445113 100644 --- a/src/USER-REAXC/reaxc_traj.cpp +++ b/src/USER-REAXC/reaxc_traj.cpp @@ -24,6 +24,7 @@ . ----------------------------------------------------------------------*/ +#include #include "pair_reaxc.h" #include "reaxc_traj.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/reaxc_types.h b/src/USER-REAXC/reaxc_types.h index 0821c065cc..319c373927 100644 --- a/src/USER-REAXC/reaxc_types.h +++ b/src/USER-REAXC/reaxc_types.h @@ -27,19 +27,11 @@ #ifndef __REAX_TYPES_H_ #define __REAX_TYPES_H_ -#include #include "lmptype.h" - -#include -#include +#include #include -#include -#include -#include -#include #include "accelerator_kokkos.h" - namespace LAMMPS_NS { class Error;} #if defined LMP_USER_OMP -- GitLab From 312a1fa004bbec6f6e11e800f17c6e3038f0ecdc Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Thu, 27 Jun 2019 07:58:32 -0500 Subject: [PATCH 077/236] Added species to kim_queries in docs and some other edits --- doc/src/kim_commands.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 9be4a79db5..48637ae722 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -32,7 +32,7 @@ kim_interactions Si kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode kim_interactions C H O -kim_query a0 get_lattice_constant_fcc units=\["angstrom"\] :pre +kim_query a0 get_lattice_constant_fcc species=\["Al"] units=\["angstrom"\] :pre [Description:] @@ -53,7 +53,7 @@ Employing OpenKIM IMs provides LAMMPS users with multiple benefits: Reliability :h5 -All content archived in OpenKIM is subject to quality control by the "KIM Editor"_https://openkim.org/governance/. +All content archived in OpenKIM is reviewed by the "KIM Editor"_https://openkim.org/governance/ for quality. IMs in OpenKIM are archived with full provenance control. Each is associated with a maintainer responsible for the integrity of the content. All changes are tracked and recorded. IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/getting-started/kim-tests/ that compute a host of material properties, and "KIM Verification Checks"_https://openkim.org/about-verification-checks/ that provide the user with information on various aspects of the IM behavior and coding correctness. This information is displayed on the IM's page on "OpenKIM"_https://openkim.org. :ul @@ -73,8 +73,8 @@ Types of IMs in OpenKIM :h4 There are two types of IMs archived in OpenKIM: -The first type is called a {KIM Portable Model} (PM). A KIM PM is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran), which conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/) Portable Model Interface (PMI) standard. A KIM PM will work seamlessly with any simulation code that supports the KIM API/PMI standard (including LAMMPS; see "complete list of supported codes"_https://openkim.org/projects-using-kim/). -The second type is called a {KIM Simulator Model} (SM). A KIM SM is an IM that is implemented natively within a simulation code ({simulator}) that supports the KIM API/SMI (Simulator Model Interface); in this case LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol +The first type is called a {KIM Portable Model} (PM). A KIM PM is an independent computer implementation of an IM written in one of the languages supported by KIM (C, C++, Fortran) that conforms to the KIM Application Programming Interface ("KIM API"_https://openkim.org/kim-api/) Portable Model Interface (PMI) standard. A KIM PM will work seamlessly with any simulation code that supports the KIM API/PMI standard (including LAMMPS; see "complete list of supported codes"_https://openkim.org/projects-using-kim/). +The second type is called a {KIM Simulator Model} (SM). A KIM SM is an IM that is implemented natively within a simulation code ({simulator}) that supports the KIM API Simulator Model Interface (SMI); in this case LAMMPS. A separate SM package is archived in OpenKIM for each parameterization of the IM, which includes all of the necessary parameter files, LAMMPS commands, and metadata (supported species, units, etc.) needed to run the IM in LAMMPS. :ol With these two IM types, OpenKIM can archive and test almost all IMs that can be used by LAMMPS. (It is easy to contribute new IMs to OpenKIM, see @@ -356,7 +356,7 @@ or analysis phases of LAMMPS simulations. Some examples are given below. kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p -kim_query a0 get_lattice_constant_fcc units=\["angstrom"\] +kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\] lattice fcc $\{a0\} ... :pre @@ -377,8 +377,8 @@ changed to: "lattice fcc $\{a0\}*$\{_u_distance\}". kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p -kim_query a0 get_lattice_constant_fcc units=\["angstrom"\] -kim_query alpha get_linear_thermal_expansion_fcc units=\{"1/K"\} +kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\] +kim_query alpha get_linear_thermal_expansion_fcc species=\["Al"\] units=\{"1/K"\} variable DeltaT equal 300 lattice fcc $\{a0\}*$\{alpha\}*$\{DeltaT\} ... :pre @@ -395,7 +395,7 @@ kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal ... Build fcc crystal containing some defect and compute the total energy ... which is stored in the variable {Etot} ... -kim_query Ec get_cohesive_energy_fcc units=\["eV"\] +kim_query Ec get_cohesive_energy_fcc species=\["Al"\] units=\["eV"\] variable Eform equal $\{Etot\} - count(all)*$\{Ec\} ... :pre -- GitLab From 84e156d380519a7091f657fb89387d4b866280be Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 09:14:36 -0400 Subject: [PATCH 078/236] first batch of changes suggested by using include-what-you-use tool --- src/angle.cpp | 1 - src/angle.h | 2 +- src/angle_deprecated.cpp | 1 + src/angle_hybrid.cpp | 3 +-- src/angle_zero.cpp | 3 +-- src/bond.h | 2 +- src/compute.h | 2 +- src/dihedral.h | 2 +- src/dump.h | 2 +- src/fix.h | 2 +- src/improper.h | 2 +- src/lmptype.h | 4 ---- src/main.cpp | 3 --- src/pair.h | 2 +- src/pointers.h | 9 +++++++-- 15 files changed, 18 insertions(+), 22 deletions(-) diff --git a/src/angle.cpp b/src/angle.cpp index 2a297990ac..1b9532ea32 100644 --- a/src/angle.cpp +++ b/src/angle.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "angle.h" #include "atom.h" #include "comm.h" diff --git a/src/angle.h b/src/angle.h index 3d8371242e..6fc8a664c6 100644 --- a/src/angle.h +++ b/src/angle.h @@ -15,7 +15,7 @@ #define LMP_ANGLE_H #include -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/angle_deprecated.cpp b/src/angle_deprecated.cpp index b5af217b7b..73fcccc53a 100644 --- a/src/angle_deprecated.cpp +++ b/src/angle_deprecated.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include +#include #include "angle_deprecated.h" #include "angle_hybrid.h" #include "comm.h" diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp index 6afa7413b2..47baf770a5 100644 --- a/src/angle_hybrid.cpp +++ b/src/angle_hybrid.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include #include "angle_hybrid.h" #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/angle_zero.cpp b/src/angle_zero.cpp index 6eb127fa58..62eab85aee 100644 --- a/src/angle_zero.cpp +++ b/src/angle_zero.cpp @@ -15,8 +15,7 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include +#include #include #include "angle_zero.h" #include "atom.h" diff --git a/src/bond.h b/src/bond.h index 8fb7040832..f9fb9384ed 100644 --- a/src/bond.h +++ b/src/bond.h @@ -15,7 +15,7 @@ #define LMP_BOND_H #include -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/compute.h b/src/compute.h index a023834368..38d001db6f 100644 --- a/src/compute.h +++ b/src/compute.h @@ -14,7 +14,7 @@ #ifndef LMP_COMPUTE_H #define LMP_COMPUTE_H -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/dihedral.h b/src/dihedral.h index f1b42008bf..8654132ed5 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -15,7 +15,7 @@ #define LMP_DIHEDRAL_H #include -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/dump.h b/src/dump.h index 1c6a131f76..d42e7f1f39 100644 --- a/src/dump.h +++ b/src/dump.h @@ -16,7 +16,7 @@ #include #include -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/fix.h b/src/fix.h index 7eaff38bd3..7e55e96269 100644 --- a/src/fix.h +++ b/src/fix.h @@ -14,7 +14,7 @@ #ifndef LMP_FIX_H #define LMP_FIX_H -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/improper.h b/src/improper.h index d940b43a13..4af5ad4a35 100644 --- a/src/improper.h +++ b/src/improper.h @@ -15,7 +15,7 @@ #define LMP_IMPROPER_H #include -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/lmptype.h b/src/lmptype.h index 12fa6cc4fb..8a596e9f83 100644 --- a/src/lmptype.h +++ b/src/lmptype.h @@ -48,10 +48,6 @@ namespace LAMMPS_NS { -// enum used for KOKKOS host/device flags - -enum ExecutionSpace{Host,Device}; - // reserve 2 hi bits in molecular system neigh list for special bonds flag // max local + ghost atoms per processor = 2^30 - 1 diff --git a/src/main.cpp b/src/main.cpp index 8eb5e4e543..1be9c253eb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,9 +14,6 @@ #include #include "lammps.h" #include "input.h" -#include "error.h" -#include -#include #if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE) #include diff --git a/src/pair.h b/src/pair.h index 7481514dae..501f3af8f8 100644 --- a/src/pair.h +++ b/src/pair.h @@ -14,7 +14,7 @@ #ifndef LMP_PAIR_H #define LMP_PAIR_H -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/pointers.h b/src/pointers.h index 44967f5135..fc359a5667 100644 --- a/src/pointers.h +++ b/src/pointers.h @@ -21,9 +21,10 @@ #ifndef LMP_POINTERS_H #define LMP_POINTERS_H -#include "lmptype.h" +#include "lmptype.h" // IWYU pragma: export #include -#include "lammps.h" +#include +#include "lammps.h" // IWYU pragma: export namespace LAMMPS_NS { @@ -34,6 +35,10 @@ namespace LAMMPS_NS { #define MIN(A,B) ((A) < (B) ? (A) : (B)) #define MAX(A,B) ((A) > (B) ? (A) : (B)) +// enum used for KOKKOS host/device flags + +enum ExecutionSpace{Host,Device}; + class Pointers { public: Pointers(LAMMPS *ptr) : -- GitLab From 333bec0222ed2f68fa84dc208c0b2f738e5e9da2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 10:12:53 -0400 Subject: [PATCH 079/236] headers that directly or indirectly include pointers.h may assume is loaded, too. --- src/angle.h | 1 - src/angle_hybrid.h | 1 - src/angle_zero.h | 1 - src/atom.cpp | 4 ---- src/bond.h | 1 - src/dihedral.h | 1 - src/dump.h | 1 - src/improper.h | 1 - src/pointers.h | 2 +- 9 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/angle.h b/src/angle.h index 6fc8a664c6..7a008f7ca7 100644 --- a/src/angle.h +++ b/src/angle.h @@ -14,7 +14,6 @@ #ifndef LMP_ANGLE_H #define LMP_ANGLE_H -#include #include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/angle_hybrid.h b/src/angle_hybrid.h index 4fde71e43f..730d55b0e2 100644 --- a/src/angle_hybrid.h +++ b/src/angle_hybrid.h @@ -20,7 +20,6 @@ AngleStyle(hybrid,AngleHybrid) #ifndef LMP_ANGLE_HYBRID_H #define LMP_ANGLE_HYBRID_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/angle_zero.h b/src/angle_zero.h index b91be5c8d7..bc1ce0725f 100644 --- a/src/angle_zero.h +++ b/src/angle_zero.h @@ -20,7 +20,6 @@ AngleStyle(zero,AngleZero) #ifndef LMP_ANGLE_ZERO_H #define LMP_ANGLE_ZERO_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/atom.cpp b/src/atom.cpp index 1f5d5a80c4..8176039165 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include -#include #include "atom.h" #include "style_atom.h" #include "atom_vec.h" @@ -28,14 +26,12 @@ #include "fix.h" #include "compute.h" #include "output.h" -#include "thermo.h" #include "update.h" #include "domain.h" #include "group.h" #include "input.h" #include "variable.h" #include "molecule.h" -#include "atom_masks.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/bond.h b/src/bond.h index f9fb9384ed..5c3b933083 100644 --- a/src/bond.h +++ b/src/bond.h @@ -14,7 +14,6 @@ #ifndef LMP_BOND_H #define LMP_BOND_H -#include #include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/dihedral.h b/src/dihedral.h index 8654132ed5..ed6c02c5b9 100644 --- a/src/dihedral.h +++ b/src/dihedral.h @@ -14,7 +14,6 @@ #ifndef LMP_DIHEDRAL_H #define LMP_DIHEDRAL_H -#include #include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/dump.h b/src/dump.h index d42e7f1f39..0173aa3112 100644 --- a/src/dump.h +++ b/src/dump.h @@ -15,7 +15,6 @@ #define LMP_DUMP_H #include -#include #include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/improper.h b/src/improper.h index 4af5ad4a35..234dc9cb20 100644 --- a/src/improper.h +++ b/src/improper.h @@ -14,7 +14,6 @@ #ifndef LMP_IMPROPER_H #define LMP_IMPROPER_H -#include #include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/pointers.h b/src/pointers.h index fc359a5667..f9ef229c90 100644 --- a/src/pointers.h +++ b/src/pointers.h @@ -23,7 +23,7 @@ #include "lmptype.h" // IWYU pragma: export #include -#include +#include // IWYU pragma: export #include "lammps.h" // IWYU pragma: export namespace LAMMPS_NS { -- GitLab From 48220b39b5813b8144a9ca8aa6dd37aa688b238f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 10:13:43 -0400 Subject: [PATCH 080/236] include explicitly in .cpp files, though --- src/angle_hybrid.cpp | 1 + src/atom.cpp | 2 +- src/atom_map.cpp | 2 ++ src/atom_vec.cpp | 1 + src/atom_vec.h | 3 +-- src/atom_vec_body.h | 1 - 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp index 47baf770a5..48bb241100 100644 --- a/src/angle_hybrid.cpp +++ b/src/angle_hybrid.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include +#include #include #include #include "angle_hybrid.h" diff --git a/src/atom.cpp b/src/atom.cpp index 8176039165..b79febfc20 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include +#include #include #include #include @@ -25,7 +26,6 @@ #include "modify.h" #include "fix.h" #include "compute.h" -#include "output.h" #include "update.h" #include "domain.h" #include "group.h" diff --git a/src/atom_map.cpp b/src/atom_map.cpp index e9cd590624..35d7435ae2 100644 --- a/src/atom_map.cpp +++ b/src/atom_map.cpp @@ -11,6 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "lmptype.h" +#include #include #include "atom.h" #include "comm.h" diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index a7ca6fcb19..91e1980dd0 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include "atom_vec.h" diff --git a/src/atom_vec.h b/src/atom_vec.h index 87fb35d9c7..26c181be1e 100644 --- a/src/atom_vec.h +++ b/src/atom_vec.h @@ -14,8 +14,7 @@ #ifndef LMP_ATOM_VEC_H #define LMP_ATOM_VEC_H -#include -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index 4d02c4b3e0..09f03caca1 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -112,7 +112,6 @@ class AtomVecBody : public AtomVec { void grow_bonus(); void copy_bonus(int, int); - //void check(int); }; } -- GitLab From 121947e79d33d2d997bf705ec9b656da2c1edae3 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Thu, 27 Jun 2019 12:52:20 -0500 Subject: [PATCH 081/236] Added hcp query example to kim_commands --- doc/src/kim_commands.txt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 48637ae722..66319d7a08 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -352,7 +352,7 @@ webpage at "https://query.openkim.org"_https://query.openkim.org/ The data obtained by {kim_query} commands can be used as part of the setup or analysis phases of LAMMPS simulations. Some examples are given below. -[Define a crystal at its equilibrium lattice constant] +[Define an equilibrium fcc crystal] kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p @@ -373,6 +373,26 @@ Note that in {unit_conversion_mode} the results obtained from a For example, in the above script, the lattice command would need to be changed to: "lattice fcc $\{a0\}*$\{_u_distance\}". +[Define an equilibrium hcp crystal] + +kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal +boundary p p p +kim_query latconst get_lattice_constant_hcp species=\["Zr"\] units=\["angstrom"\] +variable a0 equal latconst_1 +variable c0 equal latconst_2 +variable c_to_a equal $\{c0\}/$\{a0\} +lattice custom $\{a0\} a1 0.5 -0.866025 0 a2 0.5 0.866025 0 a3 0 0 $\{c_to_a\} & + basis 0.333333 0.666666 0.25 basis 0.666666 0.333333 0.75 +... :pre + +In this case the {kim_query} returns two arguments (since the hexagonal +close packed (hcp) structure has two independent lattice constants). +In the case where a query returns multiple results, the default behavior +for {kim_query} is to split these into individual variables of the form +{prefix_I}, where {prefix} is set to the the {kim_query} {variable} argument +and {I} ranges from 1 to the number of returned values. The number and order of +the returned values is determined by the type of query performed. + [Define a crystal at finite temperature accounting for thermal expansion] kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal -- GitLab From 03099d6e54e8b5832e945b32b81afcfeb3a3440b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 17:11:53 -0400 Subject: [PATCH 082/236] some more include file consistency changes --- src/atom_vec_body.cpp | 3 +-- src/atom_vec_body.h | 1 - src/atom_vec_ellipsoid.cpp | 2 +- src/atom_vec_line.cpp | 1 - src/atom_vec_sphere.cpp | 2 -- src/atom_vec_tri.cpp | 1 - src/balance.cpp | 3 --- src/balance.h | 1 - src/body.cpp | 3 --- src/body.h | 1 - src/bond.cpp | 2 +- src/bond_hybrid.cpp | 4 ++-- src/pointers.h | 5 +++++ 13 files changed, 10 insertions(+), 19 deletions(-) diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index d5f286c077..3e9528d6b9 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -11,17 +11,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include #include "atom_vec_body.h" +#include "my_pool_chunk.h" #include "style_body.h" #include "body.h" #include "atom.h" #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "memory.h" #include "error.h" diff --git a/src/atom_vec_body.h b/src/atom_vec_body.h index 09f03caca1..38309648fb 100644 --- a/src/atom_vec_body.h +++ b/src/atom_vec_body.h @@ -21,7 +21,6 @@ AtomStyle(body,AtomVecBody) #define LMP_ATOM_VEC_BODY_H #include "atom_vec.h" -#include "my_pool_chunk.h" namespace LAMMPS_NS { diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 2bf3f683d0..ad167bef79 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -16,11 +16,11 @@ ------------------------------------------------------------------------- */ #include +#include #include "atom_vec_ellipsoid.h" #include "math_extra.h" #include "atom.h" #include "comm.h" -#include "force.h" #include "domain.h" #include "modify.h" #include "fix.h" diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index 020b622c93..6b197d2663 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -19,7 +19,6 @@ #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "math_const.h" #include "memory.h" diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index dec98e5200..b3f4bfe391 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include #include "atom_vec_sphere.h" @@ -19,7 +18,6 @@ #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "fix_adapt.h" #include "math_const.h" diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 8fbe0a92dc..b0b6eca19b 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -20,7 +20,6 @@ #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "math_const.h" #include "memory.h" diff --git a/src/balance.cpp b/src/balance.cpp index 61ac895467..04f342b69b 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -20,7 +20,6 @@ #include #include -#include #include #include "balance.h" #include "atom.h" @@ -30,7 +29,6 @@ #include "domain.h" #include "force.h" #include "update.h" -#include "group.h" #include "modify.h" #include "fix_store.h" #include "imbalance.h" @@ -39,7 +37,6 @@ #include "imbalance_neigh.h" #include "imbalance_store.h" #include "imbalance_var.h" -#include "timer.h" #include "memory.h" #include "error.h" diff --git a/src/balance.h b/src/balance.h index 420031502a..424da33757 100644 --- a/src/balance.h +++ b/src/balance.h @@ -20,7 +20,6 @@ CommandStyle(balance,Balance) #ifndef LMP_BALANCE_H #define LMP_BALANCE_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/body.cpp b/src/body.cpp index 78e2f5d71b..10f88bd43b 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -11,11 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include #include "body.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/body.h b/src/body.h index 59001620f8..44581b75f6 100644 --- a/src/body.h +++ b/src/body.h @@ -16,7 +16,6 @@ #include "pointers.h" #include "atom_vec_body.h" -#include "my_pool_chunk.h" namespace LAMMPS_NS { diff --git a/src/bond.cpp b/src/bond.cpp index edcd869425..0d50b7e3e5 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "bond.h" #include "atom.h" #include "comm.h" diff --git a/src/bond_hybrid.cpp b/src/bond_hybrid.cpp index 65609b4b6e..0fb23a3214 100644 --- a/src/bond_hybrid.cpp +++ b/src/bond_hybrid.cpp @@ -11,13 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include #include #include #include "bond_hybrid.h" #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/pointers.h b/src/pointers.h index f9ef229c90..5df5b72d47 100644 --- a/src/pointers.h +++ b/src/pointers.h @@ -39,6 +39,11 @@ namespace LAMMPS_NS { enum ExecutionSpace{Host,Device}; +// global forward declarations + +template class MyPoolChunk; +template class MyPage; + class Pointers { public: Pointers(LAMMPS *ptr) : -- GitLab From 2c0a66b7f8c21ea580dc7bb893461d3585969559 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 20:50:25 -0400 Subject: [PATCH 083/236] increase buffer size of fix tune/kspace. header cleanup. remove use of iostreams --- src/KSPACE/fix_tune_kspace.cpp | 41 +++++++++++++++++----------------- src/KSPACE/fix_tune_kspace.h | 9 ++++---- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/KSPACE/fix_tune_kspace.cpp b/src/KSPACE/fix_tune_kspace.cpp index 0c726985dc..2b22b44340 100644 --- a/src/KSPACE/fix_tune_kspace.cpp +++ b/src/KSPACE/fix_tune_kspace.cpp @@ -15,13 +15,11 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include #include -#include +#include #include "fix_tune_kspace.h" #include "update.h" -#include "domain.h" -#include "atom.h" -#include "comm.h" #include "force.h" #include "kspace.h" #include "pair.h" @@ -31,9 +29,6 @@ #include "neighbor.h" #include "modify.h" #include "compute.h" -#include -#include -#include #define SWAP(a,b) {temp=(a);(a)=(b);(b)=temp;} #define SIGN(a,b) ((b) >= 0.0 ? fabs(a) : -fabs(a)) #define GOLD 1.618034 @@ -101,7 +96,7 @@ void FixTuneKspace::init() double old_acc = force->kspace->accuracy/force->kspace->two_charge_force; char old_acc_str[16]; snprintf(old_acc_str,16,"%g",old_acc); - strcpy(new_acc_str,old_acc_str); + strncpy(new_acc_str,old_acc_str,16); int itmp; double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); @@ -131,36 +126,37 @@ void FixTuneKspace::pre_exchange() // test Ewald store_old_kspace_settings(); strcpy(new_kspace_style,"ewald"); - sprintf(new_pair_style,"%s/long",base_pair_style); + snprintf(new_pair_style,64,"%s/long",base_pair_style); update_pair_style(new_pair_style,pair_cut_coul); update_kspace_style(new_kspace_style,new_acc_str); } else if (niter == 2) { // test PPPM store_old_kspace_settings(); strcpy(new_kspace_style,"pppm"); - sprintf(new_pair_style,"%s/long",base_pair_style); + snprintf(new_pair_style,64,"%s/long",base_pair_style); update_pair_style(new_pair_style,pair_cut_coul); update_kspace_style(new_kspace_style,new_acc_str); } else if (niter == 3) { // test MSM store_old_kspace_settings(); strcpy(new_kspace_style,"msm"); - sprintf(new_pair_style,"%s/msm",base_pair_style); + snprintf(new_pair_style,64,"%s/msm",base_pair_style); update_pair_style(new_pair_style,pair_cut_coul); update_kspace_style(new_kspace_style,new_acc_str); } else if (niter == 4) { store_old_kspace_settings(); - cout << "ewald_time = " << ewald_time << endl; - cout << "pppm_time = " << pppm_time << endl; - cout << "msm_time = " << msm_time << endl; + if (screen) fprintf(screen,"ewald_time = %g\npppm_time = %g\nmsm_time = %g", + ewald_time, pppm_time, msm_time); + if (logfile) fprintf(logfile,"ewald_time = %g\npppm_time = %g\nmsm_time = %g", + ewald_time, pppm_time, msm_time); // switch to fastest one strcpy(new_kspace_style,"ewald"); - sprintf(new_pair_style,"%s/long",base_pair_style); + snprintf(new_pair_style,64,"%s/long",base_pair_style); if (pppm_time < ewald_time && pppm_time < msm_time) strcpy(new_kspace_style,"pppm"); else if (msm_time < pppm_time && msm_time < ewald_time) { strcpy(new_kspace_style,"msm"); - sprintf(new_pair_style,"%s/msm",base_pair_style); + snprintf(new_pair_style,64,"%s/msm",base_pair_style); } update_pair_style(new_pair_style,pair_cut_coul); update_kspace_style(new_kspace_style,new_acc_str); @@ -243,8 +239,8 @@ void FixTuneKspace::update_pair_style(char *new_pair_style, p_pair_settings_file = tmpfile(); force->pair->write_restart(p_pair_settings_file); rewind(p_pair_settings_file); - - cout << "Creating new pair style: " << new_pair_style << endl; + if (screen) fprintf(screen,"Creating new pair style: %s\n",new_pair_style); + if (logfile) fprintf(logfile,"Creating new pair style: %s\n",new_pair_style); // delete old pair style and create new one force->create_pair(new_pair_style,1); @@ -253,7 +249,8 @@ void FixTuneKspace::update_pair_style(char *new_pair_style, double *pcutoff = (double *) force->pair->extract("cut_coul",itmp); double current_cutoff = *pcutoff; - cout << "Coulomb cutoff for real space: " << current_cutoff << endl; + if (screen) fprintf(screen,"Coulomb cutoff for real space: %g\n", current_cutoff); + if (logfile) fprintf(logfile,"Coulomb cutoff for real space: %g\n", current_cutoff); // close temporary file fclose(p_pair_settings_file); @@ -321,7 +318,8 @@ void FixTuneKspace::adjust_rcut(double time) int itmp; double *p_cutoff = (double *) force->pair->extract("cut_coul",itmp); double current_cutoff = *p_cutoff; - cout << "Old Coulomb cutoff for real space: " << current_cutoff << endl; + if (screen) fprintf(screen,"Old Coulomb cutoff for real space: %g\n",current_cutoff); + if (logfile) fprintf(logfile,"Old Coulomb cutoff for real space: %g\n",current_cutoff); // use Brent's method from Numerical Recipes to find optimal real space cutoff @@ -391,7 +389,8 @@ void FixTuneKspace::adjust_rcut(double time) // report the new cutoff double *new_cutoff = (double *) force->pair->extract("cut_coul",itmp); current_cutoff = *new_cutoff; - cout << "Adjusted Coulomb cutoff for real space: " << current_cutoff << endl; + if (screen) fprintf(screen,"Adjusted Coulomb cutoff for real space: %g\n", current_cutoff); + if (logfile) fprintf(logfile,"Adjusted Coulomb cutoff for real space: %g\n", current_cutoff); store_old_kspace_settings(); update_pair_style(new_pair_style,pair_cut_coul); diff --git a/src/KSPACE/fix_tune_kspace.h b/src/KSPACE/fix_tune_kspace.h index 6f40fc8711..1ccd735317 100644 --- a/src/KSPACE/fix_tune_kspace.h +++ b/src/KSPACE/fix_tune_kspace.h @@ -20,7 +20,6 @@ FixStyle(tune/kspace,FixTuneKspace) #ifndef LMP_FIX_TUNE_KSPACE_H #define LMP_FIX_TUNE_KSPACE_H -#include #include "fix.h" namespace LAMMPS_NS { @@ -52,10 +51,10 @@ class FixTuneKspace : public Fix { double ewald_time,pppm_time,msm_time; double pair_cut_coul; - char new_acc_str[12]; - char new_kspace_style[20]; - char new_pair_style[20]; - char base_pair_style[20]; + char new_acc_str[16]; + char new_kspace_style[64]; + char new_pair_style[64]; + char base_pair_style[64]; int old_differentiation_flag; int old_slabflag; -- GitLab From 932f052cbf0cf4e94a4df52bbe3414dfeca90959 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 20:52:23 -0400 Subject: [PATCH 084/236] more header cleanup --- src/GPU/pair_vashishta_gpu.cpp | 1 - src/angle_deprecated.cpp | 1 - src/angle_hybrid.cpp | 1 - src/atom.cpp | 1 - src/atom_map.cpp | 2 +- src/atom_vec.cpp | 1 - src/atom_vec_hybrid.h | 1 - src/bond_zero.cpp | 4 ++-- src/change_box.cpp | 1 - src/citeme.cpp | 3 +-- src/citeme.h | 3 +-- src/comm.cpp | 1 + src/comm_brick.cpp | 8 -------- src/hashlittle.cpp | 2 +- src/lammps.cpp | 1 + 15 files changed, 8 insertions(+), 23 deletions(-) diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index b496359b8a..5539653756 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -14,7 +14,6 @@ /* ---------------------------------------------------------------------- Contributing author: Anders Hafreager (UiO) ------------------------------------------------------------------------- */ -#include #include #include #include diff --git a/src/angle_deprecated.cpp b/src/angle_deprecated.cpp index 73fcccc53a..b5af217b7b 100644 --- a/src/angle_deprecated.cpp +++ b/src/angle_deprecated.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include -#include #include "angle_deprecated.h" #include "angle_hybrid.h" #include "comm.h" diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp index 48bb241100..47baf770a5 100644 --- a/src/angle_hybrid.cpp +++ b/src/angle_hybrid.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include "angle_hybrid.h" diff --git a/src/atom.cpp b/src/atom.cpp index b79febfc20..eab8a3063d 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include #include "atom.h" diff --git a/src/atom_map.cpp b/src/atom_map.cpp index 35d7435ae2..b14ebdba68 100644 --- a/src/atom_map.cpp +++ b/src/atom_map.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "lmptype.h" +#include "pointers.h" #include #include #include "atom.h" diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 91e1980dd0..a7ca6fcb19 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include #include "atom_vec.h" diff --git a/src/atom_vec_hybrid.h b/src/atom_vec_hybrid.h index a027923a17..8129baccba 100644 --- a/src/atom_vec_hybrid.h +++ b/src/atom_vec_hybrid.h @@ -20,7 +20,6 @@ AtomStyle(hybrid,AtomVecHybrid) #ifndef LMP_ATOM_VEC_HYBRID_H #define LMP_ATOM_VEC_HYBRID_H -#include #include "atom_vec.h" namespace LAMMPS_NS { diff --git a/src/bond_zero.cpp b/src/bond_zero.cpp index 0847cf9e6b..3932846cb4 100644 --- a/src/bond_zero.cpp +++ b/src/bond_zero.cpp @@ -15,8 +15,8 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "bond_zero.h" #include "atom.h" diff --git a/src/change_box.cpp b/src/change_box.cpp index b7d3cb245f..1fed65b430 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -13,7 +13,6 @@ #include #include -#include #include #include "change_box.h" #include "atom.h" diff --git a/src/citeme.cpp b/src/citeme.cpp index d021722671..24896b448c 100644 --- a/src/citeme.cpp +++ b/src/citeme.cpp @@ -11,10 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include "citeme.h" -#include "version.h" #include "universe.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/citeme.h b/src/citeme.h index 262b284337..c383ec2227 100644 --- a/src/citeme.h +++ b/src/citeme.h @@ -15,7 +15,6 @@ #define LMP_CITEME_H #include "pointers.h" -#include #include namespace LAMMPS_NS { @@ -29,7 +28,7 @@ class CiteMe : protected Pointers { private: FILE *fp; // opaque pointer to log.cite file object typedef std::set citeset; - citeset *cs; // registered set of publications + citeset *cs; // registered set of publications }; } diff --git a/src/comm.cpp b/src/comm.cpp index 052de93793..5f846cf292 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -21,6 +21,7 @@ #include "force.h" #include "pair.h" #include "modify.h" +#include "neighbor.h" #include "fix.h" #include "compute.h" #include "domain.h" diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index 330551aaed..47f60a3da6 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -19,23 +19,15 @@ #include #include #include -#include #include "comm_brick.h" -#include "comm_tiled.h" -#include "universe.h" #include "atom.h" #include "atom_vec.h" -#include "force.h" #include "pair.h" #include "domain.h" #include "neighbor.h" -#include "group.h" -#include "modify.h" #include "fix.h" #include "compute.h" -#include "output.h" #include "dump.h" -#include "math_extra.h" #include "error.h" #include "memory.h" diff --git a/src/hashlittle.cpp b/src/hashlittle.cpp index f612be9eeb..42109abd24 100644 --- a/src/hashlittle.cpp +++ b/src/hashlittle.cpp @@ -3,7 +3,7 @@ // bob_jenkins@burtleburtle.net #include -#include +#include #include // if the system defines the __BYTE_ORDER__ define, diff --git a/src/lammps.cpp b/src/lammps.cpp index 320d89ed52..83a2f057ee 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include +#include #include #include #include -- GitLab From 9c53a5ca3f1c756601b091a97ea5020a7187d2e5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 21:40:28 -0400 Subject: [PATCH 085/236] add first draft of a summary of the rules for include files --- doc/include-file-conventions.md | 125 ++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 doc/include-file-conventions.md diff --git a/doc/include-file-conventions.md b/doc/include-file-conventions.md new file mode 100644 index 0000000000..5152051ba5 --- /dev/null +++ b/doc/include-file-conventions.md @@ -0,0 +1,125 @@ +# Outline of include file conventions in LAMMPS + +This purpose of this document is to provide a point of reference +for LAMMPS developers and contributors as to what include files +and definitions to put where into LAMMPS source. +Last change 2019-06-27 + +## Table of Contents + + * [Motivation](#motivation) + * [Rules](#rules) + * [Tools](#tools) + * [Legacy Code](#legacy-code) + +## Motivation + +The conventions outlined in this document are supposed to help making +maintenance of the LAMMPS software easier. By trying to achieve +consistency across files contributed by different developers, it will +become easier to modify and adjust files by the code maintainers, and +overall the chance for errors or portability issues will be reduced. +Also the rules employed are supposed to minimize naming conflicts and +simplify dependencies between files (and thus speed up compilation), as +well as make otherwise hidden dependencies visible. + +## Rules + +Below are the various rules that are applied. Not all a enforced +strictly and automatically. If there are no significant side effects, +exceptions may be possible for cases, where a full compliance to the +rules may require a large effort compared to the benefit. + +### Core Files Versus Package Files + +All rules listed below are most strictly observed for core LAMMPS files. +Which are the files that are not part of a package and files of the +packages MOLECULE, MANYBODY, KSPACE, and RIGID. On the other end of +the spectrum are USER packages and legacy packages that predate these +rules and thus may not be fully compliant. Also new contributions +will be checked more closely, while existing code is incrementally +adapted to the rules as time and required effort permits. + +### System Versus Local Header Files + +All system or library provided include files are included with angular +brackets (examples: `#include ` or `#include `) while +include files provided with LAMMPS are included with double quotes +(examples: `#include "pointers.h"` or `#include "compute_temp.h"`). + +For headers declaring functions of the C-library, the corresponding +C++ versions should be included (examples: `#include ` or +`#include `). However, those are limited to those defined +in the C++98 standard. Some files thus must use the older style unless +the minimum C++ standard requirement of LAMMPS is lifted to C++11 or +even beyond (examples: `#include ` versus `#include ` +or `#include ` versus `#include `). + +### C++ Standard Compliance + +LAMMPS core files currently correspond to the C++98 standard. Files +requiring C++11 or later are only permitted in (optional) packages +and particularly packages that are not part of the list of commonly +used packages like MOLECULE, KSPACE, MANYBODY, or RIGID. + +Also, LAMMPS uses the C-style stdio library for I/O instead of iostreams. +Since using both at the same time can cause problems, iostreams should +be avoided where possible. + +### Lean Header Files + +Header files will typically contain the definition of a (single) class. +These header files should have as few include statements as possible. +This is particularly important for classes that implement a "style" and +thus use a macro of the kind `SomeStyle(some/name,SomeName)`. These will +be all included in the auto-generated `"some_style.h"` files which will +result in a high potential for direct or indirect symbol name clashes. + +In the ideal case, the header would only include one file defining the +parent class. That would typically be either `#include "pointers.h"` for +the `Pointers` class, or a header of a class derived from it like +`#include "pair.h"` for the `Pair` class and so on. Referenced to other +classes inside the class should be make through pointers, for which forward +declarations (inside the `LAMMPS_NS` or the new class'es namespace) can +be employed. The full definition will then be included into the corresponding +implementation file. In the given example from above, the header file +would be called `some_name.h` and the implementation `some_name.cpp` (all +lower case with underscores, while the class itself would be in camel case +and no underscores, and the style name with lower case names separated by +a forward slash). + +### Implementation Files + +In the implementation files (typically, those would have the same base name +as the corresponding header with a .cpp extension instead of .h) include +statments should follow the "include what you use" principle. + +### Special Cases and Exceptions + +#### pointers.h + +The `pointer.h` header file also includes `cstdio` and `lmptype.h` +(and throught it `stdint.h`, `intttypes.h`, and `climits`). +This means any header including `pointers.h` can assume that `FILE`, +`NULL`, `INT_MAX` are defined. + +## Tools + +The [Include What You Use tool](https://include-what-you-use.org/) +can be used to provide supporting information about compliance with +the rules listed here. There are some limitations and the IWWU tool +may give incorrect advice. The tools is activated by setting the +CMake variable `CMAKE_CXX_INCLUDE_WHAT_YOU_USE` variable to the +path of the `include-what-you-use` command. When activated, the +tool will be run after each compilation and provide suggestions for +which include files should be added or removed. + +## Legacy Code + +A lot of code predates the application of the rules in this document, +and those rules are a moving target as well. So there is going to be +significant chunks of code, that does not fully comply. This applies +for example to the USER-REAXC, or the USER-ATC package. The LAMMPS +developers are dedicated to make an effort to improve the compliance +and welcome volunteers wanting to help with the process. + -- GitLab From 86a9e4fca24a7cefc832333a3ff75a057763e370 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 21:40:50 -0400 Subject: [PATCH 086/236] make body package compile again --- src/BODY/body_nparticle.cpp | 1 + src/BODY/body_rounded_polygon.cpp | 1 + src/BODY/body_rounded_polyhedron.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/src/BODY/body_nparticle.cpp b/src/BODY/body_nparticle.cpp index 10529ad3af..21070107f5 100644 --- a/src/BODY/body_nparticle.cpp +++ b/src/BODY/body_nparticle.cpp @@ -13,6 +13,7 @@ #include #include "body_nparticle.h" +#include "my_pool_chunk.h" #include "math_extra.h" #include "atom_vec_body.h" #include "atom.h" diff --git a/src/BODY/body_rounded_polygon.cpp b/src/BODY/body_rounded_polygon.cpp index d352c789d7..f7741ada88 100644 --- a/src/BODY/body_rounded_polygon.cpp +++ b/src/BODY/body_rounded_polygon.cpp @@ -17,6 +17,7 @@ #include #include "body_rounded_polygon.h" +#include "my_pool_chunk.h" #include "atom_vec_body.h" #include "atom.h" #include "force.h" diff --git a/src/BODY/body_rounded_polyhedron.cpp b/src/BODY/body_rounded_polyhedron.cpp index 99a380a932..34d918f1f6 100644 --- a/src/BODY/body_rounded_polyhedron.cpp +++ b/src/BODY/body_rounded_polyhedron.cpp @@ -17,6 +17,7 @@ #include #include "body_rounded_polyhedron.h" +#include "my_pool_chunk.h" #include "atom_vec_body.h" #include "atom.h" #include "force.h" -- GitLab From 4ec3a508fc1731e5d6d3708005515ff0addace9f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 21:54:07 -0400 Subject: [PATCH 087/236] bulk removal of #include from header files --- src/CLASS2/angle_class2.h | 1 - src/CLASS2/bond_class2.h | 1 - src/CLASS2/dihedral_class2.h | 1 - src/CLASS2/improper_class2.h | 1 - src/GPU/pair_eam_gpu.h | 1 - src/KOKKOS/atom_vec_hybrid_kokkos.h | 1 - src/KOKKOS/pair_eam_alloy_kokkos.h | 1 - src/KOKKOS/pair_eam_fs_kokkos.h | 1 - src/KOKKOS/pair_eam_kokkos.h | 1 - src/KOKKOS/pair_hybrid_kokkos.h | 1 - src/KOKKOS/pair_reaxc_kokkos.h | 1 - src/KOKKOS/pair_tersoff_kokkos.h | 1 - src/KOKKOS/pair_tersoff_mod_kokkos.h | 1 - src/KOKKOS/pair_tersoff_zbl_kokkos.h | 1 - src/MANYBODY/fix_qeq_comb.h | 1 - src/MANYBODY/pair_eam.h | 1 - src/MANYBODY/pair_eim.h | 1 - src/MC/fix_atom_swap.h | 1 - src/MC/fix_gcmc.h | 1 - src/MISC/fix_deposit.h | 1 - src/MOLECULE/angle_charmm.h | 1 - src/MOLECULE/angle_cosine.h | 1 - src/MOLECULE/angle_cosine_delta.h | 1 - src/MOLECULE/angle_cosine_periodic.h | 1 - src/MOLECULE/angle_cosine_squared.h | 1 - src/MOLECULE/angle_harmonic.h | 1 - src/MOLECULE/angle_table.h | 1 - src/MOLECULE/bond_fene.h | 1 - src/MOLECULE/bond_fene_expand.h | 1 - src/MOLECULE/bond_gromos.h | 1 - src/MOLECULE/bond_harmonic.h | 1 - src/MOLECULE/bond_morse.h | 1 - src/MOLECULE/bond_nonlinear.h | 1 - src/MOLECULE/bond_quartic.h | 1 - src/MOLECULE/bond_table.h | 1 - src/MOLECULE/dihedral_charmm.h | 1 - src/MOLECULE/dihedral_charmmfsw.h | 1 - src/MOLECULE/dihedral_harmonic.h | 1 - src/MOLECULE/dihedral_helix.h | 1 - src/MOLECULE/dihedral_multi_harmonic.h | 1 - src/MOLECULE/dihedral_opls.h | 1 - src/MOLECULE/improper_cvff.h | 1 - src/MOLECULE/improper_harmonic.h | 1 - src/MOLECULE/improper_umbrella.h | 1 - src/REPLICA/neb.h | 1 - src/SPIN/neb_spin.h | 1 - src/USER-CGDNA/mf_oxdna.h | 1 - src/USER-CGSDK/angle_sdk.h | 1 - src/USER-DIFFRACTION/fix_saed_vtk.h | 1 - src/USER-INTEL/angle_charmm_intel.h | 1 - src/USER-INTEL/angle_harmonic_intel.h | 1 - src/USER-INTEL/bond_fene_intel.h | 1 - src/USER-INTEL/bond_harmonic_intel.h | 1 - src/USER-INTEL/improper_cvff_intel.h | 1 - src/USER-INTEL/improper_harmonic_intel.h | 1 - src/USER-INTEL/intel_simd.h | 1 - src/USER-INTEL/pair_eam_intel.h | 1 - src/USER-MANIFOLD/manifold_thylakoid.h | 1 - src/USER-MGPT/mgpt_readpot.h | 1 - src/USER-MGPT/pair_mgpt.h | 1 - src/USER-MISC/angle_cosine_shift.h | 1 - src/USER-MISC/angle_cosine_shift_exp.h | 1 - src/USER-MISC/angle_dipole.h | 1 - src/USER-MISC/angle_fourier.h | 1 - src/USER-MISC/angle_fourier_simple.h | 1 - src/USER-MISC/angle_quartic.h | 1 - src/USER-MISC/bond_harmonic_shift.h | 1 - src/USER-MISC/bond_harmonic_shift_cut.h | 1 - src/USER-MISC/dihedral_cosine_shift_exp.h | 1 - src/USER-MISC/dihedral_fourier.h | 1 - src/USER-MISC/dihedral_nharmonic.h | 1 - src/USER-MISC/dihedral_quadratic.h | 1 - src/USER-MISC/dihedral_spherical.h | 1 - src/USER-MISC/fix_ave_correlate_long.h | 1 - src/USER-MISC/fix_srp.h | 1 - src/USER-MISC/improper_cossq.h | 1 - src/USER-MISC/improper_distance.h | 1 - src/USER-MISC/improper_fourier.h | 1 - src/USER-MISC/improper_ring.h | 1 - src/USER-MOFFF/angle_class2_p6.h | 1 - src/USER-MOFFF/angle_cosine_buck6d.h | 1 - src/USER-MOFFF/improper_inversion_harmonic.h | 1 - src/USER-REAXC/fix_reaxc_bonds.h | 1 - src/bond_hybrid.h | 1 - src/bond_zero.h | 1 - src/citeme.cpp | 1 - src/comm_brick.cpp | 1 - src/comm_tiled.cpp | 5 +---- src/comm_tiled.h | 1 + src/compute.cpp | 4 ---- src/compute_adf.h | 1 - src/compute_rdf.h | 1 - src/dihedral_hybrid.h | 1 - src/dihedral_zero.h | 1 - src/fix_ave_atom.h | 1 - src/fix_ave_chunk.h | 1 - src/fix_ave_correlate.h | 1 - src/fix_ave_histo.h | 1 - src/fix_ave_histo_weight.h | 1 - src/fix_ave_time.h | 1 - src/fix_balance.h | 1 - src/fix_halt.h | 1 - src/fix_move.h | 1 - src/fix_print.h | 1 - src/fix_store.h | 1 - src/fix_tmd.h | 1 - src/force.h | 1 - src/group.h | 1 - src/image.h | 1 - src/imbalance.h | 1 - src/improper_hybrid.h | 1 - src/improper_zero.h | 1 - src/input.h | 1 - src/lammps.h | 1 - src/modify.h | 1 - src/pair_hybrid.h | 1 - src/read_data.h | 1 - src/read_dump.h | 1 - src/read_restart.h | 1 - src/universe.h | 1 - src/variable.h | 1 - src/write_coeff.h | 1 - src/write_data.h | 1 - src/write_restart.h | 1 - 124 files changed, 2 insertions(+), 129 deletions(-) diff --git a/src/CLASS2/angle_class2.h b/src/CLASS2/angle_class2.h index 8444ada057..cc155747ac 100644 --- a/src/CLASS2/angle_class2.h +++ b/src/CLASS2/angle_class2.h @@ -20,7 +20,6 @@ AngleStyle(class2,AngleClass2) #ifndef LMP_ANGLE_CLASS2_H #define LMP_ANGLE_CLASS2_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/CLASS2/bond_class2.h b/src/CLASS2/bond_class2.h index 89d930b548..f0fcc6825e 100644 --- a/src/CLASS2/bond_class2.h +++ b/src/CLASS2/bond_class2.h @@ -20,7 +20,6 @@ BondStyle(class2,BondClass2) #ifndef LMP_BOND_CLASS2_H #define LMP_BOND_CLASS2_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/CLASS2/dihedral_class2.h b/src/CLASS2/dihedral_class2.h index a4ea9e4bd9..32cd289137 100644 --- a/src/CLASS2/dihedral_class2.h +++ b/src/CLASS2/dihedral_class2.h @@ -20,7 +20,6 @@ DihedralStyle(class2,DihedralClass2) #ifndef LMP_DIHEDRAL_CLASS2_H #define LMP_DIHEDRAL_CLASS2_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/CLASS2/improper_class2.h b/src/CLASS2/improper_class2.h index 1cc3417731..cac805046a 100644 --- a/src/CLASS2/improper_class2.h +++ b/src/CLASS2/improper_class2.h @@ -20,7 +20,6 @@ ImproperStyle(class2,ImproperClass2) #ifndef LMP_IMPROPER_CLASS2_H #define LMP_IMPROPER_CLASS2_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/GPU/pair_eam_gpu.h b/src/GPU/pair_eam_gpu.h index 099529f3df..e4742a3bef 100644 --- a/src/GPU/pair_eam_gpu.h +++ b/src/GPU/pair_eam_gpu.h @@ -20,7 +20,6 @@ PairStyle(eam/gpu,PairEAMGPU) #ifndef LMP_PAIR_EAM_GPU_H #define LMP_PAIR_EAM_GPU_H -#include #include "pair_eam.h" namespace LAMMPS_NS { diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.h b/src/KOKKOS/atom_vec_hybrid_kokkos.h index 1bbbd26319..4cfb186b17 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.h +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.h @@ -20,7 +20,6 @@ AtomStyle(hybrid/kk,AtomVecHybridKokkos) #ifndef LMP_ATOM_VEC_HYBRID_KOKKOS_H #define LMP_ATOM_VEC_HYBRID_KOKKOS_H -#include #include "atom_vec_kokkos.h" #include "kokkos_type.h" diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.h b/src/KOKKOS/pair_eam_alloy_kokkos.h index 6593ccae73..e1dd9ab47d 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.h +++ b/src/KOKKOS/pair_eam_alloy_kokkos.h @@ -23,7 +23,6 @@ PairStyle(eam/alloy/kk/host,PairEAMAlloyKokkos) #ifndef LMP_PAIR_EAM_ALLOY_KOKKOS_H #define LMP_PAIR_EAM_ALLOY_KOKKOS_H -#include #include "kokkos_base.h" #include "pair_kokkos.h" #include "pair_eam.h" diff --git a/src/KOKKOS/pair_eam_fs_kokkos.h b/src/KOKKOS/pair_eam_fs_kokkos.h index f75605ff6d..e93977869e 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.h +++ b/src/KOKKOS/pair_eam_fs_kokkos.h @@ -23,7 +23,6 @@ PairStyle(eam/fs/kk/host,PairEAMFSKokkos) #ifndef LMP_PAIR_EAM_FS_KOKKOS_H #define LMP_PAIR_EAM_FS_KOKKOS_H -#include #include "kokkos_base.h" #include "pair_kokkos.h" #include "pair_eam.h" diff --git a/src/KOKKOS/pair_eam_kokkos.h b/src/KOKKOS/pair_eam_kokkos.h index 4040eba858..3bf89c549a 100644 --- a/src/KOKKOS/pair_eam_kokkos.h +++ b/src/KOKKOS/pair_eam_kokkos.h @@ -23,7 +23,6 @@ PairStyle(eam/kk/host,PairEAMKokkos) #ifndef LMP_PAIR_EAM_KOKKOS_H #define LMP_PAIR_EAM_KOKKOS_H -#include #include "kokkos_base.h" #include "pair_kokkos.h" #include "pair_eam.h" diff --git a/src/KOKKOS/pair_hybrid_kokkos.h b/src/KOKKOS/pair_hybrid_kokkos.h index 94e034f875..799354cf01 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.h +++ b/src/KOKKOS/pair_hybrid_kokkos.h @@ -20,7 +20,6 @@ PairStyle(hybrid/kk,PairHybridKokkos) #ifndef LMP_PAIR_HYBRID_KOKKOS_H #define LMP_PAIR_HYBRID_KOKKOS_H -#include #include "pair_hybrid.h" #include "pair_kokkos.h" #include "kokkos_type.h" diff --git a/src/KOKKOS/pair_reaxc_kokkos.h b/src/KOKKOS/pair_reaxc_kokkos.h index 89dfc4d884..783ea33c4e 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.h +++ b/src/KOKKOS/pair_reaxc_kokkos.h @@ -23,7 +23,6 @@ PairStyle(reax/c/kk/host,PairReaxCKokkos) #ifndef LMP_PAIR_REAXC_KOKKOS_H #define LMP_PAIR_REAXC_KOKKOS_H -#include #include "pair_kokkos.h" #include "pair_reaxc.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_kokkos.h b/src/KOKKOS/pair_tersoff_kokkos.h index f73d4fe2d8..7d41fe2346 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.h +++ b/src/KOKKOS/pair_tersoff_kokkos.h @@ -23,7 +23,6 @@ PairStyle(tersoff/kk/host,PairTersoffKokkos) #ifndef LMP_PAIR_TERSOFF_KOKKOS_H #define LMP_PAIR_TERSOFF_KOKKOS_H -#include #include "pair_kokkos.h" #include "pair_tersoff.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.h b/src/KOKKOS/pair_tersoff_mod_kokkos.h index d7c94ffc93..889e1eadfa 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.h +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.h @@ -23,7 +23,6 @@ PairStyle(tersoff/mod/kk/host,PairTersoffMODKokkos) #ifndef LMP_PAIR_TERSOFF_MOD_KOKKOS_H #define LMP_PAIR_TERSOFF_MOD_KOKKOS_H -#include #include "pair_kokkos.h" #include "pair_tersoff_mod.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.h b/src/KOKKOS/pair_tersoff_zbl_kokkos.h index 3af4e0d8eb..0c7fa2e963 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.h +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.h @@ -23,7 +23,6 @@ PairStyle(tersoff/zbl/kk/host,PairTersoffZBLKokkos) #ifndef LMP_PAIR_TERSOFF_ZBL_KOKKOS_H #define LMP_PAIR_TERSOFF_ZBL_KOKKOS_H -#include #include "pair_kokkos.h" #include "pair_tersoff_zbl.h" #include "neigh_list_kokkos.h" diff --git a/src/MANYBODY/fix_qeq_comb.h b/src/MANYBODY/fix_qeq_comb.h index dd4c9f7290..c3a0ac08f3 100644 --- a/src/MANYBODY/fix_qeq_comb.h +++ b/src/MANYBODY/fix_qeq_comb.h @@ -20,7 +20,6 @@ FixStyle(qeq/comb,FixQEQComb) #ifndef LMP_FIX_QEQ_COMB_H #define LMP_FIX_QEQ_COMB_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_eam.h b/src/MANYBODY/pair_eam.h index 234552157b..8bcb44c347 100644 --- a/src/MANYBODY/pair_eam.h +++ b/src/MANYBODY/pair_eam.h @@ -20,7 +20,6 @@ PairStyle(eam,PairEAM) #ifndef LMP_PAIR_EAM_H #define LMP_PAIR_EAM_H -#include #include "pair.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_eim.h b/src/MANYBODY/pair_eim.h index 50f9934c44..f9fb2d5a77 100644 --- a/src/MANYBODY/pair_eim.h +++ b/src/MANYBODY/pair_eim.h @@ -20,7 +20,6 @@ PairStyle(eim,PairEIM) #ifndef LMP_PAIR_EIM_H #define LMP_PAIR_EIM_H -#include #include "pair.h" namespace LAMMPS_NS { diff --git a/src/MC/fix_atom_swap.h b/src/MC/fix_atom_swap.h index 19895704f1..a5ce89b16b 100644 --- a/src/MC/fix_atom_swap.h +++ b/src/MC/fix_atom_swap.h @@ -20,7 +20,6 @@ FixStyle(atom/swap,FixAtomSwap) #ifndef LMP_FIX_MCSWAP_H #define LMP_FIX_MCSWAP_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MC/fix_gcmc.h b/src/MC/fix_gcmc.h index 5d0b7aab8f..da4232d19b 100644 --- a/src/MC/fix_gcmc.h +++ b/src/MC/fix_gcmc.h @@ -20,7 +20,6 @@ FixStyle(gcmc,FixGCMC) #ifndef LMP_FIX_GCMC_H #define LMP_FIX_GCMC_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MISC/fix_deposit.h b/src/MISC/fix_deposit.h index 38958b80e7..e3104c890d 100644 --- a/src/MISC/fix_deposit.h +++ b/src/MISC/fix_deposit.h @@ -20,7 +20,6 @@ FixStyle(deposit,FixDeposit) #ifndef LMP_FIX_DEPOSIT_H #define LMP_FIX_DEPOSIT_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_charmm.h b/src/MOLECULE/angle_charmm.h index 2228ad8732..444c833d37 100644 --- a/src/MOLECULE/angle_charmm.h +++ b/src/MOLECULE/angle_charmm.h @@ -20,7 +20,6 @@ AngleStyle(charmm,AngleCharmm) #ifndef LMP_ANGLE_CHARMM_H #define LMP_ANGLE_CHARMM_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine.h b/src/MOLECULE/angle_cosine.h index f2406bc5dd..ca1f4178f8 100644 --- a/src/MOLECULE/angle_cosine.h +++ b/src/MOLECULE/angle_cosine.h @@ -20,7 +20,6 @@ AngleStyle(cosine,AngleCosine) #ifndef LMP_ANGLE_COSINE_H #define LMP_ANGLE_COSINE_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine_delta.h b/src/MOLECULE/angle_cosine_delta.h index 1e19ecaf79..70b574b234 100644 --- a/src/MOLECULE/angle_cosine_delta.h +++ b/src/MOLECULE/angle_cosine_delta.h @@ -20,7 +20,6 @@ AngleStyle(cosine/delta,AngleCosineDelta) #ifndef LMP_ANGLE_COSINE_DELTA_H #define LMP_ANGLE_COSINE_DELTA_H -#include #include "angle_cosine_squared.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine_periodic.h b/src/MOLECULE/angle_cosine_periodic.h index e131e85101..f0188b6c17 100644 --- a/src/MOLECULE/angle_cosine_periodic.h +++ b/src/MOLECULE/angle_cosine_periodic.h @@ -20,7 +20,6 @@ AngleStyle(cosine/periodic, AngleCosinePeriodic) #ifndef LMP_ANGLE_PERIODIC_H #define LMP_ANGLE_PERIODIC_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_cosine_squared.h b/src/MOLECULE/angle_cosine_squared.h index 8e8c84c0f9..a19a923850 100644 --- a/src/MOLECULE/angle_cosine_squared.h +++ b/src/MOLECULE/angle_cosine_squared.h @@ -20,7 +20,6 @@ AngleStyle(cosine/squared,AngleCosineSquared) #ifndef LMP_ANGLE_COSINE_SQUARED_H #define LMP_ANGLE_COSINE_SQUARED_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_harmonic.h b/src/MOLECULE/angle_harmonic.h index e0c067653b..f371178d58 100644 --- a/src/MOLECULE/angle_harmonic.h +++ b/src/MOLECULE/angle_harmonic.h @@ -20,7 +20,6 @@ AngleStyle(harmonic,AngleHarmonic) #ifndef LMP_ANGLE_HARMONIC_H #define LMP_ANGLE_HARMONIC_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/angle_table.h b/src/MOLECULE/angle_table.h index 0088ace39b..46633d28cc 100644 --- a/src/MOLECULE/angle_table.h +++ b/src/MOLECULE/angle_table.h @@ -20,7 +20,6 @@ AngleStyle(table,AngleTable) #ifndef LMP_ANGLE_TABLE_H #define LMP_ANGLE_TABLE_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_fene.h b/src/MOLECULE/bond_fene.h index 58cd6ce289..1963e3ca22 100644 --- a/src/MOLECULE/bond_fene.h +++ b/src/MOLECULE/bond_fene.h @@ -20,7 +20,6 @@ BondStyle(fene,BondFENE) #ifndef LMP_BOND_FENE_H #define LMP_BOND_FENE_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_fene_expand.h b/src/MOLECULE/bond_fene_expand.h index cb316ac5f2..8cfc17dc68 100644 --- a/src/MOLECULE/bond_fene_expand.h +++ b/src/MOLECULE/bond_fene_expand.h @@ -20,7 +20,6 @@ BondStyle(fene/expand,BondFENEExpand) #ifndef LMP_BOND_FENE_EXPAND_H #define LMP_BOND_FENE_EXPAND_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_gromos.h b/src/MOLECULE/bond_gromos.h index c26ad64b3d..966b914437 100644 --- a/src/MOLECULE/bond_gromos.h +++ b/src/MOLECULE/bond_gromos.h @@ -20,7 +20,6 @@ BondStyle(gromos,BondGromos) #ifndef LMP_BOND_GROMOS_H #define LMP_BOND_GROMOS_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_harmonic.h b/src/MOLECULE/bond_harmonic.h index 5c692b2a8e..576e63629b 100644 --- a/src/MOLECULE/bond_harmonic.h +++ b/src/MOLECULE/bond_harmonic.h @@ -20,7 +20,6 @@ BondStyle(harmonic,BondHarmonic) #ifndef LMP_BOND_HARMONIC_H #define LMP_BOND_HARMONIC_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_morse.h b/src/MOLECULE/bond_morse.h index c4d60bc217..030a94a8da 100644 --- a/src/MOLECULE/bond_morse.h +++ b/src/MOLECULE/bond_morse.h @@ -20,7 +20,6 @@ BondStyle(morse,BondMorse) #ifndef LMP_BOND_MORSE_H #define LMP_BOND_MORSE_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_nonlinear.h b/src/MOLECULE/bond_nonlinear.h index 175421264b..7782b93778 100644 --- a/src/MOLECULE/bond_nonlinear.h +++ b/src/MOLECULE/bond_nonlinear.h @@ -20,7 +20,6 @@ BondStyle(nonlinear,BondNonlinear) #ifndef LMP_BOND_NONLINEAR_H #define LMP_BOND_NONLINEAR_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_quartic.h b/src/MOLECULE/bond_quartic.h index 2aaa76e2c3..60ccf307b9 100644 --- a/src/MOLECULE/bond_quartic.h +++ b/src/MOLECULE/bond_quartic.h @@ -20,7 +20,6 @@ BondStyle(quartic,BondQuartic) #ifndef LMP_BOND_QUARTIC_H #define LMP_BOND_QUARTIC_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/bond_table.h b/src/MOLECULE/bond_table.h index 5766239167..3db3ade3ab 100644 --- a/src/MOLECULE/bond_table.h +++ b/src/MOLECULE/bond_table.h @@ -20,7 +20,6 @@ BondStyle(table,BondTable) #ifndef LMP_BOND_TABLE_H #define LMP_BOND_TABLE_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_charmm.h b/src/MOLECULE/dihedral_charmm.h index 8f51b398db..4be3925dad 100644 --- a/src/MOLECULE/dihedral_charmm.h +++ b/src/MOLECULE/dihedral_charmm.h @@ -20,7 +20,6 @@ DihedralStyle(charmm,DihedralCharmm) #ifndef LMP_DIHEDRAL_CHARMM_H #define LMP_DIHEDRAL_CHARMM_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_charmmfsw.h b/src/MOLECULE/dihedral_charmmfsw.h index dd31067a8d..b33250004b 100644 --- a/src/MOLECULE/dihedral_charmmfsw.h +++ b/src/MOLECULE/dihedral_charmmfsw.h @@ -20,7 +20,6 @@ DihedralStyle(charmmfsw,DihedralCharmmfsw) #ifndef LMP_DIHEDRAL_CHARMMFSW_H #define LMP_DIHEDRAL_CHARMMFSW_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_harmonic.h b/src/MOLECULE/dihedral_harmonic.h index 2031261256..938e59918b 100644 --- a/src/MOLECULE/dihedral_harmonic.h +++ b/src/MOLECULE/dihedral_harmonic.h @@ -20,7 +20,6 @@ DihedralStyle(harmonic,DihedralHarmonic) #ifndef LMP_DIHEDRAL_HARMONIC_H #define LMP_DIHEDRAL_HARMONIC_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_helix.h b/src/MOLECULE/dihedral_helix.h index 745ab84115..0213c59e8a 100644 --- a/src/MOLECULE/dihedral_helix.h +++ b/src/MOLECULE/dihedral_helix.h @@ -20,7 +20,6 @@ DihedralStyle(helix,DihedralHelix) #ifndef LMP_DIHEDRAL_HELIX_H #define LMP_DIHEDRAL_HELIX_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_multi_harmonic.h b/src/MOLECULE/dihedral_multi_harmonic.h index 32f17e75ae..bb3d7183f7 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.h +++ b/src/MOLECULE/dihedral_multi_harmonic.h @@ -20,7 +20,6 @@ DihedralStyle(multi/harmonic,DihedralMultiHarmonic) #ifndef LMP_DIHEDRAL_MULTI_HARMONIC_H #define LMP_DIHEDRAL_MULTI_HARMONIC_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/dihedral_opls.h b/src/MOLECULE/dihedral_opls.h index c1e64ada1e..01878173cd 100644 --- a/src/MOLECULE/dihedral_opls.h +++ b/src/MOLECULE/dihedral_opls.h @@ -20,7 +20,6 @@ DihedralStyle(opls,DihedralOPLS) #ifndef LMP_DIHEDRAL_OPLS_H #define LMP_DIHEDRAL_OPLS_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/improper_cvff.h b/src/MOLECULE/improper_cvff.h index d4c30cc2ee..055d2ca9b8 100644 --- a/src/MOLECULE/improper_cvff.h +++ b/src/MOLECULE/improper_cvff.h @@ -20,7 +20,6 @@ ImproperStyle(cvff,ImproperCvff) #ifndef LMP_IMPROPER_CVFF_H #define LMP_IMPROPER_CVFF_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/improper_harmonic.h b/src/MOLECULE/improper_harmonic.h index fbbb8d33d6..5949c6911e 100644 --- a/src/MOLECULE/improper_harmonic.h +++ b/src/MOLECULE/improper_harmonic.h @@ -20,7 +20,6 @@ ImproperStyle(harmonic,ImproperHarmonic) #ifndef LMP_IMPROPER_HARMONIC_H #define LMP_IMPROPER_HARMONIC_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/MOLECULE/improper_umbrella.h b/src/MOLECULE/improper_umbrella.h index dc2262d01c..da9d6c8f4b 100644 --- a/src/MOLECULE/improper_umbrella.h +++ b/src/MOLECULE/improper_umbrella.h @@ -20,7 +20,6 @@ ImproperStyle(umbrella,ImproperUmbrella) #ifndef LMP_IMPROPER_UMBRELLA_H #define LMP_IMPROPER_UMBRELLA_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/REPLICA/neb.h b/src/REPLICA/neb.h index f585a0c8a7..b53992711c 100644 --- a/src/REPLICA/neb.h +++ b/src/REPLICA/neb.h @@ -20,7 +20,6 @@ CommandStyle(neb,NEB) #ifndef LMP_NEB_H #define LMP_NEB_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/SPIN/neb_spin.h b/src/SPIN/neb_spin.h index c128eaffa4..568eca0957 100644 --- a/src/SPIN/neb_spin.h +++ b/src/SPIN/neb_spin.h @@ -20,7 +20,6 @@ CommandStyle(neb/spin,NEBSpin) #ifndef LMP_NEB_SPIN_H #define LMP_NEB_SPIN_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/USER-CGDNA/mf_oxdna.h b/src/USER-CGDNA/mf_oxdna.h index c63a37cde2..e4ed1bbd03 100644 --- a/src/USER-CGDNA/mf_oxdna.h +++ b/src/USER-CGDNA/mf_oxdna.h @@ -14,7 +14,6 @@ #ifndef MF_OXDNA_H #define MF_OXDNA_H -#include #include "math_extra.h" namespace MFOxdna { diff --git a/src/USER-CGSDK/angle_sdk.h b/src/USER-CGSDK/angle_sdk.h index 293004ad4d..2e94b44470 100644 --- a/src/USER-CGSDK/angle_sdk.h +++ b/src/USER-CGSDK/angle_sdk.h @@ -20,7 +20,6 @@ AngleStyle(sdk,AngleSDK) #ifndef LMP_ANGLE_SDK_H #define LMP_ANGLE_SDK_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-DIFFRACTION/fix_saed_vtk.h b/src/USER-DIFFRACTION/fix_saed_vtk.h index 2fc09c781c..94abbf0194 100644 --- a/src/USER-DIFFRACTION/fix_saed_vtk.h +++ b/src/USER-DIFFRACTION/fix_saed_vtk.h @@ -20,7 +20,6 @@ FixStyle(saed/vtk,FixSAEDVTK) #ifndef LMP_FIX_SAED_VTK_H #define LMP_FIX_SAED_VTK_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/USER-INTEL/angle_charmm_intel.h b/src/USER-INTEL/angle_charmm_intel.h index 5d173ee6a9..155ecfaff9 100644 --- a/src/USER-INTEL/angle_charmm_intel.h +++ b/src/USER-INTEL/angle_charmm_intel.h @@ -24,7 +24,6 @@ AngleStyle(charmm/intel,AngleCharmmIntel) #ifndef LMP_ANGLE_CHARMM_INTEL_H #define LMP_ANGLE_CHARMM_INTEL_H -#include #include "angle_charmm.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/angle_harmonic_intel.h b/src/USER-INTEL/angle_harmonic_intel.h index e7768542a1..c00292f7ce 100644 --- a/src/USER-INTEL/angle_harmonic_intel.h +++ b/src/USER-INTEL/angle_harmonic_intel.h @@ -24,7 +24,6 @@ AngleStyle(harmonic/intel,AngleHarmonicIntel) #ifndef LMP_ANGLE_HARMONIC_INTEL_H #define LMP_ANGLE_HARMONIC_INTEL_H -#include #include "angle_harmonic.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/bond_fene_intel.h b/src/USER-INTEL/bond_fene_intel.h index afe3b85470..58fcdb8669 100644 --- a/src/USER-INTEL/bond_fene_intel.h +++ b/src/USER-INTEL/bond_fene_intel.h @@ -24,7 +24,6 @@ BondStyle(fene/intel,BondFENEIntel) #ifndef LMP_BOND_FENE_INTEL_H #define LMP_BOND_FENE_INTEL_H -#include #include "bond_fene.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/bond_harmonic_intel.h b/src/USER-INTEL/bond_harmonic_intel.h index b86a560d6e..3c1d050a3b 100644 --- a/src/USER-INTEL/bond_harmonic_intel.h +++ b/src/USER-INTEL/bond_harmonic_intel.h @@ -24,7 +24,6 @@ BondStyle(harmonic/intel,BondHarmonicIntel) #ifndef LMP_BOND_HARMONIC_INTEL_H #define LMP_BOND_HARMONIC_INTEL_H -#include #include "bond_harmonic.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/improper_cvff_intel.h b/src/USER-INTEL/improper_cvff_intel.h index e815fa75c9..812b49d50c 100644 --- a/src/USER-INTEL/improper_cvff_intel.h +++ b/src/USER-INTEL/improper_cvff_intel.h @@ -24,7 +24,6 @@ ImproperStyle(cvff/intel,ImproperCvffIntel) #ifndef LMP_IMPROPER_CVFF_INTEL_H #define LMP_IMPROPER_CVFF_INTEL_H -#include #include "improper_cvff.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/improper_harmonic_intel.h b/src/USER-INTEL/improper_harmonic_intel.h index ce38e8fc31..6d7c829961 100644 --- a/src/USER-INTEL/improper_harmonic_intel.h +++ b/src/USER-INTEL/improper_harmonic_intel.h @@ -24,7 +24,6 @@ ImproperStyle(harmonic/intel,ImproperHarmonicIntel) #ifndef LMP_IMPROPER_HARMONIC_INTEL_H #define LMP_IMPROPER_HARMONIC_INTEL_H -#include #include "improper_harmonic.h" #include "fix_intel.h" diff --git a/src/USER-INTEL/intel_simd.h b/src/USER-INTEL/intel_simd.h index 75fc9828b9..9022f439c4 100644 --- a/src/USER-INTEL/intel_simd.h +++ b/src/USER-INTEL/intel_simd.h @@ -29,7 +29,6 @@ authors for more details. #ifndef INTEL_SIMD_H #define INTEL_SIMD_H -#include #include "intel_preprocess.h" #include "immintrin.h" diff --git a/src/USER-INTEL/pair_eam_intel.h b/src/USER-INTEL/pair_eam_intel.h index 83b1fbf6a1..a9590f6b3d 100644 --- a/src/USER-INTEL/pair_eam_intel.h +++ b/src/USER-INTEL/pair_eam_intel.h @@ -20,7 +20,6 @@ PairStyle(eam/intel,PairEAMIntel) #ifndef LMP_PAIR_EAM_INTEL_H #define LMP_PAIR_EAM_INTEL_H -#include #include "pair_eam.h" #include "fix_intel.h" diff --git a/src/USER-MANIFOLD/manifold_thylakoid.h b/src/USER-MANIFOLD/manifold_thylakoid.h index 5e5d3b9c41..d8ebe2e94f 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid.h +++ b/src/USER-MANIFOLD/manifold_thylakoid.h @@ -3,7 +3,6 @@ #include "manifold.h" #include -#include #include "manifold_thylakoid_shared.h" diff --git a/src/USER-MGPT/mgpt_readpot.h b/src/USER-MGPT/mgpt_readpot.h index c19ea40774..62f66883b6 100644 --- a/src/USER-MGPT/mgpt_readpot.h +++ b/src/USER-MGPT/mgpt_readpot.h @@ -19,7 +19,6 @@ #ifndef READPOT__ #define READPOT__ -#include #include "mgpt_splinetab.h" diff --git a/src/USER-MGPT/pair_mgpt.h b/src/USER-MGPT/pair_mgpt.h index 94c66fb603..70b36364b1 100644 --- a/src/USER-MGPT/pair_mgpt.h +++ b/src/USER-MGPT/pair_mgpt.h @@ -32,7 +32,6 @@ PairStyle(mgpt,PairMGPT) #include #include -#include #include #include "pair.h" diff --git a/src/USER-MISC/angle_cosine_shift.h b/src/USER-MISC/angle_cosine_shift.h index 030709a0e2..febabcc090 100644 --- a/src/USER-MISC/angle_cosine_shift.h +++ b/src/USER-MISC/angle_cosine_shift.h @@ -20,7 +20,6 @@ AngleStyle(cosine/shift,AngleCosineShift) #ifndef LMP_ANGLE_COSINE_SHIFT_H #define LMP_ANGLE_COSINE_SHIFT_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_cosine_shift_exp.h b/src/USER-MISC/angle_cosine_shift_exp.h index 8b8e389380..9614ddcc19 100644 --- a/src/USER-MISC/angle_cosine_shift_exp.h +++ b/src/USER-MISC/angle_cosine_shift_exp.h @@ -18,7 +18,6 @@ AngleStyle(cosine/shift/exp,AngleCosineShiftExp) #ifndef LMP_ANGLE_COSINE_SHIFT_EXP_H #define LMP_ANGLE_COSINE_SHIFT_EXP_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_dipole.h b/src/USER-MISC/angle_dipole.h index 6c5dccb803..187822d0d4 100644 --- a/src/USER-MISC/angle_dipole.h +++ b/src/USER-MISC/angle_dipole.h @@ -20,7 +20,6 @@ AngleStyle(dipole,AngleDipole) #ifndef LMP_ANGLE_DIPOLE_H #define LMP_ANGLE_DIPOLE_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_fourier.h b/src/USER-MISC/angle_fourier.h index 14b4eedf57..53eeea98da 100644 --- a/src/USER-MISC/angle_fourier.h +++ b/src/USER-MISC/angle_fourier.h @@ -20,7 +20,6 @@ AngleStyle(fourier,AngleFourier) #ifndef ANGLE_FOURIER_H #define ANGLE_FOURIER_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_fourier_simple.h b/src/USER-MISC/angle_fourier_simple.h index 3a7bd37750..df2253317f 100644 --- a/src/USER-MISC/angle_fourier_simple.h +++ b/src/USER-MISC/angle_fourier_simple.h @@ -20,7 +20,6 @@ AngleStyle(fourier/simple,AngleFourierSimple) #ifndef ANGLE_FOURIER_SIMPLE_H #define ANGLE_FOURIER_SIMPLE_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/angle_quartic.h b/src/USER-MISC/angle_quartic.h index 7043cab064..b916a5f89f 100644 --- a/src/USER-MISC/angle_quartic.h +++ b/src/USER-MISC/angle_quartic.h @@ -20,7 +20,6 @@ AngleStyle(quartic,AngleQuartic) #ifndef LMP_ANGLE_QUARTIC_H #define LMP_ANGLE_QUARTIC_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/bond_harmonic_shift.h b/src/USER-MISC/bond_harmonic_shift.h index ff0d358243..b77cefb4af 100644 --- a/src/USER-MISC/bond_harmonic_shift.h +++ b/src/USER-MISC/bond_harmonic_shift.h @@ -20,7 +20,6 @@ BondStyle(harmonic/shift,BondHarmonicShift) #ifndef LMP_BOND_HARMONIC_SHIFT_H #define LMP_BOND_HARMONIC_SHIFT_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/bond_harmonic_shift_cut.h b/src/USER-MISC/bond_harmonic_shift_cut.h index 5db76d51aa..ad2bcd61ad 100644 --- a/src/USER-MISC/bond_harmonic_shift_cut.h +++ b/src/USER-MISC/bond_harmonic_shift_cut.h @@ -20,7 +20,6 @@ BondStyle(harmonic/shift/cut,BondHarmonicShiftCut) #ifndef LMP_BOND_HARMONIC_SHIFT_CUT_H #define LMP_BOND_HARMONIC_SHIFT_CUT_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_cosine_shift_exp.h b/src/USER-MISC/dihedral_cosine_shift_exp.h index fc4be5049b..4d180f42de 100644 --- a/src/USER-MISC/dihedral_cosine_shift_exp.h +++ b/src/USER-MISC/dihedral_cosine_shift_exp.h @@ -20,7 +20,6 @@ DihedralStyle(cosine/shift/exp,DihedralCosineShiftExp) #ifndef LMP_DIHEDRAL_COSINE_SHIFT_EXP_H #define LMP_DIHEDRAL_COSINE_SHIFT_EXP_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_fourier.h b/src/USER-MISC/dihedral_fourier.h index c1ed843c34..8b6291fc4c 100644 --- a/src/USER-MISC/dihedral_fourier.h +++ b/src/USER-MISC/dihedral_fourier.h @@ -20,7 +20,6 @@ DihedralStyle(fourier,DihedralFourier) #ifndef LMP_DIHEDRAL_FOURIER_H #define LMP_DIHEDRAL_FOURIER_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_nharmonic.h b/src/USER-MISC/dihedral_nharmonic.h index 7c6a35b200..6fd1da3b8b 100644 --- a/src/USER-MISC/dihedral_nharmonic.h +++ b/src/USER-MISC/dihedral_nharmonic.h @@ -20,7 +20,6 @@ DihedralStyle(nharmonic,DihedralNHarmonic) #ifndef DIHEDRAL_NHARMONIC_H #define DIHEDRAL_NHARMONIC_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_quadratic.h b/src/USER-MISC/dihedral_quadratic.h index edc29c3cf8..0b99cbc4f7 100644 --- a/src/USER-MISC/dihedral_quadratic.h +++ b/src/USER-MISC/dihedral_quadratic.h @@ -20,7 +20,6 @@ DihedralStyle(quadratic,DihedralQuadratic) #ifndef LMP_DIHEDRAL_QUADRATIC_H #define LMP_DIHEDRAL_QUADRATIC_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/dihedral_spherical.h b/src/USER-MISC/dihedral_spherical.h index ae0ece189a..472db36f33 100644 --- a/src/USER-MISC/dihedral_spherical.h +++ b/src/USER-MISC/dihedral_spherical.h @@ -20,7 +20,6 @@ DihedralStyle(spherical,DihedralSpherical) #ifndef LMP_DIHEDRAL_SPHERICAL_H #define LMP_DIHEDRAL_SPHERICAL_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/fix_ave_correlate_long.h b/src/USER-MISC/fix_ave_correlate_long.h index 548a0e7183..a0c5863e99 100644 --- a/src/USER-MISC/fix_ave_correlate_long.h +++ b/src/USER-MISC/fix_ave_correlate_long.h @@ -20,7 +20,6 @@ FixStyle(ave/correlate/long,FixAveCorrelateLong) #ifndef LMP_FIX_AVE_CORRELATE_LONG_H #define LMP_FIX_AVE_CORRELATE_LONG_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/fix_srp.h b/src/USER-MISC/fix_srp.h index 7dbf044bda..f8343df8a6 100644 --- a/src/USER-MISC/fix_srp.h +++ b/src/USER-MISC/fix_srp.h @@ -20,7 +20,6 @@ FixStyle(SRP,FixSRP) #ifndef LMP_FIX_SRP_H #define LMP_FIX_SRP_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/improper_cossq.h b/src/USER-MISC/improper_cossq.h index ea880adfaf..9e430bfa1a 100644 --- a/src/USER-MISC/improper_cossq.h +++ b/src/USER-MISC/improper_cossq.h @@ -20,7 +20,6 @@ ImproperStyle(cossq,ImproperCossq) #ifndef LMP_IMPROPER_COSSQ_H #define LMP_IMPROPER_COSSQ_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/improper_distance.h b/src/USER-MISC/improper_distance.h index 57e4d671e9..d7575c3585 100644 --- a/src/USER-MISC/improper_distance.h +++ b/src/USER-MISC/improper_distance.h @@ -20,7 +20,6 @@ ImproperStyle(distance,ImproperDistance) #ifndef LMP_IMPROPER_DISTANCE_H #define LMP_IMPROPER_DISTANCE_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/improper_fourier.h b/src/USER-MISC/improper_fourier.h index 0525c45494..91dfacfd8e 100644 --- a/src/USER-MISC/improper_fourier.h +++ b/src/USER-MISC/improper_fourier.h @@ -20,7 +20,6 @@ ImproperStyle(fourier,ImproperFourier) #ifndef LMP_IMPROPER_FOURIER_H #define LMP_IMPROPER_FOURIER_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-MISC/improper_ring.h b/src/USER-MISC/improper_ring.h index c31329816f..7c53c6f59f 100644 --- a/src/USER-MISC/improper_ring.h +++ b/src/USER-MISC/improper_ring.h @@ -20,7 +20,6 @@ ImproperStyle(ring,ImproperRing) #ifndef LMP_IMPROPER_RING_H #define LMP_IMPROPER_RING_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-MOFFF/angle_class2_p6.h b/src/USER-MOFFF/angle_class2_p6.h index b583a45b19..f2f324c0c6 100644 --- a/src/USER-MOFFF/angle_class2_p6.h +++ b/src/USER-MOFFF/angle_class2_p6.h @@ -20,7 +20,6 @@ AngleStyle(class2/p6,AngleClass2P6) #ifndef LMP_ANGLE_CLASS2_P6_H #define LMP_ANGLE_CLASS2_P6_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MOFFF/angle_cosine_buck6d.h b/src/USER-MOFFF/angle_cosine_buck6d.h index 689b1634e0..1d0df10228 100644 --- a/src/USER-MOFFF/angle_cosine_buck6d.h +++ b/src/USER-MOFFF/angle_cosine_buck6d.h @@ -20,7 +20,6 @@ AngleStyle(cosine/buck6d, AngleCosineBuck6d) #ifndef LMP_ANGLE_COSINE_BUCK6D_H #define LMP_ANGLE_COSINE_BUCK6D_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-MOFFF/improper_inversion_harmonic.h b/src/USER-MOFFF/improper_inversion_harmonic.h index 201c9e358d..206b40aebf 100644 --- a/src/USER-MOFFF/improper_inversion_harmonic.h +++ b/src/USER-MOFFF/improper_inversion_harmonic.h @@ -20,7 +20,6 @@ ImproperStyle(inversion/harmonic,ImproperInversionHarmonic) #ifndef LMP_IMPROPER_INVERSION_HARMONIC_H #define LMP_IMPROPER_INVERSION_HARMONIC_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-REAXC/fix_reaxc_bonds.h b/src/USER-REAXC/fix_reaxc_bonds.h index d72f5446b5..60f41beb02 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.h +++ b/src/USER-REAXC/fix_reaxc_bonds.h @@ -20,7 +20,6 @@ FixStyle(reax/c/bonds,FixReaxCBonds) #ifndef LMP_FIX_REAXC_BONDS_H #define LMP_FIX_REAXC_BONDS_H -#include #include "fix.h" #include "pointers.h" diff --git a/src/bond_hybrid.h b/src/bond_hybrid.h index e51d467ac1..19e4debfed 100644 --- a/src/bond_hybrid.h +++ b/src/bond_hybrid.h @@ -20,7 +20,6 @@ BondStyle(hybrid,BondHybrid) #ifndef LMP_BOND_HYBRID_H #define LMP_BOND_HYBRID_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/bond_zero.h b/src/bond_zero.h index 9443ff0784..7cbd2b9a96 100644 --- a/src/bond_zero.h +++ b/src/bond_zero.h @@ -20,7 +20,6 @@ BondStyle(zero,BondZero) #ifndef LMP_BOND_ZERO_H #define LMP_BOND_ZERO_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/citeme.cpp b/src/citeme.cpp index 24896b448c..c8745891cf 100644 --- a/src/citeme.cpp +++ b/src/citeme.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "citeme.h" #include "universe.h" diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index 47f60a3da6..dcf30807f5 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include "comm_brick.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index d1d625445a..a85520ed45 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -11,19 +11,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "comm_tiled.h" -#include "comm_brick.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" -#include "force.h" #include "pair.h" #include "neighbor.h" -#include "modify.h" #include "fix.h" #include "compute.h" -#include "output.h" #include "dump.h" #include "memory.h" #include "error.h" diff --git a/src/comm_tiled.h b/src/comm_tiled.h index 13ecbc4b01..5a9beb28f7 100644 --- a/src/comm_tiled.h +++ b/src/comm_tiled.h @@ -14,6 +14,7 @@ #ifndef LMP_COMM_TILED_H #define LMP_COMM_TILED_H +#include #include "comm.h" namespace LAMMPS_NS { diff --git a/src/compute.cpp b/src/compute.cpp index 207f825ec8..8ff8487104 100644 --- a/src/compute.cpp +++ b/src/compute.cpp @@ -11,15 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include #include #include "compute.h" -#include "atom.h" #include "domain.h" #include "force.h" -#include "comm.h" #include "group.h" #include "modify.h" #include "fix.h" diff --git a/src/compute_adf.h b/src/compute_adf.h index a7983b7173..f768013207 100644 --- a/src/compute_adf.h +++ b/src/compute_adf.h @@ -20,7 +20,6 @@ ComputeStyle(adf,ComputeADF) #ifndef LMP_COMPUTE_ADF_H #define LMP_COMPUTE_ADF_H -#include #include "compute.h" namespace LAMMPS_NS { diff --git a/src/compute_rdf.h b/src/compute_rdf.h index 52a93a38dd..85f6ce6ad2 100644 --- a/src/compute_rdf.h +++ b/src/compute_rdf.h @@ -20,7 +20,6 @@ ComputeStyle(rdf,ComputeRDF) #ifndef LMP_COMPUTE_RDF_H #define LMP_COMPUTE_RDF_H -#include #include "compute.h" namespace LAMMPS_NS { diff --git a/src/dihedral_hybrid.h b/src/dihedral_hybrid.h index 0839fdfc61..2804060af4 100644 --- a/src/dihedral_hybrid.h +++ b/src/dihedral_hybrid.h @@ -20,7 +20,6 @@ DihedralStyle(hybrid,DihedralHybrid) #ifndef LMP_DIHEDRAL_HYBRID_H #define LMP_DIHEDRAL_HYBRID_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/dihedral_zero.h b/src/dihedral_zero.h index e7dbb0d3a5..e97f8f6641 100644 --- a/src/dihedral_zero.h +++ b/src/dihedral_zero.h @@ -24,7 +24,6 @@ DihedralStyle(zero,DihedralZero) #ifndef LMP_DIHEDRAL_ZERO_H #define LMP_DIHEDRAL_ZERO_H -#include #include "dihedral.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_atom.h b/src/fix_ave_atom.h index e4baf6bda1..42aa282d53 100644 --- a/src/fix_ave_atom.h +++ b/src/fix_ave_atom.h @@ -20,7 +20,6 @@ FixStyle(ave/atom,FixAveAtom) #ifndef LMP_FIX_AVE_ATOM_H #define LMP_FIX_AVE_ATOM_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_chunk.h b/src/fix_ave_chunk.h index 4dc1c1c246..dac5761ae8 100644 --- a/src/fix_ave_chunk.h +++ b/src/fix_ave_chunk.h @@ -20,7 +20,6 @@ FixStyle(ave/chunk,FixAveChunk) #ifndef LMP_FIX_AVE_CHUNK_H #define LMP_FIX_AVE_CHUNK_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_correlate.h b/src/fix_ave_correlate.h index ff20e8ba94..05fd6b6576 100644 --- a/src/fix_ave_correlate.h +++ b/src/fix_ave_correlate.h @@ -20,7 +20,6 @@ FixStyle(ave/correlate,FixAveCorrelate) #ifndef LMP_FIX_AVE_CORRELATE_H #define LMP_FIX_AVE_CORRELATE_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_histo.h b/src/fix_ave_histo.h index 3616959c61..35bdfcfa7f 100644 --- a/src/fix_ave_histo.h +++ b/src/fix_ave_histo.h @@ -20,7 +20,6 @@ FixStyle(ave/histo,FixAveHisto) #ifndef LMP_FIX_AVE_HISTO_H #define LMP_FIX_AVE_HISTO_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_histo_weight.h b/src/fix_ave_histo_weight.h index e5638e1215..6ec3ba5721 100644 --- a/src/fix_ave_histo_weight.h +++ b/src/fix_ave_histo_weight.h @@ -20,7 +20,6 @@ FixStyle(ave/histo/weight,FixAveHistoWeight) #ifndef LMP_FIX_AVE_HISTO_WEIGHT_H #define LMP_FIX_AVE_HISTO_WEIGHT_H -#include #include "fix_ave_histo.h" namespace LAMMPS_NS { diff --git a/src/fix_ave_time.h b/src/fix_ave_time.h index 62dfbad296..01228f9e55 100644 --- a/src/fix_ave_time.h +++ b/src/fix_ave_time.h @@ -20,7 +20,6 @@ FixStyle(ave/time,FixAveTime) #ifndef LMP_FIX_AVE_TIME_H #define LMP_FIX_AVE_TIME_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_balance.h b/src/fix_balance.h index 64383b5950..76cbea258a 100644 --- a/src/fix_balance.h +++ b/src/fix_balance.h @@ -20,7 +20,6 @@ FixStyle(balance,FixBalance) #ifndef LMP_FIX_BALANCE_H #define LMP_FIX_BALANCE_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_halt.h b/src/fix_halt.h index 372c915a7f..93c5e95078 100644 --- a/src/fix_halt.h +++ b/src/fix_halt.h @@ -20,7 +20,6 @@ FixStyle(halt,FixHalt) #ifndef LMP_FIX_HALT_H #define LMP_FIX_HALT_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_move.h b/src/fix_move.h index 5993d7d6e8..740b051be0 100644 --- a/src/fix_move.h +++ b/src/fix_move.h @@ -20,7 +20,6 @@ FixStyle(move,FixMove) #ifndef LMP_FIX_MOVE_H #define LMP_FIX_MOVE_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_print.h b/src/fix_print.h index 37b6680aee..5644160220 100644 --- a/src/fix_print.h +++ b/src/fix_print.h @@ -20,7 +20,6 @@ FixStyle(print,FixPrint) #ifndef LMP_FIX_PRINT_H #define LMP_FIX_PRINT_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_store.h b/src/fix_store.h index 5524770a97..437c14f0f7 100644 --- a/src/fix_store.h +++ b/src/fix_store.h @@ -20,7 +20,6 @@ FixStyle(STORE,FixStore) #ifndef LMP_FIX_STORE_H #define LMP_FIX_STORE_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/fix_tmd.h b/src/fix_tmd.h index b6db41dd5a..f23a64a027 100644 --- a/src/fix_tmd.h +++ b/src/fix_tmd.h @@ -20,7 +20,6 @@ FixStyle(tmd,FixTMD) #ifndef LMP_FIX_TMD_H #define LMP_FIX_TMD_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/force.h b/src/force.h index 227b9427c0..26a3ecdfb8 100644 --- a/src/force.h +++ b/src/force.h @@ -15,7 +15,6 @@ #define LMP_FORCE_H #include "pointers.h" -#include #include #include diff --git a/src/group.h b/src/group.h index 962d37b32a..ec913f98bc 100644 --- a/src/group.h +++ b/src/group.h @@ -14,7 +14,6 @@ #ifndef LMP_GROUP_H #define LMP_GROUP_H -#include #include "pointers.h" #include diff --git a/src/image.h b/src/image.h index 5672bf85c5..7df81425d9 100644 --- a/src/image.h +++ b/src/image.h @@ -15,7 +15,6 @@ #define LMP_IMAGE_H #include -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/imbalance.h b/src/imbalance.h index d3c3b9a642..5f43c2e51d 100644 --- a/src/imbalance.h +++ b/src/imbalance.h @@ -14,7 +14,6 @@ #ifndef LMP_IMBALANCE_H #define LMP_IMBALANCE_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/improper_hybrid.h b/src/improper_hybrid.h index 89595ccfc4..3e5423b173 100644 --- a/src/improper_hybrid.h +++ b/src/improper_hybrid.h @@ -20,7 +20,6 @@ ImproperStyle(hybrid,ImproperHybrid) #ifndef LMP_IMPROPER_HYBRID_H #define LMP_IMPROPER_HYBRID_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/improper_zero.h b/src/improper_zero.h index 0a2290b6f7..1a70059070 100644 --- a/src/improper_zero.h +++ b/src/improper_zero.h @@ -20,7 +20,6 @@ ImproperStyle(zero,ImproperZero) #ifndef LMP_IMPROPER_ZERO_H #define LMP_IMPROPER_ZERO_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/input.h b/src/input.h index 33e83bfb06..9573b569bc 100644 --- a/src/input.h +++ b/src/input.h @@ -14,7 +14,6 @@ #ifndef LMP_INPUT_H #define LMP_INPUT_H -#include #include "pointers.h" #include #include diff --git a/src/lammps.h b/src/lammps.h index e02d0c764a..5820f25591 100644 --- a/src/lammps.h +++ b/src/lammps.h @@ -14,7 +14,6 @@ #ifndef LMP_LAMMPS_H #define LMP_LAMMPS_H -#include namespace LAMMPS_NS { diff --git a/src/modify.h b/src/modify.h index 5ff81855fe..b736485196 100644 --- a/src/modify.h +++ b/src/modify.h @@ -14,7 +14,6 @@ #ifndef LMP_MODIFY_H #define LMP_MODIFY_H -#include #include "pointers.h" #include #include diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index e313e16f18..074517a859 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -20,7 +20,6 @@ PairStyle(hybrid,PairHybrid) #ifndef LMP_PAIR_HYBRID_H #define LMP_PAIR_HYBRID_H -#include #include "pair.h" namespace LAMMPS_NS { diff --git a/src/read_data.h b/src/read_data.h index 26ab6ff381..98de607f6b 100644 --- a/src/read_data.h +++ b/src/read_data.h @@ -20,7 +20,6 @@ CommandStyle(read_data,ReadData) #ifndef LMP_READ_DATA_H #define LMP_READ_DATA_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/read_dump.h b/src/read_dump.h index 3ee13f779c..6fb4f11ed1 100644 --- a/src/read_dump.h +++ b/src/read_dump.h @@ -23,7 +23,6 @@ CommandStyle(read_dump,ReadDump) #define LMP_READ_DUMP_H #include -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/read_restart.h b/src/read_restart.h index 23d6ec3fba..63adf37b22 100644 --- a/src/read_restart.h +++ b/src/read_restart.h @@ -20,7 +20,6 @@ CommandStyle(read_restart,ReadRestart) #ifndef LMP_READ_RESTART_H #define LMP_READ_RESTART_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/universe.h b/src/universe.h index 3073409b86..fd6655c749 100644 --- a/src/universe.h +++ b/src/universe.h @@ -14,7 +14,6 @@ #ifndef LMP_UNIVERSE_H #define LMP_UNIVERSE_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/variable.h b/src/variable.h index c5f501f266..a504da14ec 100644 --- a/src/variable.h +++ b/src/variable.h @@ -14,7 +14,6 @@ #ifndef LMP_VARIABLE_H #define LMP_VARIABLE_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/write_coeff.h b/src/write_coeff.h index 569a615e6e..b995e60d63 100644 --- a/src/write_coeff.h +++ b/src/write_coeff.h @@ -20,7 +20,6 @@ CommandStyle(write_coeff,WriteCoeff) #ifndef LMP_WRITE_COEFF_H #define LMP_WRITE_COEFF_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/write_data.h b/src/write_data.h index 6f1bb2ec47..1c0f6b2a7c 100644 --- a/src/write_data.h +++ b/src/write_data.h @@ -20,7 +20,6 @@ CommandStyle(write_data,WriteData) #ifndef LMP_WRITE_DATA_H #define LMP_WRITE_DATA_H -#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/write_restart.h b/src/write_restart.h index c6202acbfd..e7cdc6a501 100644 --- a/src/write_restart.h +++ b/src/write_restart.h @@ -20,7 +20,6 @@ CommandStyle(write_restart,WriteRestart) #ifndef LMP_WRITE_RESTART_H #define LMP_WRITE_RESTART_H -#include #include "pointers.h" namespace LAMMPS_NS { -- GitLab From 123bd57376066ade0dc92c891bd97de152afd2ad Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 21:59:05 -0400 Subject: [PATCH 088/236] try to make KOKKOS compile again --- src/KOKKOS/kokkos_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KOKKOS/kokkos_type.h b/src/KOKKOS/kokkos_type.h index 942c2af241..e900bbd6d1 100644 --- a/src/KOKKOS/kokkos_type.h +++ b/src/KOKKOS/kokkos_type.h @@ -14,7 +14,7 @@ #ifndef LMP_LMPTYPE_KOKKOS_H #define LMP_LMPTYPE_KOKKOS_H -#include "lmptype.h" +#include "pointers.h" #include #include -- GitLab From 2c119551f7af4eb6dfe1d0424debdec0d6089f80 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 22:13:42 -0400 Subject: [PATCH 089/236] add statement about order of include files --- doc/include-file-conventions.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/include-file-conventions.md b/doc/include-file-conventions.md index 5152051ba5..8d70d6cdec 100644 --- a/doc/include-file-conventions.md +++ b/doc/include-file-conventions.md @@ -94,6 +94,14 @@ In the implementation files (typically, those would have the same base name as the corresponding header with a .cpp extension instead of .h) include statments should follow the "include what you use" principle. +### Order of Include Statements + +Include files should be included in this order: +* lmptype.h (should only be included if `MPI_LMP_XXX` data types are used) +* mpi.h +* system and library headers (anything that is using angular brackets; C-library headers first, then C++) +* LAMMPS local headers (first the header matching the implementation file, the rest in mostly alphabetical order) + ### Special Cases and Exceptions #### pointers.h -- GitLab From a5cb6ddd4a798e4618e2e506ad9d14021f0c4670 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 27 Jun 2019 22:14:06 -0400 Subject: [PATCH 090/236] lammps.h must include cstdio and mpi.h --- src/lammps.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lammps.h b/src/lammps.h index 5820f25591..dc2916f214 100644 --- a/src/lammps.h +++ b/src/lammps.h @@ -14,6 +14,8 @@ #ifndef LMP_LAMMPS_H #define LMP_LAMMPS_H +#include +#include namespace LAMMPS_NS { -- GitLab From 378474c4e642f34614d471953bb3758c04c8754a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jun 2019 02:01:08 -0400 Subject: [PATCH 091/236] more include file cleanup suggested by IWYU --- src/atom_map.cpp | 1 - src/atom_vec_body.cpp | 1 + src/bond_hybrid.cpp | 1 - src/bond_zero.cpp | 1 - src/comm.h | 2 +- src/comm_tiled.cpp | 1 + src/compute_adf.cpp | 3 --- src/compute_aggregate_atom.cpp | 1 + src/compute_angle.cpp | 2 +- src/compute_angmom_chunk.cpp | 1 + src/compute_bond.cpp | 2 +- src/compute_centro_atom.cpp | 1 - src/compute_chunk_atom.cpp | 6 ++++-- src/compute_cluster_atom.cpp | 2 +- src/compute_cna_atom.cpp | 2 +- src/compute_com_chunk.cpp | 1 + src/compute_contact_atom.cpp | 3 --- src/compute_coord_atom.cpp | 1 - src/compute_dihedral.cpp | 2 +- src/compute_dihedral_local.cpp | 2 -- src/compute_dipole_chunk.cpp | 2 ++ src/compute_displace_atom.cpp | 1 - src/compute_erotate_sphere.cpp | 3 --- src/compute_fragment_atom.cpp | 1 + src/compute_global_atom.cpp | 4 ---- src/compute_group_group.cpp | 1 - src/compute_gyration.cpp | 2 +- src/compute_gyration_chunk.cpp | 1 + src/compute_heat_flux.cpp | 3 +-- src/compute_hexorder_atom.cpp | 4 ++-- src/compute_improper.cpp | 2 +- src/compute_improper_local.cpp | 1 - src/compute_inertia_chunk.cpp | 1 + src/compute_ke.cpp | 2 -- src/compute_msd.cpp | 1 + src/compute_msd_chunk.cpp | 1 + src/compute_omega_chunk.cpp | 1 + src/compute_pair_local.cpp | 1 - src/compute_pe_atom.cpp | 1 - src/compute_pressure.cpp | 1 - src/compute_property_chunk.cpp | 1 + src/compute_rdf.cpp | 1 - src/compute_reduce.cpp | 2 -- src/compute_reduce_region.cpp | 3 +-- 44 files changed, 30 insertions(+), 47 deletions(-) diff --git a/src/atom_map.cpp b/src/atom_map.cpp index b14ebdba68..6af3b9c288 100644 --- a/src/atom_map.cpp +++ b/src/atom_map.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "pointers.h" #include #include #include "atom.h" diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index 3e9528d6b9..fad5b3eae0 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -13,6 +13,7 @@ #include #include +#include #include "atom_vec_body.h" #include "my_pool_chunk.h" #include "style_body.h" diff --git a/src/bond_hybrid.cpp b/src/bond_hybrid.cpp index 0fb23a3214..9028886758 100644 --- a/src/bond_hybrid.cpp +++ b/src/bond_hybrid.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include "bond_hybrid.h" diff --git a/src/bond_zero.cpp b/src/bond_zero.cpp index 3932846cb4..c473abbe4b 100644 --- a/src/bond_zero.cpp +++ b/src/bond_zero.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "bond_zero.h" #include "atom.h" diff --git a/src/comm.h b/src/comm.h index 30360b1059..6d5592585f 100644 --- a/src/comm.h +++ b/src/comm.h @@ -14,7 +14,7 @@ #ifndef LMP_COMM_H #define LMP_COMM_H -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index a85520ed45..385b7fdf22 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include "comm_tiled.h" diff --git a/src/compute_adf.cpp b/src/compute_adf.cpp index e9f9ba2b6f..a17561ff54 100644 --- a/src/compute_adf.cpp +++ b/src/compute_adf.cpp @@ -17,18 +17,15 @@ #include #include -#include #include #include "compute_adf.h" #include "atom.h" #include "update.h" #include "force.h" #include "pair.h" -#include "domain.h" #include "neighbor.h" #include "neigh_request.h" #include "neigh_list.h" -#include "group.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/compute_aggregate_atom.cpp b/src/compute_aggregate_atom.cpp index 6c8c8e5d9a..9a797124bd 100644 --- a/src/compute_aggregate_atom.cpp +++ b/src/compute_aggregate_atom.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include #include #include #include "compute_aggregate_atom.h" diff --git a/src/compute_angle.cpp b/src/compute_angle.cpp index 59945f5832..c1c02a1cc4 100644 --- a/src/compute_angle.cpp +++ b/src/compute_angle.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include #include "compute_angle.h" +#include "angle.h" #include "update.h" #include "force.h" #include "angle_hybrid.h" diff --git a/src/compute_angmom_chunk.cpp b/src/compute_angmom_chunk.cpp index a70eaaf49f..ec42015527 100644 --- a/src/compute_angmom_chunk.cpp +++ b/src/compute_angmom_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_angmom_chunk.h" #include "atom.h" diff --git a/src/compute_bond.cpp b/src/compute_bond.cpp index 896aaec9bd..4fd3bbef30 100644 --- a/src/compute_bond.cpp +++ b/src/compute_bond.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include -#include #include "compute_bond.h" +#include "bond.h" #include "update.h" #include "force.h" #include "bond_hybrid.h" diff --git a/src/compute_centro_atom.cpp b/src/compute_centro_atom.cpp index 5096879b32..7df94271fc 100644 --- a/src/compute_centro_atom.cpp +++ b/src/compute_centro_atom.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include -#include #include "compute_centro_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index 61b653b375..fd9204f1cb 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -14,8 +14,11 @@ // NOTE: allow for bin center to be variables for sphere/cylinder #include +#include #include #include +#include +#include #include "compute_chunk_atom.h" #include "atom.h" #include "update.h" @@ -24,6 +27,7 @@ #include "region.h" #include "lattice.h" #include "modify.h" +#include "fix.h" #include "fix_store.h" #include "comm.h" #include "group.h" @@ -33,8 +37,6 @@ #include "memory.h" #include "error.h" -#include - using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/compute_cluster_atom.cpp b/src/compute_cluster_atom.cpp index 0c34b42671..febe0658a0 100644 --- a/src/compute_cluster_atom.cpp +++ b/src/compute_cluster_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include -#include #include "compute_cluster_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_cna_atom.cpp b/src/compute_cna_atom.cpp index b8ad3f0f64..d764e739b3 100644 --- a/src/compute_cna_atom.cpp +++ b/src/compute_cna_atom.cpp @@ -15,8 +15,8 @@ Contributing author: Wan Liang (Chinese Academy of Sciences) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "compute_cna_atom.h" #include "atom.h" diff --git a/src/compute_com_chunk.cpp b/src/compute_com_chunk.cpp index ec66767245..7b4c960cf4 100644 --- a/src/compute_com_chunk.cpp +++ b/src/compute_com_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_com_chunk.h" #include "atom.h" diff --git a/src/compute_contact_atom.cpp b/src/compute_contact_atom.cpp index e60a51832a..e4afc1d761 100644 --- a/src/compute_contact_atom.cpp +++ b/src/compute_contact_atom.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include -#include #include "compute_contact_atom.h" #include "atom.h" #include "update.h" @@ -22,7 +20,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "force.h" -#include "pair.h" #include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 54f4c70c71..8cedcbc027 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "compute_coord_atom.h" #include "compute_orientorder_atom.h" #include "atom.h" diff --git a/src/compute_dihedral.cpp b/src/compute_dihedral.cpp index 3595b2eda3..16823050da 100644 --- a/src/compute_dihedral.cpp +++ b/src/compute_dihedral.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ #include -#include #include "compute_dihedral.h" #include "update.h" #include "force.h" +#include "dihedral.h" #include "dihedral_hybrid.h" #include "error.h" diff --git a/src/compute_dihedral_local.cpp b/src/compute_dihedral_local.cpp index 9efdd61cb8..784ae9c607 100644 --- a/src/compute_dihedral_local.cpp +++ b/src/compute_dihedral_local.cpp @@ -20,10 +20,8 @@ #include "update.h" #include "domain.h" #include "force.h" -#include "dihedral.h" #include "input.h" #include "variable.h" - #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/compute_dipole_chunk.cpp b/src/compute_dipole_chunk.cpp index b0474b6359..090bc5df94 100644 --- a/src/compute_dipole_chunk.cpp +++ b/src/compute_dipole_chunk.cpp @@ -11,6 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include +#include #include #include "compute_dipole_chunk.h" #include "atom.h" diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index d8f279058e..3773159143 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -19,7 +19,6 @@ #include "group.h" #include "domain.h" #include "modify.h" -#include "fix.h" #include "fix_store.h" #include "input.h" #include "variable.h" diff --git a/src/compute_erotate_sphere.cpp b/src/compute_erotate_sphere.cpp index 31ed0aaba5..65bb8a9770 100644 --- a/src/compute_erotate_sphere.cpp +++ b/src/compute_erotate_sphere.cpp @@ -14,11 +14,8 @@ #include #include "compute_erotate_sphere.h" #include "atom.h" -#include "atom_vec.h" #include "update.h" #include "force.h" -#include "domain.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/compute_fragment_atom.cpp b/src/compute_fragment_atom.cpp index bb273f3bdb..d59b519d09 100644 --- a/src/compute_fragment_atom.cpp +++ b/src/compute_fragment_atom.cpp @@ -15,6 +15,7 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include #include #include "compute_fragment_atom.h" #include "atom.h" diff --git a/src/compute_global_atom.cpp b/src/compute_global_atom.cpp index dc9ab52f49..6685f746a1 100644 --- a/src/compute_global_atom.cpp +++ b/src/compute_global_atom.cpp @@ -16,12 +16,8 @@ #include "compute_global_atom.h" #include "atom.h" #include "update.h" -#include "domain.h" #include "modify.h" #include "fix.h" -#include "force.h" -#include "comm.h" -#include "group.h" #include "input.h" #include "variable.h" #include "memory.h" diff --git a/src/compute_group_group.cpp b/src/compute_group_group.cpp index e55f679b2e..11e1aac720 100644 --- a/src/compute_group_group.cpp +++ b/src/compute_group_group.cpp @@ -33,7 +33,6 @@ #include "comm.h" #include "domain.h" #include "math_const.h" -#include "utils.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/compute_gyration.cpp b/src/compute_gyration.cpp index f8d19853e0..3c5656a5af 100644 --- a/src/compute_gyration.cpp +++ b/src/compute_gyration.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "compute_gyration.h" #include "update.h" #include "atom.h" diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp index 6a23398aca..f3db37d62f 100644 --- a/src/compute_gyration_chunk.cpp +++ b/src/compute_gyration_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include "compute_gyration_chunk.h" diff --git a/src/compute_heat_flux.cpp b/src/compute_heat_flux.cpp index e402da7842..9bd827c713 100644 --- a/src/compute_heat_flux.cpp +++ b/src/compute_heat_flux.cpp @@ -16,14 +16,13 @@ Mario Pinto (Computational Research Lab, Pune, India) ------------------------------------------------------------------------- */ -#include +#include #include #include "compute_heat_flux.h" #include "atom.h" #include "update.h" #include "modify.h" #include "force.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/compute_hexorder_atom.cpp b/src/compute_hexorder_atom.cpp index 6d17ae15bd..c54f4b1aae 100644 --- a/src/compute_hexorder_atom.cpp +++ b/src/compute_hexorder_atom.cpp @@ -15,9 +15,9 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -#include +#include #include -#include +#include #include "compute_hexorder_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_improper.cpp b/src/compute_improper.cpp index ac2a23e727..2f068dfb74 100644 --- a/src/compute_improper.cpp +++ b/src/compute_improper.cpp @@ -12,10 +12,10 @@ ------------------------------------------------------------------------- */ #include -#include #include "compute_improper.h" #include "update.h" #include "force.h" +#include "improper.h" #include "improper_hybrid.h" #include "error.h" diff --git a/src/compute_improper_local.cpp b/src/compute_improper_local.cpp index 2861850c79..ec1734cd96 100644 --- a/src/compute_improper_local.cpp +++ b/src/compute_improper_local.cpp @@ -20,7 +20,6 @@ #include "update.h" #include "domain.h" #include "force.h" -#include "improper.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/compute_inertia_chunk.cpp b/src/compute_inertia_chunk.cpp index a33073c35a..d1a7cb9fc1 100644 --- a/src/compute_inertia_chunk.cpp +++ b/src/compute_inertia_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_inertia_chunk.h" #include "atom.h" diff --git a/src/compute_ke.cpp b/src/compute_ke.cpp index fb3c5a9695..3418cc678f 100644 --- a/src/compute_ke.cpp +++ b/src/compute_ke.cpp @@ -16,8 +16,6 @@ #include "atom.h" #include "update.h" #include "force.h" -#include "domain.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index fc47b2609a..d2e17eff9e 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_msd.h" #include "atom.h" diff --git a/src/compute_msd_chunk.cpp b/src/compute_msd_chunk.cpp index 1f974cc06c..8520b36993 100644 --- a/src/compute_msd_chunk.cpp +++ b/src/compute_msd_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_msd_chunk.h" #include "atom.h" diff --git a/src/compute_omega_chunk.cpp b/src/compute_omega_chunk.cpp index 23447da602..360255e908 100644 --- a/src/compute_omega_chunk.cpp +++ b/src/compute_omega_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_omega_chunk.h" #include "atom.h" diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index c356a08be9..1ab46a0297 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -22,7 +22,6 @@ #include "neighbor.h" #include "neigh_request.h" #include "neigh_list.h" -#include "group.h" #include "memory.h" #include "error.h" diff --git a/src/compute_pe_atom.cpp b/src/compute_pe_atom.cpp index 2f1dc5650e..b3ace2d419 100644 --- a/src/compute_pe_atom.cpp +++ b/src/compute_pe_atom.cpp @@ -24,7 +24,6 @@ #include "improper.h" #include "kspace.h" #include "modify.h" -#include "fix.h" #include "memory.h" #include "error.h" diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index dde02a5aed..431f039de3 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "compute_pressure.h" #include "atom.h" #include "update.h" diff --git a/src/compute_property_chunk.cpp b/src/compute_property_chunk.cpp index 489890e1cc..089e867598 100644 --- a/src/compute_property_chunk.cpp +++ b/src/compute_property_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_property_chunk.h" #include "atom.h" diff --git a/src/compute_rdf.cpp b/src/compute_rdf.cpp index d49485b4ea..b1fa8bb2a3 100644 --- a/src/compute_rdf.cpp +++ b/src/compute_rdf.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include "compute_rdf.h" #include "atom.h" diff --git a/src/compute_reduce.cpp b/src/compute_reduce.cpp index 16dc84628a..e7692b0797 100644 --- a/src/compute_reduce.cpp +++ b/src/compute_reduce.cpp @@ -20,8 +20,6 @@ #include "domain.h" #include "modify.h" #include "fix.h" -#include "force.h" -#include "comm.h" #include "group.h" #include "input.h" #include "variable.h" diff --git a/src/compute_reduce_region.cpp b/src/compute_reduce_region.cpp index 8e91a299e8..30a5c6393f 100644 --- a/src/compute_reduce_region.cpp +++ b/src/compute_reduce_region.cpp @@ -11,8 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include #include "compute_reduce_region.h" #include "atom.h" #include "update.h" -- GitLab From 557a1274e48fdb950a998c28f2e5eba6a996065d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jun 2019 02:12:47 -0400 Subject: [PATCH 092/236] even more include file cleanup --- src/compute_slice.cpp | 2 +- src/compute_stress_atom.cpp | 1 - src/compute_temp.cpp | 2 -- src/compute_temp_chunk.cpp | 1 + src/compute_temp_com.cpp | 3 --- src/compute_temp_partial.cpp | 1 - src/compute_temp_profile.cpp | 2 -- src/compute_temp_ramp.cpp | 2 -- src/compute_temp_sphere.cpp | 2 -- src/compute_torque_chunk.cpp | 1 + src/compute_vacf.cpp | 1 + src/compute_vcm_chunk.cpp | 2 +- src/create_atoms.cpp | 5 +---- src/create_bonds.cpp | 2 +- src/create_box.cpp | 2 -- src/delete_atoms.cpp | 3 ++- src/delete_bonds.cpp | 1 - src/deprecated.cpp | 1 - src/dihedral.cpp | 3 --- 19 files changed, 9 insertions(+), 28 deletions(-) diff --git a/src/compute_slice.cpp b/src/compute_slice.cpp index ac70e7dd15..6e509c24d4 100644 --- a/src/compute_slice.cpp +++ b/src/compute_slice.cpp @@ -11,13 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include "compute_slice.h" #include "update.h" #include "modify.h" #include "fix.h" -#include "group.h" #include "input.h" #include "variable.h" #include "memory.h" diff --git a/src/compute_stress_atom.cpp b/src/compute_stress_atom.cpp index 5211f015ab..f84c977bdb 100644 --- a/src/compute_stress_atom.cpp +++ b/src/compute_stress_atom.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "compute_stress_atom.h" #include "atom.h" diff --git a/src/compute_temp.cpp b/src/compute_temp.cpp index f7d3a890ec..c330249a7e 100644 --- a/src/compute_temp.cpp +++ b/src/compute_temp.cpp @@ -12,13 +12,11 @@ ------------------------------------------------------------------------- */ #include -#include #include "compute_temp.h" #include "atom.h" #include "update.h" #include "force.h" #include "domain.h" -#include "comm.h" #include "group.h" #include "error.h" diff --git a/src/compute_temp_chunk.cpp b/src/compute_temp_chunk.cpp index 920515e05c..229e98e258 100644 --- a/src/compute_temp_chunk.cpp +++ b/src/compute_temp_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_temp_chunk.h" #include "atom.h" diff --git a/src/compute_temp_com.cpp b/src/compute_temp_com.cpp index f2ad40ea43..21814e1940 100644 --- a/src/compute_temp_com.cpp +++ b/src/compute_temp_com.cpp @@ -12,15 +12,12 @@ ------------------------------------------------------------------------- */ #include -#include -#include #include "compute_temp_com.h" #include "atom.h" #include "update.h" #include "force.h" #include "group.h" #include "domain.h" -#include "lattice.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/compute_temp_partial.cpp b/src/compute_temp_partial.cpp index 4425aebdda..8d5ff66796 100644 --- a/src/compute_temp_partial.cpp +++ b/src/compute_temp_partial.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include "compute_temp_partial.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_profile.cpp b/src/compute_temp_profile.cpp index c7f0b28a6c..21c87b31a2 100644 --- a/src/compute_temp_profile.cpp +++ b/src/compute_temp_profile.cpp @@ -12,14 +12,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "compute_temp_profile.h" #include "atom.h" #include "update.h" #include "force.h" #include "group.h" -#include "fix.h" #include "domain.h" #include "memory.h" #include "error.h" diff --git a/src/compute_temp_ramp.cpp b/src/compute_temp_ramp.cpp index ba572645f3..715d2aa9f4 100644 --- a/src/compute_temp_ramp.cpp +++ b/src/compute_temp_ramp.cpp @@ -12,14 +12,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "compute_temp_ramp.h" #include "atom.h" #include "update.h" #include "force.h" #include "group.h" -#include "fix.h" #include "domain.h" #include "lattice.h" #include "memory.h" diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index 651da6dee5..b490a5ec45 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -15,12 +15,10 @@ #include #include "compute_temp_sphere.h" #include "atom.h" -#include "atom_vec.h" #include "update.h" #include "force.h" #include "domain.h" #include "modify.h" -#include "comm.h" #include "group.h" #include "error.h" diff --git a/src/compute_torque_chunk.cpp b/src/compute_torque_chunk.cpp index d9de99bcb2..e43155493f 100644 --- a/src/compute_torque_chunk.cpp +++ b/src/compute_torque_chunk.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_torque_chunk.h" #include "atom.h" diff --git a/src/compute_vacf.cpp b/src/compute_vacf.cpp index 3ef3acf0bf..787c2503ca 100644 --- a/src/compute_vacf.cpp +++ b/src/compute_vacf.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_vacf.h" #include "atom.h" diff --git a/src/compute_vcm_chunk.cpp b/src/compute_vcm_chunk.cpp index a6dd796c63..cf30130763 100644 --- a/src/compute_vcm_chunk.cpp +++ b/src/compute_vcm_chunk.cpp @@ -11,13 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "compute_vcm_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" #include "compute_chunk_atom.h" -#include "domain.h" #include "memory.h" #include "error.h" diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 52e4256fca..8504023a70 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -11,8 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include #include #include "create_atoms.h" #include "atom.h" @@ -23,8 +22,6 @@ #include "modify.h" #include "force.h" #include "special.h" -#include "fix.h" -#include "compute.h" #include "domain.h" #include "lattice.h" #include "region.h" diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index e19b565554..e00fe109ca 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -15,7 +15,7 @@ Contributing authors: Mike Salerno (NRL) added single methods ------------------------------------------------------------------------- */ -#include +#include #include #include "create_bonds.h" #include "atom.h" diff --git a/src/create_box.cpp b/src/create_box.cpp index b5e37b759c..5ec960bec4 100644 --- a/src/create_box.cpp +++ b/src/create_box.cpp @@ -11,12 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "create_box.h" #include "atom.h" #include "atom_vec.h" -#include "force.h" #include "domain.h" #include "region.h" #include "region_prism.h" diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index 41df167f07..ff4b97a3a4 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -11,8 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include +#include #include "delete_atoms.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/delete_bonds.cpp b/src/delete_bonds.cpp index fe32bca879..c4d591543a 100644 --- a/src/delete_bonds.cpp +++ b/src/delete_bonds.cpp @@ -18,7 +18,6 @@ #include "atom.h" #include "atom_vec.h" #include "domain.h" -#include "neighbor.h" #include "comm.h" #include "force.h" #include "group.h" diff --git a/src/deprecated.cpp b/src/deprecated.cpp index b937482669..66ddcfeff4 100644 --- a/src/deprecated.cpp +++ b/src/deprecated.cpp @@ -18,7 +18,6 @@ #include #include "deprecated.h" #include "comm.h" -#include "force.h" #include "error.h" #include "input.h" diff --git a/src/dihedral.cpp b/src/dihedral.cpp index adccf2a490..d2de841dd0 100644 --- a/src/dihedral.cpp +++ b/src/dihedral.cpp @@ -11,13 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "dihedral.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "pair.h" -#include "suffix.h" #include "atom_masks.h" #include "memory.h" #include "error.h" -- GitLab From 31cbccda85de0c04dff11eebe97eabc53b57a738 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 28 Jun 2019 21:38:19 -0400 Subject: [PATCH 093/236] continue cleaning up include file lists --- src/RIGID/fix_shake.cpp | 4 +--- src/dihedral_hybrid.cpp | 3 +-- src/dihedral_zero.cpp | 3 --- src/displace_atoms.cpp | 2 +- src/domain.cpp | 4 ---- src/domain.h | 2 +- src/dump.cpp | 2 -- src/dump_atom.cpp | 1 - src/dump_cfg.cpp | 8 -------- src/dump_custom.cpp | 1 - src/dump_dcd.cpp | 2 -- src/dump_image.cpp | 4 ++-- src/dump_local.cpp | 1 - src/dump_movie.cpp | 3 --- src/dump_xyz.cpp | 1 - src/error.cpp | 1 - src/finish.cpp | 4 ---- src/fix.cpp | 1 - src/fix_adapt.cpp | 2 -- src/fix_addforce.cpp | 1 + src/fix_ave_atom.cpp | 1 - src/fix_ave_chunk.cpp | 2 ++ src/fix_ave_correlate.cpp | 2 ++ src/fix_ave_histo.cpp | 3 ++- src/fix_ave_histo_weight.cpp | 8 +++----- src/fix_ave_time.cpp | 2 ++ src/fix_aveforce.cpp | 1 - src/fix_balance.cpp | 2 -- src/fix_box_relax.cpp | 1 - src/fix_deform.cpp | 1 - src/fix_drag.cpp | 2 +- src/fix_dt_reset.cpp | 2 +- src/fix_external.cpp | 2 -- src/fix_gravity.cpp | 3 +-- src/fix_halt.cpp | 3 +-- src/fix_heat.cpp | 2 +- src/fix_indent.cpp | 3 +-- src/fix_langevin.cpp | 3 --- src/fix_lineforce.cpp | 1 - src/fix_minimize.cpp | 2 -- src/fix_momentum.cpp | 3 ++- src/fix_move.cpp | 2 -- src/fix_neigh_history.cpp | 4 +--- src/fix_neigh_history.h | 1 - src/fix_nh.cpp | 2 -- src/fix_nh_sphere.cpp | 2 +- src/fix_nve.cpp | 1 - src/fix_nve_limit.cpp | 3 +-- src/fix_nve_noforce.cpp | 1 - src/fix_nve_sphere.cpp | 3 --- src/fix_nvt_sllod.cpp | 1 - src/fix_planeforce.cpp | 1 - src/fix_press_berendsen.cpp | 2 -- src/fix_print.cpp | 2 +- src/fix_property_atom.cpp | 2 -- src/fix_read_restart.cpp | 1 - src/fix_recenter.cpp | 2 +- src/fix_respa.cpp | 1 - src/fix_restrain.cpp | 3 +-- 59 files changed, 32 insertions(+), 101 deletions(-) diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 23ced2d0e7..5c202706af 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -13,11 +13,9 @@ #include #include -#include +#include #include -#include #include "fix_shake.h" -#include "fix_rattle.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/dihedral_hybrid.cpp b/src/dihedral_hybrid.cpp index f3e4823d53..27fd7084bc 100644 --- a/src/dihedral_hybrid.cpp +++ b/src/dihedral_hybrid.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include #include "dihedral_hybrid.h" #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/dihedral_zero.cpp b/src/dihedral_zero.cpp index 8145d5f32d..0367477267 100644 --- a/src/dihedral_zero.cpp +++ b/src/dihedral_zero.cpp @@ -15,13 +15,10 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include #include #include "dihedral_zero.h" #include "atom.h" #include "force.h" -#include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 7b29b1d3d5..8bae173a1d 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include +#include #include #include "displace_atoms.h" #include "atom.h" diff --git a/src/domain.cpp b/src/domain.cpp index 74d7560c31..197eff514a 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -16,9 +16,7 @@ ------------------------------------------------------------------------- */ #include -#include #include -#include #include #include "domain.h" #include "style_region.h" @@ -37,13 +35,11 @@ #include "output.h" #include "thermo.h" #include "universe.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "utils.h" using namespace LAMMPS_NS; -using namespace MathConst; #define BIG 1.0e20 #define SMALL 1.0e-4 diff --git a/src/domain.h b/src/domain.h index e131d07a1b..a0bda8ae72 100644 --- a/src/domain.h +++ b/src/domain.h @@ -15,9 +15,9 @@ #define LMP_DOMAIN_H #include -#include "pointers.h" #include #include +#include "pointers.h" namespace LAMMPS_NS { diff --git a/src/dump.cpp b/src/dump.cpp index 8fa07a9cb2..b08a4de2ad 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -12,9 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include #include -#include #include "dump.h" #include "atom.h" #include "irregular.h" diff --git a/src/dump_atom.cpp b/src/dump_atom.cpp index 74583f4013..c95256ac21 100644 --- a/src/dump_atom.cpp +++ b/src/dump_atom.cpp @@ -16,7 +16,6 @@ #include "domain.h" #include "atom.h" #include "update.h" -#include "group.h" #include "memory.h" #include "error.h" diff --git a/src/dump_cfg.cpp b/src/dump_cfg.cpp index ddd662c8a6..eb5329e0d1 100644 --- a/src/dump_cfg.cpp +++ b/src/dump_cfg.cpp @@ -16,18 +16,10 @@ Memory efficiency improved by Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include -#include #include #include "dump_cfg.h" #include "atom.h" #include "domain.h" -#include "comm.h" -#include "modify.h" -#include "compute.h" -#include "input.h" -#include "fix.h" -#include "variable.h" #include "memory.h" #include "error.h" diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 17ad4b89ef..75e4e42bcd 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include #include "dump_custom.h" diff --git a/src/dump_dcd.cpp b/src/dump_dcd.cpp index 384e9089c0..ce669fecfd 100644 --- a/src/dump_dcd.cpp +++ b/src/dump_dcd.cpp @@ -17,8 +17,6 @@ ------------------------------------------------------------------------- */ #include -#include // requires C++-11 -#include #include #include #include "dump_dcd.h" diff --git a/src/dump_image.cpp b/src/dump_image.cpp index 0d63d2e4cb..0b4ca43879 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -11,20 +11,20 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include -#include #include #include "dump_image.h" #include "image.h" #include "atom.h" +#include "atom_vec.h" #include "atom_vec_line.h" #include "atom_vec_tri.h" #include "atom_vec_body.h" #include "body.h" #include "molecule.h" #include "domain.h" -#include "group.h" #include "force.h" #include "comm.h" #include "modify.h" diff --git a/src/dump_local.cpp b/src/dump_local.cpp index 8dc0554690..f99b7ac06c 100644 --- a/src/dump_local.cpp +++ b/src/dump_local.cpp @@ -15,7 +15,6 @@ #include #include #include "dump_local.h" -#include "atom.h" #include "modify.h" #include "fix.h" #include "compute.h" diff --git a/src/dump_movie.cpp b/src/dump_movie.cpp index 59dfdc3d6e..37d8a37f4d 100644 --- a/src/dump_movie.cpp +++ b/src/dump_movie.cpp @@ -15,13 +15,10 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include #include #include "dump_movie.h" #include "comm.h" #include "force.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/dump_xyz.cpp b/src/dump_xyz.cpp index fd52671d81..4d50cfc2c8 100644 --- a/src/dump_xyz.cpp +++ b/src/dump_xyz.cpp @@ -14,7 +14,6 @@ #include #include "dump_xyz.h" #include "atom.h" -#include "group.h" #include "error.h" #include "memory.h" #include "update.h" diff --git a/src/error.cpp b/src/error.cpp index cc80dcb4d8..8970145b7c 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -16,7 +16,6 @@ #include #include "error.h" #include "universe.h" -#include "update.h" #include "output.h" #include "input.h" diff --git a/src/finish.cpp b/src/finish.cpp index 1baa6d6fda..77c959b945 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -15,12 +15,10 @@ #include #include #include -#include #include "finish.h" #include "timer.h" #include "universe.h" #include "accelerator_kokkos.h" -#include "accelerator_omp.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" @@ -32,10 +30,8 @@ #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "output.h" #include "memory.h" #include "error.h" -#include "utils.h" #ifdef LMP_USER_OMP #include "modify.h" diff --git a/src/fix.cpp b/src/fix.cpp index 634bc2393d..1913ed483e 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -17,7 +17,6 @@ #include "atom.h" #include "group.h" #include "force.h" -#include "comm.h" #include "atom_masks.h" #include "memory.h" #include "error.h" diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 9a5b528747..7ac6128558 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include -#include #include "fix_adapt.h" #include "atom.h" #include "bond.h" diff --git a/src/fix_addforce.cpp b/src/fix_addforce.cpp index d66457a1f1..e29c4ffe9f 100644 --- a/src/fix_addforce.cpp +++ b/src/fix_addforce.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include "fix_addforce.h" diff --git a/src/fix_ave_atom.cpp b/src/fix_ave_atom.cpp index c8cbad75c9..e6566632de 100644 --- a/src/fix_ave_atom.cpp +++ b/src/fix_ave_atom.cpp @@ -15,7 +15,6 @@ #include #include "fix_ave_atom.h" #include "atom.h" -#include "domain.h" #include "update.h" #include "modify.h" #include "compute.h" diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index 7aed4dcbe7..1533d1fa4f 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -11,6 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include +#include // IWYU pragma: keep #include #include #include diff --git a/src/fix_ave_correlate.cpp b/src/fix_ave_correlate.cpp index 5c95f20ec2..555c1ac026 100644 --- a/src/fix_ave_correlate.cpp +++ b/src/fix_ave_correlate.cpp @@ -17,6 +17,8 @@ Reese Jones (Sandia) ------------------------------------------------------------------------- */ +#include +#include // IWYU pragma: keep #include #include #include diff --git a/src/fix_ave_histo.cpp b/src/fix_ave_histo.cpp index 87da5222f0..29fdc21c74 100644 --- a/src/fix_ave_histo.cpp +++ b/src/fix_ave_histo.cpp @@ -11,6 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include +#include // IWYU pragma: keep #include #include #include @@ -19,7 +21,6 @@ #include "update.h" #include "modify.h" #include "compute.h" -#include "group.h" #include "input.h" #include "variable.h" #include "memory.h" diff --git a/src/fix_ave_histo_weight.cpp b/src/fix_ave_histo_weight.cpp index c78f4fa1e3..5eeb074472 100644 --- a/src/fix_ave_histo_weight.cpp +++ b/src/fix_ave_histo_weight.cpp @@ -14,21 +14,19 @@ /* ---------------------------------------------------------------------- Contributing author: Shawn Coleman (ARL) ------------------------------------------------------------------------- */ - -#include -#include +#include +#include // IWYU pragma: keep #include +#include "fix.h" #include "fix_ave_histo_weight.h" #include "atom.h" #include "update.h" #include "modify.h" #include "compute.h" -#include "group.h" #include "input.h" #include "variable.h" #include "memory.h" #include "error.h" -#include "force.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/fix_ave_time.cpp b/src/fix_ave_time.cpp index 50654b6561..4820215f46 100644 --- a/src/fix_ave_time.cpp +++ b/src/fix_ave_time.cpp @@ -15,6 +15,8 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include +#include // IWYU pragma: keep #include #include #include diff --git a/src/fix_aveforce.cpp b/src/fix_aveforce.cpp index 1c87ba5785..4791a8b022 100644 --- a/src/fix_aveforce.cpp +++ b/src/fix_aveforce.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "fix_aveforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index ddaf42b49d..f9c32e8df0 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include "fix_balance.h" #include "balance.h" #include "update.h" @@ -26,7 +25,6 @@ #include "modify.h" #include "fix_store.h" #include "rcb.h" -#include "timer.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/fix_box_relax.cpp b/src/fix_box_relax.cpp index a315330d14..c73c0ade88 100644 --- a/src/fix_box_relax.cpp +++ b/src/fix_box_relax.cpp @@ -17,7 +17,6 @@ #include #include -#include #include "fix_box_relax.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index 909ead3e2a..96d7580c39 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_deform.h" #include "atom.h" diff --git a/src/fix_drag.cpp b/src/fix_drag.cpp index e4cf12d1ff..006d1c46d0 100644 --- a/src/fix_drag.cpp +++ b/src/fix_drag.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_drag.h" #include "atom.h" diff --git a/src/fix_dt_reset.cpp b/src/fix_dt_reset.cpp index 7566094b48..4e6195c4fa 100644 --- a/src/fix_dt_reset.cpp +++ b/src/fix_dt_reset.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_dt_reset.h" #include "atom.h" diff --git a/src/fix_external.cpp b/src/fix_external.cpp index b1ffa65e49..2c926e26b5 100644 --- a/src/fix_external.cpp +++ b/src/fix_external.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include -#include #include "fix_external.h" #include "atom.h" #include "update.h" diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp index bc10eb2807..8508a92cc4 100644 --- a/src/fix_gravity.cpp +++ b/src/fix_gravity.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "fix_gravity.h" #include "atom.h" diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp index 5fda4c30d6..133494fb8e 100644 --- a/src/fix_halt.cpp +++ b/src/fix_halt.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_halt.h" #include "update.h" #include "force.h" -#include "update.h" #include "input.h" #include "variable.h" #include "atom.h" diff --git a/src/fix_heat.cpp b/src/fix_heat.cpp index f34845785c..f78a9c0860 100644 --- a/src/fix_heat.cpp +++ b/src/fix_heat.cpp @@ -15,8 +15,8 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_heat.h" #include "atom.h" diff --git a/src/fix_indent.cpp b/src/fix_indent.cpp index b8e07dfd53..6a42cadefd 100644 --- a/src/fix_indent.cpp +++ b/src/fix_indent.cpp @@ -15,9 +15,9 @@ Contributing author: Ravi Agrawal (Northwestern U) ------------------------------------------------------------------------- */ +#include #include #include -#include #include "fix_indent.h" #include "atom.h" #include "input.h" @@ -26,7 +26,6 @@ #include "lattice.h" #include "update.h" #include "modify.h" -#include "output.h" #include "respa.h" #include "error.h" #include "force.h" diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 36ea47daf6..0f48562048 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include "fix_langevin.h" #include "math_extra.h" #include "atom.h" @@ -28,8 +27,6 @@ #include "update.h" #include "modify.h" #include "compute.h" -#include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" #include "input.h" diff --git a/src/fix_lineforce.cpp b/src/fix_lineforce.cpp index aea1a2a25b..61c6341aa6 100644 --- a/src/fix_lineforce.cpp +++ b/src/fix_lineforce.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "fix_lineforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_minimize.cpp b/src/fix_minimize.cpp index fa39643a1b..df2dfb02a7 100644 --- a/src/fix_minimize.cpp +++ b/src/fix_minimize.cpp @@ -11,12 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_minimize.h" #include "atom.h" #include "domain.h" #include "memory.h" -#include "error.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/fix_momentum.cpp b/src/fix_momentum.cpp index 680251e670..bf94a94362 100644 --- a/src/fix_momentum.cpp +++ b/src/fix_momentum.cpp @@ -11,7 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include #include #include "fix_momentum.h" #include "atom.h" diff --git a/src/fix_move.cpp b/src/fix_move.cpp index 0a5f506ab2..646f943ef9 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_move.h" #include "atom.h" -#include "group.h" #include "update.h" #include "modify.h" #include "force.h" diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index 207c409596..ca593f29df 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -13,16 +13,14 @@ #include #include -#include #include "fix_neigh_history.h" +#include "my_page.h" #include "atom.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "force.h" #include "pair.h" -#include "update.h" -#include "modify.h" #include "memory.h" #include "error.h" diff --git a/src/fix_neigh_history.h b/src/fix_neigh_history.h index 601e8a55a2..51d03f5b12 100644 --- a/src/fix_neigh_history.h +++ b/src/fix_neigh_history.h @@ -21,7 +21,6 @@ FixStyle(NEIGH_HISTORY,FixNeighHistory) #define LMP_FIX_NEIGH_HISTORY_H #include "fix.h" -#include "my_page.h" namespace LAMMPS_NS { diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index deca0ad83d..3ffdff54cf 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -16,10 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_nh.h" -#include "math_extra.h" #include "atom.h" #include "force.h" #include "group.h" diff --git a/src/fix_nh_sphere.cpp b/src/fix_nh_sphere.cpp index f176493242..0f1024700a 100644 --- a/src/fix_nh_sphere.cpp +++ b/src/fix_nh_sphere.cpp @@ -16,10 +16,10 @@ ------------------------------------------------------------------------- */ #include +#include #include "fix_nh_sphere.h" #include "atom.h" #include "atom_vec.h" -#include "group.h" #include "error.h" #include "force.h" #include "domain.h" diff --git a/src/fix_nve.cpp b/src/fix_nve.cpp index 959483230e..3396f3ca47 100644 --- a/src/fix_nve.cpp +++ b/src/fix_nve.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "fix_nve.h" #include "atom.h" diff --git a/src/fix_nve_limit.cpp b/src/fix_nve_limit.cpp index 68ff0665a1..49bed2e3dd 100644 --- a/src/fix_nve_limit.cpp +++ b/src/fix_nve_limit.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "fix_nve_limit.h" #include "atom.h" diff --git a/src/fix_nve_noforce.cpp b/src/fix_nve_noforce.cpp index d4fca9e676..7b61aac18e 100644 --- a/src/fix_nve_noforce.cpp +++ b/src/fix_nve_noforce.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "fix_nve_noforce.h" #include "atom.h" diff --git a/src/fix_nve_sphere.cpp b/src/fix_nve_sphere.cpp index 0bee8b8685..94e8aa88ac 100644 --- a/src/fix_nve_sphere.cpp +++ b/src/fix_nve_sphere.cpp @@ -12,14 +12,11 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_nve_sphere.h" #include "atom.h" #include "domain.h" #include "atom_vec.h" -#include "update.h" -#include "respa.h" #include "force.h" #include "error.h" #include "math_vector.h" diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index c7d23364a7..16e2fb1d3d 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -15,7 +15,6 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include #include #include "fix_nvt_sllod.h" #include "math_extra.h" diff --git a/src/fix_planeforce.cpp b/src/fix_planeforce.cpp index 45dc782fcf..a83d00a506 100644 --- a/src/fix_planeforce.cpp +++ b/src/fix_planeforce.cpp @@ -13,7 +13,6 @@ #include #include -#include #include "fix_planeforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_press_berendsen.cpp b/src/fix_press_berendsen.cpp index 95db004436..ad3e3d1e1c 100644 --- a/src/fix_press_berendsen.cpp +++ b/src/fix_press_berendsen.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_press_berendsen.h" #include "atom.h" @@ -23,7 +22,6 @@ #include "compute.h" #include "kspace.h" #include "update.h" -#include "respa.h" #include "domain.h" #include "error.h" diff --git a/src/fix_print.cpp b/src/fix_print.cpp index f6db88114a..da2e2b54f3 100644 --- a/src/fix_print.cpp +++ b/src/fix_print.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include "fix_print.h" #include "update.h" diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index c89419f850..62c3ec985b 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -19,8 +19,6 @@ #include "memory.h" #include "error.h" -#include "update.h" - using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/fix_read_restart.cpp b/src/fix_read_restart.cpp index 3c3178f4af..afedf9c12c 100644 --- a/src/fix_read_restart.cpp +++ b/src/fix_read_restart.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_read_restart.h" #include "atom.h" #include "memory.h" diff --git a/src/fix_recenter.cpp b/src/fix_recenter.cpp index 75b383d67a..cd50d7dc34 100644 --- a/src/fix_recenter.cpp +++ b/src/fix_recenter.cpp @@ -15,7 +15,7 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins U) ------------------------------------------------------------------------- */ -#include +#include #include #include "fix_recenter.h" #include "atom.h" diff --git a/src/fix_respa.cpp b/src/fix_respa.cpp index 64461ba7ca..ea2eb5050a 100644 --- a/src/fix_respa.cpp +++ b/src/fix_respa.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "fix_respa.h" #include "atom.h" diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 08485d65b3..3b9980d567 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -16,9 +16,9 @@ support for bond and angle restraints by Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ +#include #include #include -#include #include "fix_restrain.h" #include "atom.h" #include "force.h" @@ -26,7 +26,6 @@ #include "domain.h" #include "comm.h" #include "respa.h" -#include "input.h" #include "math_const.h" #include "memory.h" #include "error.h" -- GitLab From 96744c49338448068b16c1fe24ad2557460b13b1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 29 Jun 2019 21:30:23 -0400 Subject: [PATCH 094/236] more include file cleanup --- src/BODY/body_nparticle.cpp | 1 + src/BODY/body_rounded_polygon.cpp | 1 + src/BODY/body_rounded_polyhedron.cpp | 1 + src/fix_setforce.cpp | 2 +- src/fix_spring.cpp | 2 -- src/fix_spring_chunk.cpp | 2 -- src/fix_spring_rg.cpp | 2 -- src/fix_spring_self.cpp | 2 +- src/fix_store.cpp | 1 - src/fix_store_force.cpp | 1 - src/fix_temp_berendsen.cpp | 1 - src/fix_temp_csld.cpp | 1 - src/fix_temp_csvr.cpp | 3 +-- src/fix_temp_rescale.cpp | 3 --- src/fix_tmd.cpp | 1 - src/fix_vector.cpp | 1 - src/fix_viscous.cpp | 2 -- src/fix_wall.cpp | 4 +--- src/fix_wall_harmonic.cpp | 1 - src/fix_wall_reflect.cpp | 1 - src/fix_wall_region.cpp | 5 +---- src/force.cpp | 3 --- src/group.cpp | 3 +-- src/hashlittle.cpp | 1 - src/image.cpp | 3 +-- src/imbalance.h | 2 +- src/imbalance_var.cpp | 4 +--- src/improper.cpp | 1 - src/improper_hybrid.cpp | 3 +-- src/improper_zero.cpp | 3 --- src/info.cpp | 12 ++++++------ src/input.cpp | 5 ----- src/integrate.cpp | 1 - src/irregular.cpp | 1 - src/irregular.h | 1 + src/kspace.cpp | 2 ++ src/kspace.h | 1 + src/lammps.cpp | 1 - src/library.cpp | 4 +--- src/library.h | 2 ++ src/math_extra.h | 3 --- src/memory.cpp | 2 -- src/memory.h | 1 - src/min.cpp | 2 +- src/min_cg.cpp | 2 -- src/min_fire.cpp | 2 +- src/min_hftn.cpp | 1 + src/min_linesearch.cpp | 7 ++----- src/min_quickmin.cpp | 1 - src/min_sd.cpp | 2 -- src/minimize.cpp | 1 - src/modify.cpp | 1 - src/molecule.cpp | 6 +++--- src/nbin.cpp | 2 +- src/neigh_list.cpp | 4 +--- src/neigh_list.h | 1 - src/neighbor.cpp | 3 --- src/neighbor.h | 1 - src/npair_copy.cpp | 7 ------- src/npair_full_bin.cpp | 1 - src/npair_full_bin_atomonly.cpp | 2 -- src/procmap.cpp | 1 + 62 files changed, 37 insertions(+), 107 deletions(-) diff --git a/src/BODY/body_nparticle.cpp b/src/BODY/body_nparticle.cpp index 21070107f5..b2d9dbaca3 100644 --- a/src/BODY/body_nparticle.cpp +++ b/src/BODY/body_nparticle.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "body_nparticle.h" #include "my_pool_chunk.h" diff --git a/src/BODY/body_rounded_polygon.cpp b/src/BODY/body_rounded_polygon.cpp index f7741ada88..6e1e49319e 100644 --- a/src/BODY/body_rounded_polygon.cpp +++ b/src/BODY/body_rounded_polygon.cpp @@ -15,6 +15,7 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include #include #include "body_rounded_polygon.h" #include "my_pool_chunk.h" diff --git a/src/BODY/body_rounded_polyhedron.cpp b/src/BODY/body_rounded_polyhedron.cpp index 34d918f1f6..4b5208c397 100644 --- a/src/BODY/body_rounded_polyhedron.cpp +++ b/src/BODY/body_rounded_polyhedron.cpp @@ -15,6 +15,7 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include #include #include "body_rounded_polyhedron.h" #include "my_pool_chunk.h" diff --git a/src/fix_setforce.cpp b/src/fix_setforce.cpp index fc8b7aeb59..f01008dc10 100644 --- a/src/fix_setforce.cpp +++ b/src/fix_setforce.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include "fix_setforce.h" #include "atom.h" #include "update.h" diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index 328a0eeafd..c87cec2766 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -16,13 +16,11 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_spring.h" #include "atom.h" #include "update.h" #include "respa.h" -#include "domain.h" #include "force.h" #include "group.h" #include "error.h" diff --git a/src/fix_spring_chunk.cpp b/src/fix_spring_chunk.cpp index 5b5d95b111..f6ebadde94 100644 --- a/src/fix_spring_chunk.cpp +++ b/src/fix_spring_chunk.cpp @@ -12,14 +12,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_spring_chunk.h" #include "atom.h" #include "update.h" #include "force.h" #include "respa.h" -#include "domain.h" #include "modify.h" #include "compute_chunk_atom.h" #include "compute_com_chunk.h" diff --git a/src/fix_spring_rg.cpp b/src/fix_spring_rg.cpp index 28c8969006..1d5b87c599 100644 --- a/src/fix_spring_rg.cpp +++ b/src/fix_spring_rg.cpp @@ -16,8 +16,6 @@ Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include #include #include "fix_spring_rg.h" #include "atom.h" diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index 670883af41..a5aa600229 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -15,7 +15,7 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins University) ------------------------------------------------------------------------- */ -#include +#include #include #include "fix_spring_self.h" #include "atom.h" diff --git a/src/fix_store.cpp b/src/fix_store.cpp index 9db65d0987..a370632489 100644 --- a/src/fix_store.cpp +++ b/src/fix_store.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "fix_store.h" #include "atom.h" diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index a841714098..8afd985615 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -15,7 +15,6 @@ #include "fix_store_force.h" #include "atom.h" #include "update.h" -#include "group.h" #include "respa.h" #include "memory.h" #include "error.h" diff --git a/src/fix_temp_berendsen.cpp b/src/fix_temp_berendsen.cpp index 55518015c4..b4dd65b0c5 100644 --- a/src/fix_temp_berendsen.cpp +++ b/src/fix_temp_berendsen.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_temp_berendsen.h" #include "atom.h" diff --git a/src/fix_temp_csld.cpp b/src/fix_temp_csld.cpp index 7bdf776355..57f7104c61 100644 --- a/src/fix_temp_csld.cpp +++ b/src/fix_temp_csld.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_temp_csld.h" #include "atom.h" diff --git a/src/fix_temp_csvr.cpp b/src/fix_temp_csvr.cpp index 495a155113..9f8135ffc8 100644 --- a/src/fix_temp_csvr.cpp +++ b/src/fix_temp_csvr.cpp @@ -16,13 +16,12 @@ Based on code by Paolo Raiteri (Curtin U) and Giovanni Bussi (SISSA) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_temp_csvr.h" #include "atom.h" #include "force.h" -#include "memory.h" #include "comm.h" #include "input.h" #include "variable.h" diff --git a/src/fix_temp_rescale.cpp b/src/fix_temp_rescale.cpp index 11dfa6a5fc..378997c0c4 100644 --- a/src/fix_temp_rescale.cpp +++ b/src/fix_temp_rescale.cpp @@ -12,15 +12,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_temp_rescale.h" #include "atom.h" #include "force.h" #include "group.h" #include "update.h" -#include "domain.h" -#include "region.h" #include "comm.h" #include "input.h" #include "variable.h" diff --git a/src/fix_tmd.cpp b/src/fix_tmd.cpp index 4cbb244bc0..a0425db36c 100644 --- a/src/fix_tmd.cpp +++ b/src/fix_tmd.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include "fix_tmd.h" #include "atom.h" diff --git a/src/fix_vector.cpp b/src/fix_vector.cpp index 5657e59ab0..b7be472be6 100644 --- a/src/fix_vector.cpp +++ b/src/fix_vector.cpp @@ -18,7 +18,6 @@ #include "force.h" #include "modify.h" #include "compute.h" -#include "group.h" #include "input.h" #include "variable.h" #include "memory.h" diff --git a/src/fix_viscous.cpp b/src/fix_viscous.cpp index e845142322..cc60b1bda4 100644 --- a/src/fix_viscous.cpp +++ b/src/fix_viscous.cpp @@ -11,8 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include #include "fix_viscous.h" #include "atom.h" diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index e84d01191d..1046efc2df 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -11,11 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include #include #include "fix_wall.h" -#include "atom.h" #include "input.h" #include "variable.h" #include "domain.h" diff --git a/src/fix_wall_harmonic.cpp b/src/fix_wall_harmonic.cpp index 4dc067178a..6c6d5ec402 100644 --- a/src/fix_wall_harmonic.cpp +++ b/src/fix_wall_harmonic.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_wall_harmonic.h" #include "atom.h" #include "error.h" diff --git a/src/fix_wall_reflect.cpp b/src/fix_wall_reflect.cpp index 8acba72035..edf5c40a5f 100644 --- a/src/fix_wall_reflect.cpp +++ b/src/fix_wall_reflect.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "fix_wall_reflect.h" #include "atom.h" diff --git a/src/fix_wall_region.cpp b/src/fix_wall_region.cpp index ff147d7446..cb1c3c2ab2 100644 --- a/src/fix_wall_region.cpp +++ b/src/fix_wall_region.cpp @@ -11,18 +11,15 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_wall_region.h" #include "atom.h" -#include "atom_vec.h" #include "domain.h" #include "region.h" #include "force.h" -#include "lattice.h" #include "update.h" -#include "output.h" #include "respa.h" #include "error.h" #include "math_const.h" diff --git a/src/force.cpp b/src/force.cpp index 2648358932..e4939a10e8 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -21,7 +21,6 @@ #include "style_improper.h" #include "style_pair.h" #include "style_kspace.h" -#include "atom.h" #include "comm.h" #include "pair.h" #include "pair_hybrid.h" @@ -32,8 +31,6 @@ #include "dihedral.h" #include "improper.h" #include "kspace.h" -#include "group.h" -#include "memory.h" #include "error.h" #include "utils.h" diff --git a/src/group.cpp b/src/group.cpp index 256bab7778..a37d209947 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -13,9 +13,8 @@ #include #include -#include #include -#include +#include #include "group.h" #include "domain.h" #include "atom.h" diff --git a/src/hashlittle.cpp b/src/hashlittle.cpp index 42109abd24..e9340a7e55 100644 --- a/src/hashlittle.cpp +++ b/src/hashlittle.cpp @@ -2,7 +2,6 @@ // from lookup3.c, by Bob Jenkins, May 2006, Public Domain // bob_jenkins@burtleburtle.net -#include #include #include diff --git a/src/image.cpp b/src/image.cpp index 3df167bbf6..ccd6d98d87 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include "image.h" #include "math_extra.h" @@ -29,7 +28,7 @@ #include "memory.h" #ifdef LAMMPS_JPEG -#include "jpeglib.h" +#include #endif #ifdef LAMMPS_PNG diff --git a/src/imbalance.h b/src/imbalance.h index 5f43c2e51d..0cc4ac844e 100644 --- a/src/imbalance.h +++ b/src/imbalance.h @@ -14,7 +14,7 @@ #ifndef LMP_IMBALANCE_H #define LMP_IMBALANCE_H -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/imbalance_var.cpp b/src/imbalance_var.cpp index e089b1df0c..ba17c06866 100644 --- a/src/imbalance_var.cpp +++ b/src/imbalance_var.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "imbalance_var.h" #include "atom.h" @@ -20,9 +21,6 @@ #include "memory.h" #include "error.h" -// DEBUG -#include "update.h" - using namespace LAMMPS_NS; /* -------------------------------------------------------------------- */ diff --git a/src/improper.cpp b/src/improper.cpp index 17e2df4e59..eefe3222ee 100644 --- a/src/improper.cpp +++ b/src/improper.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "improper.h" #include "atom.h" #include "comm.h" diff --git a/src/improper_hybrid.cpp b/src/improper_hybrid.cpp index 5fdcb42a96..af1382d3eb 100644 --- a/src/improper_hybrid.cpp +++ b/src/improper_hybrid.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include #include "improper_hybrid.h" #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/improper_zero.cpp b/src/improper_zero.cpp index 747dd57919..3f36954a0a 100644 --- a/src/improper_zero.cpp +++ b/src/improper_zero.cpp @@ -15,13 +15,10 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include -#include #include #include "improper_zero.h" #include "atom.h" #include "force.h" -#include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/info.cpp b/src/info.cpp index 25b9879408..bb2d3c4b45 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -16,7 +16,13 @@ Richard Berger (Temple U) ------------------------------------------------------------------------- */ +#include +#include #include +#include +#include +#include +#include #include "info.h" #include "accelerator_kokkos.h" #include "atom.h" @@ -44,18 +50,12 @@ #include "error.h" #include "utils.h" -#include -#include -#include -#include - #ifdef _WIN32 #define PSAPI_VERSION 1 #include #include // requires C++-11 #include #else -#include #include #include #endif diff --git a/src/input.cpp b/src/input.cpp index 9e0ad78d9e..cbad1d78bf 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include @@ -52,10 +51,6 @@ #include "memory.h" #include "utils.h" -#ifdef _OPENMP -#include -#endif - #ifdef _WIN32 #include #endif diff --git a/src/integrate.cpp b/src/integrate.cpp index d6b27e042d..545de849d5 100644 --- a/src/integrate.cpp +++ b/src/integrate.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "integrate.h" #include "update.h" #include "force.h" diff --git a/src/irregular.cpp b/src/irregular.cpp index 1865f9cbf6..2040d12d0b 100644 --- a/src/irregular.cpp +++ b/src/irregular.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "irregular.h" #include "atom.h" diff --git a/src/irregular.h b/src/irregular.h index d56bcb253d..3fdfe20b36 100644 --- a/src/irregular.h +++ b/src/irregular.h @@ -14,6 +14,7 @@ #ifndef LMP_IRREGULAR_H #define LMP_IRREGULAR_H +#include #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/kspace.cpp b/src/kspace.cpp index 643cf22113..b51191857d 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -11,6 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include +#include #include #include #include "kspace.h" diff --git a/src/kspace.h b/src/kspace.h index 69f4ccb433..83ce19cd87 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -14,6 +14,7 @@ #ifndef LMP_KSPACE_H #define LMP_KSPACE_H +#include #include "pointers.h" #ifdef FFT_SINGLE diff --git a/src/lammps.cpp b/src/lammps.cpp index 83a2f057ee..b73d9f1968 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -48,7 +48,6 @@ #include "output.h" #include "citeme.h" #include "accelerator_kokkos.h" -#include "accelerator_omp.h" #include "timer.h" #include "lmppython.h" #include "version.h" diff --git a/src/library.cpp b/src/library.cpp index a653b83adb..033b814865 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -15,13 +15,11 @@ // customize by adding new LAMMPS-specific functions #include +#include #include #include #include "library.h" -#include "lmptype.h" -#include "lammps.h" #include "universe.h" -#include "input.h" #include "atom_vec.h" #include "atom.h" #include "domain.h" diff --git a/src/library.h b/src/library.h index f6f8d9d75c..8b03bb3621 100644 --- a/src/library.h +++ b/src/library.h @@ -17,7 +17,9 @@ */ #include +#ifdef LAMMPS_BIGBIG #include /* for int64_t */ +#endif /* ifdefs allow this file to be included in a C program */ diff --git a/src/math_extra.h b/src/math_extra.h index 85f57224cf..09b135c641 100644 --- a/src/math_extra.h +++ b/src/math_extra.h @@ -19,9 +19,6 @@ #define LMP_MATH_EXTRA_H #include -#include -#include -#include "error.h" namespace MathExtra { diff --git a/src/memory.cpp b/src/memory.cpp index b2f8a95b17..ca7fd3ea7f 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include -#include #include "memory.h" #include "error.h" diff --git a/src/memory.h b/src/memory.h index c5eddc7fe7..42c9bf6aba 100644 --- a/src/memory.h +++ b/src/memory.h @@ -14,7 +14,6 @@ #ifndef LMP_MEMORY_H #define LMP_MEMORY_H -#include "lmptype.h" #include "pointers.h" namespace LAMMPS_NS { diff --git a/src/min.cpp b/src/min.cpp index 2a42a444a0..f2e1c982be 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -19,8 +19,8 @@ JR Shewchuk, http://www-2.cs.cmu.edu/~jrs/jrspapers.html#cg ------------------------------------------------------------------------- */ +#include #include -#include #include #include "min.h" #include "atom.h" diff --git a/src/min_cg.cpp b/src/min_cg.cpp index 20e8cc30dd..eb8831c8f5 100644 --- a/src/min_cg.cpp +++ b/src/min_cg.cpp @@ -13,9 +13,7 @@ #include #include -#include #include "min_cg.h" -#include "atom.h" #include "update.h" #include "output.h" #include "timer.h" diff --git a/src/min_fire.cpp b/src/min_fire.cpp index a50071d562..79346341bb 100644 --- a/src/min_fire.cpp +++ b/src/min_fire.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "min_fire.h" #include "universe.h" @@ -19,7 +20,6 @@ #include "update.h" #include "output.h" #include "timer.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/min_hftn.cpp b/src/min_hftn.cpp index 0c834fbeb4..c2c251c386 100644 --- a/src/min_hftn.cpp +++ b/src/min_hftn.cpp @@ -17,6 +17,7 @@ "Parallel Unconstrained Min", Plantenga, SAND98-8201 ------------------------------------------------------------------------- */ +#include #include #include #include "atom.h" diff --git a/src/min_linesearch.cpp b/src/min_linesearch.cpp index f93a56b09d..33a781ecfe 100644 --- a/src/min_linesearch.cpp +++ b/src/min_linesearch.cpp @@ -21,19 +21,16 @@ JR Shewchuk, http://www-2.cs.cmu.edu/~jrs/jrspapers.html#cg ------------------------------------------------------------------------- */ +#include #include #include "min_linesearch.h" #include "atom.h" -#include "update.h" -#include "neighbor.h" -#include "domain.h" #include "modify.h" +#include "neighbor.h" #include "fix_minimize.h" #include "pair.h" #include "output.h" #include "thermo.h" -#include "timer.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/min_quickmin.cpp b/src/min_quickmin.cpp index 8b48816355..784da82686 100644 --- a/src/min_quickmin.cpp +++ b/src/min_quickmin.cpp @@ -20,7 +20,6 @@ #include "update.h" #include "output.h" #include "timer.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/min_sd.cpp b/src/min_sd.cpp index 5d44437ca0..d66601119b 100644 --- a/src/min_sd.cpp +++ b/src/min_sd.cpp @@ -12,9 +12,7 @@ ------------------------------------------------------------------------- */ #include -#include #include "min_sd.h" -#include "atom.h" #include "update.h" #include "output.h" #include "timer.h" diff --git a/src/minimize.cpp b/src/minimize.cpp index e27fffd74b..e1af924019 100644 --- a/src/minimize.cpp +++ b/src/minimize.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "minimize.h" #include "domain.h" #include "update.h" diff --git a/src/modify.cpp b/src/modify.cpp index 3f034bf034..61497d86db 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -11,7 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include "modify.h" #include "style_compute.h" diff --git a/src/molecule.cpp b/src/molecule.cpp index 454459084a..4a3790296f 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -11,7 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include +#include +#include #include #include "molecule.h" #include "atom.h" @@ -21,12 +23,10 @@ #include "comm.h" #include "domain.h" #include "math_extra.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; #define MAXLINE 256 #define EPSILON 1.0e-7 diff --git a/src/nbin.cpp b/src/nbin.cpp index a30b76cca0..0480c9730d 100644 --- a/src/nbin.cpp +++ b/src/nbin.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include "nbin.h" #include "neighbor.h" #include "neigh_request.h" #include "domain.h" -#include "update.h" #include "memory.h" #include "error.h" diff --git a/src/neigh_list.cpp b/src/neigh_list.cpp index 6bdb9beae6..651b2ed70a 100644 --- a/src/neigh_list.cpp +++ b/src/neigh_list.cpp @@ -12,15 +12,13 @@ ------------------------------------------------------------------------- */ #include "neigh_list.h" +#include "my_page.h" #include "atom.h" #include "comm.h" -#include "update.h" -#include "pair.h" #include "neighbor.h" #include "neigh_request.h" #include "my_page.h" #include "memory.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/neigh_list.h b/src/neigh_list.h index 755a1bf134..aca11cd921 100644 --- a/src/neigh_list.h +++ b/src/neigh_list.h @@ -15,7 +15,6 @@ #define LMP_NEIGH_LIST_H #include "pointers.h" -#include "my_page.h" namespace LAMMPS_NS { diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 0382624198..a2efc5919b 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include "neighbor.h" #include "neigh_list.h" @@ -48,8 +47,6 @@ #include "error.h" #include "utils.h" -#include - using namespace LAMMPS_NS; using namespace NeighConst; diff --git a/src/neighbor.h b/src/neighbor.h index 3466dd426a..50de4b4c98 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -15,7 +15,6 @@ #define LMP_NEIGHBOR_H #include "pointers.h" -#include namespace LAMMPS_NS { diff --git a/src/npair_copy.cpp b/src/npair_copy.cpp index 9426d22ed3..0a522c628d 100644 --- a/src/npair_copy.cpp +++ b/src/npair_copy.cpp @@ -12,14 +12,7 @@ ------------------------------------------------------------------------- */ #include "npair_copy.h" -#include "neighbor.h" #include "neigh_list.h" -#include "atom.h" -#include "atom_vec.h" -#include "molecule.h" -#include "domain.h" -#include "my_page.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/npair_full_bin.cpp b/src/npair_full_bin.cpp index 94a6af129c..464dca9251 100644 --- a/src/npair_full_bin.cpp +++ b/src/npair_full_bin.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_full_bin.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_full_bin_atomonly.cpp b/src/npair_full_bin_atomonly.cpp index db84733f1c..758fc7e42b 100644 --- a/src/npair_full_bin_atomonly.cpp +++ b/src/npair_full_bin_atomonly.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "npair_full_bin_atomonly.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/procmap.cpp b/src/procmap.cpp index 9d1ed83e73..08b60a26af 100644 --- a/src/procmap.cpp +++ b/src/procmap.cpp @@ -15,6 +15,7 @@ Contributing author (NUMA option) : Mike Brown (ORNL) ------------------------------------------------------------------------- */ +#include #include "procmap.h" #include "universe.h" #include "comm.h" -- GitLab From 3e88dacd3f351ad4a373a27b76d6799d7e1558c9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 30 Jun 2019 17:27:29 -0400 Subject: [PATCH 095/236] recover broken compilation of the USER-EFF package --- src/USER-EFF/fix_nvt_sllod_eff.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/USER-EFF/fix_nvt_sllod_eff.cpp b/src/USER-EFF/fix_nvt_sllod_eff.cpp index ed2274dcf9..0ebbf04d64 100644 --- a/src/USER-EFF/fix_nvt_sllod_eff.cpp +++ b/src/USER-EFF/fix_nvt_sllod_eff.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include +#include #include #include "fix_nvt_sllod_eff.h" #include "math_extra.h" -- GitLab From e29361523f472a67ca2c7309b7b6da3c9b29aef4 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 30 Jun 2019 18:30:59 -0400 Subject: [PATCH 096/236] recover compilation of the USER-PHONON package --- src/USER-PHONON/dynamical_matrix.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/USER-PHONON/dynamical_matrix.cpp b/src/USER-PHONON/dynamical_matrix.cpp index d94bd11a80..559ef4c36f 100644 --- a/src/USER-PHONON/dynamical_matrix.cpp +++ b/src/USER-PHONON/dynamical_matrix.cpp @@ -3,15 +3,15 @@ // #include -#include +#include +#include #include "dynamical_matrix.h" #include "atom.h" -#include "modify.h" #include "domain.h" #include "comm.h" +#include "error.h" #include "group.h" #include "force.h" -#include "math_extra.h" #include "memory.h" #include "bond.h" #include "angle.h" @@ -25,7 +25,6 @@ #include "finish.h" #include - using namespace LAMMPS_NS; enum{REGULAR,ESKM}; -- GitLab From 78af59438101a989c6c1a5708601f7ba4a474f95 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 30 Jun 2019 22:45:41 -0400 Subject: [PATCH 097/236] fix typos. restore compilation of LAMMPS class implementation with OpenMP --- doc/include-file-conventions.md | 12 ++++++------ src/lammps.cpp | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/include-file-conventions.md b/doc/include-file-conventions.md index 8d70d6cdec..3f591361f5 100644 --- a/doc/include-file-conventions.md +++ b/doc/include-file-conventions.md @@ -25,7 +25,7 @@ well as make otherwise hidden dependencies visible. ## Rules -Below are the various rules that are applied. Not all a enforced +Below are the various rules that are applied. Not all are enforced strictly and automatically. If there are no significant side effects, exceptions may be possible for cases, where a full compliance to the rules may require a large effort compared to the benefit. @@ -78,9 +78,9 @@ result in a high potential for direct or indirect symbol name clashes. In the ideal case, the header would only include one file defining the parent class. That would typically be either `#include "pointers.h"` for the `Pointers` class, or a header of a class derived from it like -`#include "pair.h"` for the `Pair` class and so on. Referenced to other +`#include "pair.h"` for the `Pair` class and so on. References to other classes inside the class should be make through pointers, for which forward -declarations (inside the `LAMMPS_NS` or the new class'es namespace) can +declarations (inside the `LAMMPS_NS` or the new class' namespace) can be employed. The full definition will then be included into the corresponding implementation file. In the given example from above, the header file would be called `some_name.h` and the implementation `some_name.cpp` (all @@ -92,7 +92,7 @@ a forward slash). In the implementation files (typically, those would have the same base name as the corresponding header with a .cpp extension instead of .h) include -statments should follow the "include what you use" principle. +statements should follow the "include what you use" principle. ### Order of Include Statements @@ -107,7 +107,7 @@ Include files should be included in this order: #### pointers.h The `pointer.h` header file also includes `cstdio` and `lmptype.h` -(and throught it `stdint.h`, `intttypes.h`, and `climits`). +(and through it `stdint.h`, `intttypes.h`, and `climits`). This means any header including `pointers.h` can assume that `FILE`, `NULL`, `INT_MAX` are defined. @@ -115,7 +115,7 @@ This means any header including `pointers.h` can assume that `FILE`, The [Include What You Use tool](https://include-what-you-use.org/) can be used to provide supporting information about compliance with -the rules listed here. There are some limitations and the IWWU tool +the rules listed here. There are some limitations and the IWYU tool may give incorrect advice. The tools is activated by setting the CMake variable `CMAKE_CXX_INCLUDE_WHAT_YOU_USE` variable to the path of the `include-what-you-use` command. When activated, the diff --git a/src/lammps.cpp b/src/lammps.cpp index b73d9f1968..83a2f057ee 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -48,6 +48,7 @@ #include "output.h" #include "citeme.h" #include "accelerator_kokkos.h" +#include "accelerator_omp.h" #include "timer.h" #include "lmppython.h" #include "version.h" -- GitLab From e0c04355bb1019ee3ce37242a2cd426dedaef128 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 30 Jun 2019 22:59:44 -0400 Subject: [PATCH 098/236] try to recover compiling of USER-OMP with OpenMP enabled --- src/USER-OMP/fix_neigh_history_omp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/USER-OMP/fix_neigh_history_omp.cpp b/src/USER-OMP/fix_neigh_history_omp.cpp index efa7f5a3f1..be03e1d8f2 100644 --- a/src/USER-OMP/fix_neigh_history_omp.cpp +++ b/src/USER-OMP/fix_neigh_history_omp.cpp @@ -14,6 +14,7 @@ #include #include #include "fix_neigh_history_omp.h" +#include "my_page.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -- GitLab From 44372f52369cb101a3ca6757035d9e1ec2443fb6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 30 Jun 2019 23:12:08 -0400 Subject: [PATCH 099/236] more fixes for USER-OMP --- src/USER-OMP/fix_rigid_nh_omp.cpp | 6 ++++-- src/USER-OMP/fix_rigid_omp.cpp | 6 ++++-- src/USER-OMP/fix_rigid_small_omp.cpp | 4 ++-- src/lammps.cpp | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/USER-OMP/fix_rigid_nh_omp.cpp b/src/USER-OMP/fix_rigid_nh_omp.cpp index 53d0134741..e6a6e065bf 100644 --- a/src/USER-OMP/fix_rigid_nh_omp.cpp +++ b/src/USER-OMP/fix_rigid_nh_omp.cpp @@ -15,6 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include +#include + #include "fix_rigid_nh_omp.h" #include "atom.h" @@ -24,13 +27,12 @@ #include "comm.h" #include "compute.h" #include "domain.h" +#include "error.h" #include "force.h" #include "kspace.h" #include "modify.h" #include "update.h" -#include - #if defined(_OPENMP) #include #endif diff --git a/src/USER-OMP/fix_rigid_omp.cpp b/src/USER-OMP/fix_rigid_omp.cpp index 12c6362ed8..20478b3ca1 100644 --- a/src/USER-OMP/fix_rigid_omp.cpp +++ b/src/USER-OMP/fix_rigid_omp.cpp @@ -15,6 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include +#include + #include "fix_rigid_omp.h" #include "atom.h" @@ -23,8 +26,7 @@ #include "atom_vec_tri.h" #include "comm.h" #include "domain.h" - -#include +#include "error.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/fix_rigid_small_omp.cpp b/src/USER-OMP/fix_rigid_small_omp.cpp index a0495b3b93..1f6173497d 100644 --- a/src/USER-OMP/fix_rigid_small_omp.cpp +++ b/src/USER-OMP/fix_rigid_small_omp.cpp @@ -15,6 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include + #include "fix_rigid_small_omp.h" #include "atom.h" @@ -24,8 +26,6 @@ #include "comm.h" #include "domain.h" -#include - #if defined(_OPENMP) #include #endif diff --git a/src/lammps.cpp b/src/lammps.cpp index 83a2f057ee..052d14dfed 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -48,7 +48,7 @@ #include "output.h" #include "citeme.h" #include "accelerator_kokkos.h" -#include "accelerator_omp.h" +#include "accelerator_omp.h" // IWYU pragma: keep #include "timer.h" #include "lmppython.h" #include "version.h" -- GitLab From 483b1dbef5ee2d0c7f92885c7de2d8d94600dcbc Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 30 Jun 2019 21:19:04 -0600 Subject: [PATCH 100/236] Update fix_bond_react.txt --- doc/src/fix_bond_react.txt | 48 ++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/doc/src/fix_bond_react.txt b/doc/src/fix_bond_react.txt index 34f0e6daf7..7310545e1c 100644 --- a/doc/src/fix_bond_react.txt +++ b/doc/src/fix_bond_react.txt @@ -24,7 +24,7 @@ common_keyword = {stabilization} :l {stabilization} values = {no} or {yes} {group-ID} {xmax} {no} = no reaction site stabilization {yes} = perform reaction site stabilization - {group-ID} = user-assigned prefix for the dynamic group of non-reacting atoms + {group-ID} = user-assigned prefix for the dynamic group of atoms not currently involved in a reaction {xmax} = xmax value that is used by an internally-created "nve/limit"_fix_nve_limit.html integrator :pre react = mandatory argument indicating new reaction specification :l react-ID = user-assigned name for the reaction :l @@ -52,6 +52,8 @@ react = mandatory argument indicating new reaction specification :l [Examples:] +For unabridged example scripts and files, see \examples\USER\misc\bond_react. + molecule mol1 pre_reacted_topology.txt molecule mol2 post_reacted_topology.txt fix 5 all bond/react react myrxn1 all 1 0 3.25 mol1 mol2 map_file.txt :pre @@ -106,6 +108,20 @@ involved in any new reactions. The {xmax} value keyword should typically be set to the maximum distance that non-reacting atoms move during the simulation. +Fix bond/react creates and maintains two important dynamic groups of +atoms when using the {stabilization} keyword. The first group contains +all atoms currently involved in a reaction; this group is +automatically thermostatted by an internally-created +"nve/limit"_fix_nve_limit.html integrator. The second group contains +all atoms currently not involved in a reaction. This group should be +used by a thermostat in order to time integrate the system. The name +of this group of non-reacting atoms is created by appending '_REACT' +to the group-ID argument of the {stabilization} keyword, as shown in +the second example above. + +NOTE: When using reaction stabilization, you should generally not have +a separate thermostat which acts on the 'all' group. + The group-ID set using the {stabilization} keyword can be an existing static group or a previously-unused group-ID. It cannot be specified as 'all'. If the group-ID is previously unused, the fix bond/react @@ -116,20 +132,17 @@ internally-created dynamic group. In both cases, this new dynamic group is named by appending '_REACT' to the group-ID, e.g. nvt_grp_REACT. By specifying an existing group, you may thermostat constant-topology parts of your system separately. The dynamic group -contains only non-reacting atoms at a given timestep, and therefore -should be used by a subsequent system-wide time integrator such as -nvt, npt, or nve, as shown in the second example above. The time -integration command should be placed after the fix bond/react command -due to the internal dynamic grouping performed by fix bond/react. +contains only atoms not involved in a reaction at a given timestep, +and therefore should be used by a subsequent system-wide time +integrator such as nvt, npt, or nve, as shown in the second example +above (full examples can be found at \examples\USER\misc\bond_react). +The time integration command should be placed after the fix bond/react +command due to the internal dynamic grouping performed by fix +bond/react. NOTE: If the group-ID is an existing static group, react-group-IDs should also be specified as this static group, or a subset. -NOTE: If the group-ID is previously unused, the internally-created -group applies to all atoms in the system, i.e. you should generally -not have a separate thermostat which acts on the 'all' group, or any -other group. - The following comments pertain to each {react} argument (in other words, can be customized for each reaction, or reaction step): @@ -352,12 +365,13 @@ an atom that is not deleted. In addition to deleting unwanted reaction by-products, this feature can be used to remove specific topologies, such as small rings, that may be otherwise indistinguishable. -Also, it may be beneficial to ensure reacting atoms are at a certain -temperature before being released to the overall thermostat. For this, -you can use the internally-created dynamic group named -"bond_react_MASTER_group." For example, adding the following command -would thermostat the group of all atoms currently involved in a -reaction: +Optionally, you can enforce additional behaviors on reacting atoms. +For example, it may be beneficial to force reacting atoms to remain at +a certain temperature. For this, you can use the internally-created +dynamic group named "bond_react_MASTER_group", which consists of all +atoms currently involved in a reaction. For example, adding the +following command would add an additional thermostat to the group of +all currently-reacting atoms: fix 1 bond_react_MASTER_group temp/rescale 1 300 300 10 1 :pre -- GitLab From af8103433c63ee4ef6ea9b8ae4ad764d109820f9 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 30 Jun 2019 22:13:12 -0600 Subject: [PATCH 101/236] add stabilized vs unstabilized examples --- ...in.tiny_nylon => in.tiny_nylon.stabilized} | 2 + .../tiny_nylon/in.tiny_nylon.unstabilized | 48 +++ .../tiny_nylon/log.20Apr18.tiny_nylon.g++.1 | 370 ------------------ .../tiny_nylon/log.20Apr18.tiny_nylon.g++.4 | 370 ------------------ .../log.5Jun19.tiny_nylon.stabilized.g++.1 | 148 +++++++ .../log.5Jun19.tiny_nylon.stabilized.g++.4 | 148 +++++++ .../log.5Jun19.tiny_nylon.unstabilized.g++.1 | 147 +++++++ .../log.5Jun19.tiny_nylon.unstabilized.g++.4 | 147 +++++++ 8 files changed, 640 insertions(+), 740 deletions(-) rename examples/USER/misc/bond_react/tiny_nylon/{in.tiny_nylon => in.tiny_nylon.stabilized} (88%) create mode 100644 examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon.unstabilized delete mode 100644 examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.1 delete mode 100644 examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.4 create mode 100644 examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.1 create mode 100644 examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.4 create mode 100644 examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.1 create mode 100644 examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.4 diff --git a/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon b/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon.stabilized similarity index 88% rename from examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon rename to examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon.stabilized index 73cb2eb270..b152dec00a 100644 --- a/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon +++ b/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon.stabilized @@ -38,6 +38,8 @@ fix myrxns all bond/react stabilization yes statted_grp .03 & fix 1 statted_grp_REACT nvt temp 300 300 100 +# optionally, you can customize behavior of reacting atoms, +# by using the internally-created 'bond_react_MASTER_group', like so: fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] diff --git a/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon.unstabilized b/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon.unstabilized new file mode 100644 index 0000000000..1e5a493821 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/in.tiny_nylon.unstabilized @@ -0,0 +1,48 @@ +# two monomer nylon example +# reaction produces a condensed water molecule + +units real + +boundary p p p + +atom_style full + +kspace_style pppm 1.0e-4 + +pair_style lj/class2/coul/long 8.5 + +angle_style class2 + +bond_style class2 + +dihedral_style class2 + +improper_style class2 + +read_data tiny_nylon.data + +velocity all create 300.0 4928459 dist gaussian + +molecule mol1 rxn1_stp1_unreacted.data_template +molecule mol2 rxn1_stp1_reacted.data_template +molecule mol3 rxn1_stp2_unreacted.data_template +molecule mol4 rxn1_stp2_reacted.data_template + +thermo 50 + +# dump 1 all xyz 1 test_vis.xyz + +fix myrxns all bond/react stabilization no & + react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map & + react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map + +fix 1 all nve/limit .03 + +thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] + +# restart 100 restart1 restart2 + +run 1000 + +# write_restart restart_longrun +# write_data restart_longrun.data diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.1 b/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.1 deleted file mode 100644 index 344439f94c..0000000000 --- a/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.1 +++ /dev/null @@ -1,370 +0,0 @@ -LAMMPS (20 Apr 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) - using 1 OpenMP thread(s) per MPI task -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -read_data tiny_nylon.data - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 44 impropers - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.data_template -Read molecule mol1: - 18 atoms with max type 8 - 16 bonds with max type 14 - 25 angles with max type 28 - 23 dihedrals with max type 36 - 14 impropers with max type 11 -molecule mol2 rxn1_stp1_reacted.data_template -Read molecule mol2: - 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 - 20 impropers with max type 1 -molecule mol3 rxn1_stp2_unreacted.data_template -Read molecule mol3: - 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 - 16 impropers with max type 1 -molecule mol4 rxn1_stp2_reacted.data_template -Read molecule mol4: - 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 10 impropers with max type 13 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: An atom in 'react #1' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) -WARNING: An atom in 'react #2' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp defined -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp defined - -fix 1 statted_grp nvt temp 300 300 100 - -fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 - -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] - -# restart 100 restart1 restart2 - -run 10000 -PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.0534597 - grid = 2 2 2 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0402256 - estimated relative force accuracy = 0.000121138 - using double precision FFTs - 3d grid and FFT values/proc = 343 8 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -WARNING: Inconsistent image flags (../domain.cpp:786) -Per MPI rank memory allocation (min/avg/max) = 33.34 | 33.34 | 33.34 Mbytes -Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0 0 - 50 296.70408 -51.30066 0.0034851739 1 0 - 100 274.25324 46.715512 0.0034851739 1 1 - 150 471.61579 31.321598 0.0034851739 1 1 - 200 362.87766 42.061118 0.0034851739 1 1 - 250 367.58058 65.303109 0.0034851739 1 1 - 300 372.38236 -52.421725 0.0034851739 1 1 - 350 297.69957 17.869945 0.0034851739 1 1 - 400 258.30433 49.19156 0.0034851739 1 1 - 450 253.34384 -5.8162637 0.0034851739 1 1 - 500 269.96465 -43.337517 0.0034851739 1 1 - 550 303.23718 10.180246 0.0034851739 1 1 - 600 329.59579 -48.97461 0.0034851739 1 1 - 650 350.42568 50.983183 0.0034851739 1 1 - 700 342.03272 35.43465 0.0034851739 1 1 - 750 269.23405 -41.873166 0.0034851739 1 1 - 800 245.15025 13.953092 0.0034851739 1 1 - 850 257.85421 -3.1492141 0.0034851739 1 1 - 900 316.15644 7.7798301 0.0034851739 1 1 - 950 299.9124 -15.77014 0.0034851739 1 1 - 1000 302.89968 -17.049693 0.0034851739 1 1 - 1050 308.91651 71.84632 0.0034851739 1 1 - 1100 348.43932 -18.742012 0.0034851739 1 1 - 1150 309.03036 50.536311 0.0034851739 1 1 - 1200 318.9761 -16.905746 0.0034851739 1 1 - 1250 320.42806 -0.057975092 0.0034851739 1 1 - 1300 289.7824 18.200772 0.0034851739 1 1 - 1350 284.79836 -9.1978427 0.0034851739 1 1 - 1400 325.43292 42.082833 0.0034851739 1 1 - 1450 261.5041 -37.823325 0.0034851739 1 1 - 1500 298.88723 -5.1647385 0.0034851739 1 1 - 1550 291.37403 -7.7764201 0.0034851739 1 1 - 1600 293.83475 22.2458 0.0034851739 1 1 - 1650 293.80611 24.202512 0.0034851739 1 1 - 1700 291.70205 -23.397884 0.0034851739 1 1 - 1750 292.32437 -10.671214 0.0034851739 1 1 - 1800 302.01367 -11.671025 0.0034851739 1 1 - 1850 322.1651 24.438331 0.0034851739 1 1 - 1900 310.45076 45.343592 0.0034851739 1 1 - 1950 325.91745 -19.847809 0.0034851739 1 1 - 2000 276.89662 63.387098 0.0034851739 1 1 - 2050 311.33783 -24.683247 0.0034851739 1 1 - 2100 346.2336 -27.526891 0.0034851739 1 1 - 2150 345.30604 -15.722411 0.0034851739 1 1 - 2200 346.7718 -17.857633 0.0034851739 1 1 - 2250 304.28676 -1.9965581 0.0034851739 1 1 - 2300 322.56372 -31.786868 0.0034851739 1 1 - 2350 282.64326 6.1982735 0.0034851739 1 1 - 2400 286.65759 -63.207781 0.0034851739 1 1 - 2450 257.05528 32.931491 0.0034851739 1 1 - 2500 283.64386 26.912373 0.0034851739 1 1 - 2550 299.54005 27.277039 0.0034851739 1 1 - 2600 283.92503 14.660972 0.0034851739 1 1 - 2650 321.93453 -18.977358 0.0034851739 1 1 - 2700 376.7189 31.826935 0.0034851739 1 1 - 2750 372.20075 -32.821697 0.0034851739 1 1 - 2800 361.40604 83.035183 0.0034851739 1 1 - 2850 332.27269 -23.927452 0.0034851739 1 1 - 2900 331.14638 -0.12328446 0.0034851739 1 1 - 2950 303.67489 -24.078857 0.0034851739 1 1 - 3000 311.40462 21.563537 0.0034851739 1 1 - 3050 284.72849 -23.849667 0.0034851739 1 1 - 3100 303.48477 39.347763 0.0034851739 1 1 - 3150 264.2739 -0.22299879 0.0034851739 1 1 - 3200 300.03351 31.545323 0.0034851739 1 1 - 3250 288.56663 5.7225228 0.0034851739 1 1 - 3300 200.13238 -31.239655 0.0034851739 1 1 - 3350 231.32512 16.631728 0.0034851739 1 1 - 3400 260.57402 2.1717992 0.0034851739 1 1 - 3450 301.47128 -42.210623 0.0034851739 1 1 - 3500 321.77414 40.074365 0.0034851739 1 1 - 3550 353.21858 28.387783 0.0034851739 1 1 - 3600 331.45989 -57.800858 0.0034851739 1 1 - 3650 303.88123 44.86596 0.0034851739 1 1 - 3700 329.73833 -0.80615652 0.0034851739 1 1 - 3750 297.55588 -0.49626039 0.0034851739 1 1 - 3800 286.38794 -10.010003 0.0034851739 1 1 - 3850 290.17417 -43.51187 0.0034851739 1 1 - 3900 247.88933 51.23735 0.0034851739 1 1 - 3950 332.31324 -18.194985 0.0034851739 1 1 - 4000 325.56802 18.402825 0.0034851739 1 1 - 4050 338.37593 36.430977 0.0034851739 1 1 - 4100 370.95478 39.290285 0.0034851739 1 1 - 4150 348.47859 -7.0779678 0.0034851739 1 1 - 4200 241.30632 -33.371788 0.0034851739 1 1 - 4250 242.17258 -9.986197 0.0034851739 1 1 - 4300 300.85311 -7.9244294 0.0034851739 1 1 - 4350 273.15684 -21.257283 0.0034851739 1 1 - 4400 305.77463 -5.8720722 0.0034851739 1 1 - 4450 314.97697 45.0373 0.0034851739 1 1 - 4500 310.77723 16.958773 0.0034851739 1 1 - 4550 302.1742 12.156862 0.0034851739 1 1 - 4600 319.74799 6.84889 0.0034851739 1 1 - 4650 270.86805 -13.767905 0.0034851739 1 1 - 4700 249.81731 -31.197487 0.0034851739 1 1 - 4750 285.86481 -9.8916364 0.0034851739 1 1 - 4800 233.98321 7.1338571 0.0034851739 1 1 - 4850 302.60551 49.262889 0.0034851739 1 1 - 4900 316.55056 34.663247 0.0034851739 1 1 - 4950 357.32741 11.583006 0.0034851739 1 1 - 5000 400.21045 -8.1781061 0.0034851739 1 1 - 5050 390.01845 -20.490275 0.0034851739 1 1 - 5100 378.84247 -41.328757 0.0034851739 1 1 - 5150 324.02038 -15.023862 0.0034851739 1 1 - 5200 262.08429 10.937354 0.0034851739 1 1 - 5250 255.75508 16.381455 0.0034851739 1 1 - 5300 277.84989 40.68232 0.0034851739 1 1 - 5350 302.92832 9.1989494 0.0034851739 1 1 - 5400 283.7196 -1.6584671 0.0034851739 1 1 - 5450 300.71266 -4.7030295 0.0034851739 1 1 - 5500 343.5499 -0.30550044 0.0034851739 1 1 - 5550 369.51271 21.691649 0.0034851739 1 1 - 5600 372.69789 -38.67994 0.0034851739 1 1 - 5650 327.41266 11.352137 0.0034851739 1 1 - 5700 278.98614 -23.827304 0.0034851739 1 1 - 5750 308.30054 -20.756187 0.0034851739 1 1 - 5800 341.45594 28.058441 0.0034851739 1 1 - 5850 322.97844 -10.731921 0.0034851739 1 1 - 5900 304.53591 32.825279 0.0034851739 1 1 - 5950 287.1752 -36.780091 0.0034851739 1 1 - 6000 296.52681 18.781896 0.0034851739 1 1 - 6050 314.25442 15.992829 0.0034851739 1 1 - 6100 313.86576 3.4342714 0.0034851739 1 1 - 6150 325.64196 32.392039 0.0034851739 1 1 - 6200 367.42931 -27.160706 0.0034851739 1 1 - 6250 369.30798 39.020934 0.0034851739 1 1 - 6300 328.92285 -23.175157 0.0034851739 1 1 - 6350 305.63077 4.9024453 0.0034851739 1 1 - 6400 241.70341 -13.676629 0.0034851739 1 1 - 6450 265.66717 2.40612 0.0034851739 1 1 - 6500 249.36037 13.420255 0.0034851739 1 1 - 6550 294.53814 10.853462 0.0034851739 1 1 - 6600 308.2025 18.995308 0.0034851739 1 1 - 6650 305.43797 -49.56785 0.0034851739 1 1 - 6700 320.27344 11.336281 0.0034851739 1 1 - 6750 321.78666 -23.463899 0.0034851739 1 1 - 6800 303.40388 7.6224553 0.0034851739 1 1 - 6850 297.18966 51.52256 0.0034851739 1 1 - 6900 284.18909 -8.4947203 0.0034851739 1 1 - 6950 331.03663 13.233655 0.0034851739 1 1 - 7000 311.37928 -43.265479 0.0034851739 1 1 - 7050 286.81661 -14.174683 0.0034851739 1 1 - 7100 302.84119 12.048954 0.0034851739 1 1 - 7150 297.19357 -43.111968 0.0034851739 1 1 - 7200 332.47359 26.048249 0.0034851739 1 1 - 7250 262.70677 41.176242 0.0034851739 1 1 - 7300 250.61405 -23.413982 0.0034851739 1 1 - 7350 296.91117 35.88133 0.0034851739 1 1 - 7400 245.09229 -13.447194 0.0034851739 1 1 - 7450 272.28131 -23.322585 0.0034851739 1 1 - 7500 209.04985 13.871239 0.0034851739 1 1 - 7550 255.00955 4.9325621 0.0034851739 1 1 - 7600 312.30937 -37.368274 0.0034851739 1 1 - 7650 305.65903 55.245496 0.0034851739 1 1 - 7700 325.09504 -18.347711 0.0034851739 1 1 - 7750 363.28282 -22.479686 0.0034851739 1 1 - 7800 350.17429 26.849547 0.0034851739 1 1 - 7850 271.70853 -17.764575 0.0034851739 1 1 - 7900 272.66484 -11.701967 0.0034851739 1 1 - 7950 298.60202 -12.765675 0.0034851739 1 1 - 8000 274.58852 49.641532 0.0034851739 1 1 - 8050 304.72347 -0.55414183 0.0034851739 1 1 - 8100 328.30757 -39.861301 0.0034851739 1 1 - 8150 406.67601 2.8999409 0.0034851739 1 1 - 8200 332.20083 -51.217399 0.0034851739 1 1 - 8250 354.50609 53.128769 0.0034851739 1 1 - 8300 337.2758 20.68562 0.0034851739 1 1 - 8350 361.89708 -54.185869 0.0034851739 1 1 - 8400 305.63496 24.058529 0.0034851739 1 1 - 8450 303.27461 4.304683 0.0034851739 1 1 - 8500 253.53694 -10.909021 0.0034851739 1 1 - 8550 277.03017 23.241479 0.0034851739 1 1 - 8600 291.41844 -22.240665 0.0034851739 1 1 - 8650 307.85368 31.919587 0.0034851739 1 1 - 8700 309.19724 0.53529642 0.0034851739 1 1 - 8750 354.6583 11.565515 0.0034851739 1 1 - 8800 329.78598 19.5996 0.0034851739 1 1 - 8850 240.79198 21.803515 0.0034851739 1 1 - 8900 318.40749 -59.816923 0.0034851739 1 1 - 8950 308.47211 -57.808635 0.0034851739 1 1 - 9000 271.51207 50.943482 0.0034851739 1 1 - 9050 249.4005 6.7529187 0.0034851739 1 1 - 9100 221.8772 47.196092 0.0034851739 1 1 - 9150 297.9351 4.0058184 0.0034851739 1 1 - 9200 274.85051 -24.774393 0.0034851739 1 1 - 9250 336.04757 5.3799028 0.0034851739 1 1 - 9300 380.44956 -22.389381 0.0034851739 1 1 - 9350 336.9824 23.050616 0.0034851739 1 1 - 9400 304.46425 32.530218 0.0034851739 1 1 - 9450 317.55591 -22.265425 0.0034851739 1 1 - 9500 323.70901 -7.0159787 0.0034851739 1 1 - 9550 316.07308 28.062131 0.0034851739 1 1 - 9600 262.74608 -0.78519192 0.0034851739 1 1 - 9650 271.55045 -21.430123 0.0034851739 1 1 - 9700 239.6022 14.483637 0.0034851739 1 1 - 9750 338.1437 -0.72765302 0.0034851739 1 1 - 9800 334.50189 19.495144 0.0034851739 1 1 - 9850 354.87554 19.272719 0.0034851739 1 1 - 9900 334.02141 -22.393457 0.0034851739 1 1 - 9950 293.63651 19.178873 0.0034851739 1 1 - 10000 319.81736 21.904414 0.0034851739 1 1 -Loop time of 1.84987 on 1 procs for 10000 steps with 44 atoms - -Performance: 467.059 ns/day, 0.051 hours/ns, 5405.774 timesteps/s -99.5% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.26152 | 0.26152 | 0.26152 | 0.0 | 14.14 -Bond | 0.74069 | 0.74069 | 0.74069 | 0.0 | 40.04 -Kspace | 0.30505 | 0.30505 | 0.30505 | 0.0 | 16.49 -Neigh | 0.39991 | 0.39991 | 0.39991 | 0.0 | 21.62 -Comm | 0.02261 | 0.02261 | 0.02261 | 0.0 | 1.22 -Output | 0.0034585 | 0.0034585 | 0.0034585 | 0.0 | 0.19 -Modify | 0.099979 | 0.099979 | 0.099979 | 0.0 | 5.40 -Other | | 0.01666 | | | 0.90 - -Nlocal: 44 ave 44 max 44 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 44 ave 44 max 44 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 823 ave 823 max 823 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 823 -Ave neighs/atom = 18.7045 -Ave special neighs/atom = 9.77273 -Neighbor list builds = 10000 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:01 diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.4 b/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.4 deleted file mode 100644 index 377781f48f..0000000000 --- a/examples/USER/misc/bond_react/tiny_nylon/log.20Apr18.tiny_nylon.g++.4 +++ /dev/null @@ -1,370 +0,0 @@ -LAMMPS (20 Apr 2018) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) - using 1 OpenMP thread(s) per MPI task -# two monomer nylon example -# reaction produces a condensed water molecule - -units real - -boundary p p p - -atom_style full - -kspace_style pppm 1.0e-4 - -pair_style lj/class2/coul/long 8.5 - -angle_style class2 - -bond_style class2 - -dihedral_style class2 - -improper_style class2 - -read_data tiny_nylon.data - orthogonal box = (-25 -25 -25) to (25 25 25) - 1 by 2 by 2 MPI processor grid - reading atoms ... - 44 atoms - reading velocities ... - 44 velocities - scanning bonds ... - 9 = max bonds/atom - scanning angles ... - 21 = max angles/atom - scanning dihedrals ... - 29 = max dihedrals/atom - scanning impropers ... - 29 = max impropers/atom - reading bonds ... - 42 bonds - reading angles ... - 74 angles - reading dihedrals ... - 100 dihedrals - reading impropers ... - 44 impropers - 4 = max # of 1-2 neighbors - 6 = max # of 1-3 neighbors - 12 = max # of 1-4 neighbors - 41 = max # of special neighbors - -velocity all create 300.0 4928459 dist gaussian - -molecule mol1 rxn1_stp1_unreacted.data_template -Read molecule mol1: - 18 atoms with max type 8 - 16 bonds with max type 14 - 25 angles with max type 28 - 23 dihedrals with max type 36 - 14 impropers with max type 11 -molecule mol2 rxn1_stp1_reacted.data_template -Read molecule mol2: - 18 atoms with max type 9 - 17 bonds with max type 13 - 31 angles with max type 27 - 39 dihedrals with max type 33 - 20 impropers with max type 1 -molecule mol3 rxn1_stp2_unreacted.data_template -Read molecule mol3: - 15 atoms with max type 9 - 14 bonds with max type 13 - 25 angles with max type 27 - 30 dihedrals with max type 33 - 16 impropers with max type 1 -molecule mol4 rxn1_stp2_reacted.data_template -Read molecule mol4: - 15 atoms with max type 11 - 13 bonds with max type 15 - 19 angles with max type 29 - 16 dihedrals with max type 32 - 10 impropers with max type 13 - -thermo 50 - -# dump 1 all xyz 1 test_vis.xyz - -fix myrxns all bond/react stabilization yes statted_grp .03 react rxn1 all 1 0.0 2.9 mol1 mol2 rxn1_stp1_map react rxn2 all 1 0.0 5.0 mol3 mol4 rxn1_stp2_map -WARNING: An atom in 'react #1' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) -WARNING: An atom in 'react #2' changes bond connectivity but not atom type (../fix_bond_react.cpp:1489) -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp defined -dynamic group bond_react_MASTER_group defined -dynamic group statted_grp defined - -fix 1 statted_grp nvt temp 300 300 100 - -fix 4 bond_react_MASTER_group temp/rescale 1 300 300 10 1 - -thermo_style custom step temp press density f_myrxns[1] f_myrxns[2] - -# restart 100 restart1 restart2 - -run 10000 -PPPM initialization ... - using 12-bit tables for long-range coulomb (../kspace.cpp:321) - G vector (1/distance) = 0.0534597 - grid = 2 2 2 - stencil order = 5 - estimated absolute RMS force accuracy = 0.0402256 - estimated relative force accuracy = 0.000121138 - using double precision FFTs - 3d grid and FFT values/proc = 252 2 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 10.5 - ghost atom cutoff = 10.5 - binsize = 5.25, bins = 10 10 10 - 2 neighbor lists, perpetual/occasional/extra = 1 1 0 - (1) pair lj/class2/coul/long, perpetual - attributes: half, newton on - pair build: half/bin/newton - stencil: half/bin/3d/newton - bin: standard - (2) fix bond/react, occasional, copy from (1) - attributes: half, newton on - pair build: copy - stencil: none - bin: none -WARNING: Inconsistent image flags (../domain.cpp:786) -Per MPI rank memory allocation (min/avg/max) = 33.34 | 33.69 | 34.37 Mbytes -Step Temp Press Density f_myrxns[1] f_myrxns[2] - 0 300 346.78165 0.0034851739 0 0 - 50 296.70408 -51.30066 0.0034851739 1 0 - 100 274.25324 46.715512 0.0034851739 1 1 - 150 471.61579 31.321598 0.0034851739 1 1 - 200 362.87766 42.061118 0.0034851739 1 1 - 250 367.58058 65.303109 0.0034851739 1 1 - 300 372.38236 -52.421725 0.0034851739 1 1 - 350 297.69957 17.869945 0.0034851739 1 1 - 400 258.30433 49.19156 0.0034851739 1 1 - 450 253.34384 -5.8162637 0.0034851739 1 1 - 500 269.96465 -43.337517 0.0034851739 1 1 - 550 303.23718 10.180246 0.0034851739 1 1 - 600 329.59579 -48.97461 0.0034851739 1 1 - 650 350.42568 50.983183 0.0034851739 1 1 - 700 342.03272 35.43465 0.0034851739 1 1 - 750 269.23405 -41.873166 0.0034851739 1 1 - 800 245.15025 13.953092 0.0034851739 1 1 - 850 257.85421 -3.1492141 0.0034851739 1 1 - 900 316.15644 7.7798301 0.0034851739 1 1 - 950 299.9124 -15.77014 0.0034851739 1 1 - 1000 302.89968 -17.049693 0.0034851739 1 1 - 1050 308.91651 71.84632 0.0034851739 1 1 - 1100 348.43932 -18.742012 0.0034851739 1 1 - 1150 309.03036 50.536311 0.0034851739 1 1 - 1200 318.9761 -16.905746 0.0034851739 1 1 - 1250 320.42806 -0.057975092 0.0034851739 1 1 - 1300 289.7824 18.200772 0.0034851739 1 1 - 1350 284.79836 -9.1978427 0.0034851739 1 1 - 1400 325.43292 42.082833 0.0034851739 1 1 - 1450 261.5041 -37.823325 0.0034851739 1 1 - 1500 298.88723 -5.1647385 0.0034851739 1 1 - 1550 291.37403 -7.7764201 0.0034851739 1 1 - 1600 293.83475 22.2458 0.0034851739 1 1 - 1650 293.80611 24.202512 0.0034851739 1 1 - 1700 291.70205 -23.397884 0.0034851739 1 1 - 1750 292.32437 -10.671214 0.0034851739 1 1 - 1800 302.01367 -11.671025 0.0034851739 1 1 - 1850 322.1651 24.438331 0.0034851739 1 1 - 1900 310.45076 45.343592 0.0034851739 1 1 - 1950 325.91745 -19.847809 0.0034851739 1 1 - 2000 276.89662 63.387098 0.0034851739 1 1 - 2050 311.33783 -24.683247 0.0034851739 1 1 - 2100 346.2336 -27.526891 0.0034851739 1 1 - 2150 345.30604 -15.722411 0.0034851739 1 1 - 2200 346.7718 -17.857633 0.0034851739 1 1 - 2250 304.28676 -1.9965581 0.0034851739 1 1 - 2300 322.56372 -31.786868 0.0034851739 1 1 - 2350 282.64326 6.1982735 0.0034851739 1 1 - 2400 286.65759 -63.207781 0.0034851739 1 1 - 2450 257.05528 32.931491 0.0034851739 1 1 - 2500 283.64386 26.912373 0.0034851739 1 1 - 2550 299.54005 27.277039 0.0034851739 1 1 - 2600 283.92503 14.660972 0.0034851739 1 1 - 2650 321.93453 -18.977358 0.0034851739 1 1 - 2700 376.7189 31.826935 0.0034851739 1 1 - 2750 372.20075 -32.821697 0.0034851739 1 1 - 2800 361.40604 83.035183 0.0034851739 1 1 - 2850 332.27269 -23.927452 0.0034851739 1 1 - 2900 331.14638 -0.12328446 0.0034851739 1 1 - 2950 303.67489 -24.078857 0.0034851739 1 1 - 3000 311.40462 21.563537 0.0034851739 1 1 - 3050 284.72849 -23.849667 0.0034851739 1 1 - 3100 303.48477 39.347763 0.0034851739 1 1 - 3150 264.2739 -0.22299878 0.0034851739 1 1 - 3200 300.03351 31.545323 0.0034851739 1 1 - 3250 288.56663 5.7225229 0.0034851739 1 1 - 3300 200.13238 -31.239655 0.0034851739 1 1 - 3350 231.32512 16.631728 0.0034851739 1 1 - 3400 260.57402 2.1717992 0.0034851739 1 1 - 3450 301.47128 -42.210623 0.0034851739 1 1 - 3500 321.77414 40.074365 0.0034851739 1 1 - 3550 353.21858 28.387783 0.0034851739 1 1 - 3600 331.45989 -57.800858 0.0034851739 1 1 - 3650 303.88123 44.86596 0.0034851739 1 1 - 3700 329.73833 -0.8061567 0.0034851739 1 1 - 3750 297.55588 -0.49626022 0.0034851739 1 1 - 3800 286.38794 -10.010003 0.0034851739 1 1 - 3850 290.17417 -43.51187 0.0034851739 1 1 - 3900 247.88933 51.23735 0.0034851739 1 1 - 3950 332.31324 -18.194985 0.0034851739 1 1 - 4000 325.56802 18.402825 0.0034851739 1 1 - 4050 338.37594 36.430977 0.0034851739 1 1 - 4100 370.95478 39.290285 0.0034851739 1 1 - 4150 348.47859 -7.0779683 0.0034851739 1 1 - 4200 241.30632 -33.371789 0.0034851739 1 1 - 4250 242.17258 -9.9861962 0.0034851739 1 1 - 4300 300.85311 -7.924429 0.0034851739 1 1 - 4350 273.15684 -21.257282 0.0034851739 1 1 - 4400 305.77464 -5.8720712 0.0034851739 1 1 - 4450 314.97697 45.037299 0.0034851739 1 1 - 4500 310.77723 16.958771 0.0034851739 1 1 - 4550 302.17421 12.156862 0.0034851739 1 1 - 4600 319.74799 6.8488914 0.0034851739 1 1 - 4650 270.86805 -13.767907 0.0034851739 1 1 - 4700 249.81731 -31.197484 0.0034851739 1 1 - 4750 285.86481 -9.8916332 0.0034851739 1 1 - 4800 233.98321 7.1338518 0.0034851739 1 1 - 4850 302.60551 49.262886 0.0034851739 1 1 - 4900 316.55055 34.663238 0.0034851739 1 1 - 4950 357.32741 11.583013 0.0034851739 1 1 - 5000 400.21044 -8.1780861 0.0034851739 1 1 - 5050 390.01845 -20.490268 0.0034851739 1 1 - 5100 378.84249 -41.328772 0.0034851739 1 1 - 5150 324.02039 -15.023852 0.0034851739 1 1 - 5200 262.08427 10.937367 0.0034851739 1 1 - 5250 255.75506 16.381495 0.0034851739 1 1 - 5300 277.84991 40.682283 0.0034851739 1 1 - 5350 302.92834 9.1989644 0.0034851739 1 1 - 5400 283.71964 -1.6583895 0.0034851739 1 1 - 5450 300.71261 -4.703054 0.0034851739 1 1 - 5500 343.54987 -0.30546396 0.0034851739 1 1 - 5550 369.51272 21.691639 0.0034851739 1 1 - 5600 372.69786 -38.679919 0.0034851739 1 1 - 5650 327.41256 11.352201 0.0034851739 1 1 - 5700 278.9861 -23.82728 0.0034851739 1 1 - 5750 308.30037 -20.756238 0.0034851739 1 1 - 5800 341.4559 28.058314 0.0034851739 1 1 - 5850 322.9786 -10.731862 0.0034851739 1 1 - 5900 304.53598 32.825105 0.0034851739 1 1 - 5950 287.17515 -36.780057 0.0034851739 1 1 - 6000 296.52688 18.782156 0.0034851739 1 1 - 6050 314.25411 15.99272 0.0034851739 1 1 - 6100 313.86572 3.4344108 0.0034851739 1 1 - 6150 325.64197 32.39212 0.0034851739 1 1 - 6200 367.4298 -27.161154 0.0034851739 1 1 - 6250 369.30937 39.020881 0.0034851739 1 1 - 6300 328.92245 -23.175612 0.0034851739 1 1 - 6350 305.6293 4.9011587 0.0034851739 1 1 - 6400 241.70456 -13.675247 0.0034851739 1 1 - 6450 265.66574 2.4049735 0.0034851739 1 1 - 6500 249.3592 13.420453 0.0034851739 1 1 - 6550 294.5367 10.856753 0.0034851739 1 1 - 6600 308.20246 18.992923 0.0034851739 1 1 - 6650 305.43756 -49.57151 0.0034851739 1 1 - 6700 320.27395 11.339101 0.0034851739 1 1 - 6750 321.7875 -23.463361 0.0034851739 1 1 - 6800 303.40316 7.6256997 0.0034851739 1 1 - 6850 297.18652 51.52186 0.0034851739 1 1 - 6900 284.19084 -8.496294 0.0034851739 1 1 - 6950 331.04173 13.227745 0.0034851739 1 1 - 7000 311.38027 -43.26105 0.0034851739 1 1 - 7050 286.82046 -14.171194 0.0034851739 1 1 - 7100 302.81691 12.058085 0.0034851739 1 1 - 7150 297.18018 -43.110658 0.0034851739 1 1 - 7200 332.46131 26.051496 0.0034851739 1 1 - 7250 262.72288 41.161451 0.0034851739 1 1 - 7300 250.62739 -23.440907 0.0034851739 1 1 - 7350 296.92141 35.869216 0.0034851739 1 1 - 7400 245.06807 -13.467896 0.0034851739 1 1 - 7450 272.2659 -23.292836 0.0034851739 1 1 - 7500 209.05776 13.888665 0.0034851739 1 1 - 7550 255.03716 4.9662624 0.0034851739 1 1 - 7600 312.26011 -37.350427 0.0034851739 1 1 - 7650 305.5823 55.208039 0.0034851739 1 1 - 7700 325.13382 -18.370791 0.0034851739 1 1 - 7750 363.24898 -22.473126 0.0034851739 1 1 - 7800 350.19254 26.792307 0.0034851739 1 1 - 7850 271.76418 -17.843445 0.0034851739 1 1 - 7900 272.70301 -11.709349 0.0034851739 1 1 - 7950 298.5993 -12.736235 0.0034851739 1 1 - 8000 274.52611 49.657345 0.0034851739 1 1 - 8050 304.73711 -0.52485689 0.0034851739 1 1 - 8100 328.29239 -39.901891 0.0034851739 1 1 - 8150 406.52096 2.8669076 0.0034851739 1 1 - 8200 332.17309 -51.168754 0.0034851739 1 1 - 8250 354.68419 53.003157 0.0034851739 1 1 - 8300 337.28934 20.766408 0.0034851739 1 1 - 8350 361.81133 -54.159227 0.0034851739 1 1 - 8400 305.59597 24.011667 0.0034851739 1 1 - 8450 303.25823 4.423341 0.0034851739 1 1 - 8500 253.50747 -11.026949 0.0034851739 1 1 - 8550 277.13504 23.204625 0.0034851739 1 1 - 8600 291.40211 -22.253861 0.0034851739 1 1 - 8650 307.93765 32.14162 0.0034851739 1 1 - 8700 309.1529 0.36279434 0.0034851739 1 1 - 8750 355.10326 11.677219 0.0034851739 1 1 - 8800 330.21328 19.235269 0.0034851739 1 1 - 8850 241.29109 21.707386 0.0034851739 1 1 - 8900 319.15363 -60.010115 0.0034851739 1 1 - 8950 308.88552 -57.637014 0.0034851739 1 1 - 9000 272.22373 51.15837 0.0034851739 1 1 - 9050 248.84947 7.3390565 0.0034851739 1 1 - 9100 221.91564 48.387079 0.0034851739 1 1 - 9150 298.03506 2.9058639 0.0034851739 1 1 - 9200 274.25114 -24.597819 0.0034851739 1 1 - 9250 334.08373 5.1079577 0.0034851739 1 1 - 9300 383.07285 -23.274763 0.0034851739 1 1 - 9350 335.00581 20.94212 0.0034851739 1 1 - 9400 309.23862 34.074744 0.0034851739 1 1 - 9450 312.62262 -28.468057 0.0034851739 1 1 - 9500 324.54274 2.851136 0.0034851739 1 1 - 9550 313.32781 22.468182 0.0034851739 1 1 - 9600 269.04372 4.064934 0.0034851739 1 1 - 9650 270.98476 -21.520127 0.0034851739 1 1 - 9700 236.8736 16.250728 0.0034851739 1 1 - 9750 333.94686 1.6864148 0.0034851739 1 1 - 9800 330.91875 12.150018 0.0034851739 1 1 - 9850 343.8603 25.338853 0.0034851739 1 1 - 9900 330.93364 -28.292992 0.0034851739 1 1 - 9950 291.25518 25.795948 0.0034851739 1 1 - 10000 319.25565 25.323846 0.0034851739 1 1 -Loop time of 3.55353 on 4 procs for 10000 steps with 44 atoms - -Performance: 243.139 ns/day, 0.099 hours/ns, 2814.105 timesteps/s -93.4% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.0030422 | 0.10454 | 0.35211 | 44.8 | 2.94 -Bond | 0.0063896 | 0.29222 | 0.94356 | 71.3 | 8.22 -Kspace | 0.88508 | 1.6486 | 1.979 | 35.1 | 46.39 -Neigh | 0.61154 | 0.62212 | 0.63307 | 1.0 | 17.51 -Comm | 0.18944 | 0.24549 | 0.29196 | 7.9 | 6.91 -Output | 0.0050066 | 0.011804 | 0.032134 | 10.8 | 0.33 -Modify | 0.52282 | 0.60522 | 0.69588 | 7.9 | 17.03 -Other | | 0.02359 | | | 0.66 - -Nlocal: 11 ave 44 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 -Nghost: 33 ave 44 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 3 -Neighs: 205.75 ave 823 max 0 min -Histogram: 3 0 0 0 0 0 0 0 0 1 - -Total # of neighbors = 823 -Ave neighs/atom = 18.7045 -Ave special neighs/atom = 9.77273 -Neighbor list builds = 10000 -Dangerous builds = 0 - -# write_restart restart_longrun -# write_data restart_longrun.data - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:03 diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.1 b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.1 new file mode 100644 index 0000000000..de1167c652 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.1 @@ -0,0 +1,148 @@ +LAMMPS (5 Jun 2019) +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 44 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + special bonds CPU = 0.000181113 secs + read_data CPU = 0.0251833 secs +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 14 + 25 angles with max type 28 + 23 dihedrals with max type 36 + 14 impropers with max type 11 +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 13 + 31 angles with max type 27 + 39 dihedrals with max type 33 + 20 impropers with max type 1 +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 13 + 25 angles with max type 27 + 30 dihedrals with max type 33 + 16 impropers with max type 1 +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 15 + 19 angles with max type 29 + 16 dihedrals with max type 32 + 10 impropers with max type 13 +WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (../fix_bond_react.cpp:1785) +WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (../fix_bond_react.cpp:1785) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:319) + G vector (1/distance) = 0.0534597 + grid = 2 2 2 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0402256 + estimated relative force accuracy = 0.000121138 + using double precision FFTs + 3d grid and FFT values/proc = 343 8 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Setting up Verlet run ... + Unit style : real + Current step : 0 + Time step : 1 +WARNING: Inconsistent image flags (../domain.cpp:784) +Per MPI rank memory allocation (min/avg/max) = 34.41 | 34.41 | 34.41 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 300 346.78165 0.0034851739 0 0 + 50 293.70542 -52.547388 0.0034851739 1 0 + 100 276.36755 54.81826 0.0034851739 1 1 + 150 448.65869 16.874435 0.0034851739 1 1 + 200 379.84257 11.578545 0.0034851739 1 1 + 250 298.21983 90.656585 0.0034851739 1 1 + 300 333.3111 -30.139607 0.0034851739 1 1 + 350 266.57108 6.4505134 0.0034851739 1 1 + 400 264.05476 10.513204 0.0034851739 1 1 + 450 250.70418 -18.635379 0.0034851739 1 1 + 500 261.21632 10.231013 0.0034851739 1 1 + 550 309.89024 -8.8299506 0.0034851739 1 1 + 600 373.45851 30.368993 0.0034851739 1 1 + 650 338.26242 9.0362267 0.0034851739 1 1 + 700 295.67794 -5.6007538 0.0034851739 1 1 + 750 310.86563 -59.228181 0.0034851739 1 1 + 800 286.22678 -9.9022407 0.0034851739 1 1 + 850 218.42135 27.845352 0.0034851739 1 1 + 900 259.62551 24.216336 0.0034851739 1 1 + 950 250.21307 -14.560985 0.0034851739 1 1 + 1000 274.29245 -0.38768626 0.0034851739 1 1 +Loop time of 0.341061 on 1 procs for 1000 steps with 44 atoms + +Performance: 253.327 ns/day, 0.095 hours/ns, 2932.025 timesteps/s +87.9% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.031135 | 0.031135 | 0.031135 | 0.0 | 9.13 +Bond | 0.12623 | 0.12623 | 0.12623 | 0.0 | 37.01 +Kspace | 0.036491 | 0.036491 | 0.036491 | 0.0 | 10.70 +Neigh | 0.046395 | 0.046395 | 0.046395 | 0.0 | 13.60 +Comm | 0.0025396 | 0.0025396 | 0.0025396 | 0.0 | 0.74 +Output | 0.07775 | 0.07775 | 0.07775 | 0.0 | 22.80 +Modify | 0.019219 | 0.019219 | 0.019219 | 0.0 | 5.64 +Other | | 0.001306 | | | 0.38 + +Nlocal: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 2 ave 2 max 2 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 740 ave 740 max 740 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 740 +Ave neighs/atom = 16.8182 +Ave special neighs/atom = 9.77273 +Neighbor list builds = 1000 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.4 b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.4 new file mode 100644 index 0000000000..b9c7a3ba15 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.stabilized.g++.4 @@ -0,0 +1,148 @@ +LAMMPS (5 Jun 2019) +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 44 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + special bonds CPU = 0.000178751 secs + read_data CPU = 0.0385782 secs +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 14 + 25 angles with max type 28 + 23 dihedrals with max type 36 + 14 impropers with max type 11 +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 13 + 31 angles with max type 27 + 39 dihedrals with max type 33 + 20 impropers with max type 1 +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 13 + 25 angles with max type 27 + 30 dihedrals with max type 33 + 16 impropers with max type 1 +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 15 + 19 angles with max type 29 + 16 dihedrals with max type 32 + 10 impropers with max type 13 +WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (../fix_bond_react.cpp:1785) +WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (../fix_bond_react.cpp:1785) +dynamic group bond_react_MASTER_group defined +dynamic group statted_grp_REACT defined +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:319) + G vector (1/distance) = 0.0534597 + grid = 2 2 2 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0402256 + estimated relative force accuracy = 0.000121138 + using double precision FFTs + 3d grid and FFT values/proc = 252 2 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Setting up Verlet run ... + Unit style : real + Current step : 0 + Time step : 1 +WARNING: Inconsistent image flags (../domain.cpp:784) +Per MPI rank memory allocation (min/avg/max) = 34.42 | 34.77 | 35.45 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 300 346.78165 0.0034851739 0 0 + 50 293.70542 -52.547388 0.0034851739 1 0 + 100 276.36755 54.81826 0.0034851739 1 1 + 150 448.65869 16.874435 0.0034851739 1 1 + 200 379.84257 11.578545 0.0034851739 1 1 + 250 298.21983 90.656585 0.0034851739 1 1 + 300 333.3111 -30.139607 0.0034851739 1 1 + 350 266.57108 6.4505134 0.0034851739 1 1 + 400 264.05476 10.513204 0.0034851739 1 1 + 450 250.70418 -18.635379 0.0034851739 1 1 + 500 261.21632 10.231013 0.0034851739 1 1 + 550 309.89024 -8.8299506 0.0034851739 1 1 + 600 373.45851 30.368993 0.0034851739 1 1 + 650 338.26242 9.0362267 0.0034851739 1 1 + 700 295.67794 -5.6007538 0.0034851739 1 1 + 750 310.86563 -59.228181 0.0034851739 1 1 + 800 286.22678 -9.9022407 0.0034851739 1 1 + 850 218.42135 27.845352 0.0034851739 1 1 + 900 259.62551 24.216336 0.0034851739 1 1 + 950 250.21307 -14.560985 0.0034851739 1 1 + 1000 274.29245 -0.38768626 0.0034851739 1 1 +Loop time of 0.271242 on 4 procs for 1000 steps with 44 atoms + +Performance: 318.535 ns/day, 0.075 hours/ns, 3686.747 timesteps/s +98.6% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.00023773 | 0.0077322 | 0.016042 | 8.4 | 2.85 +Bond | 0.00073385 | 0.032108 | 0.08446 | 19.4 | 11.84 +Kspace | 0.041659 | 0.098095 | 0.13373 | 12.3 | 36.16 +Neigh | 0.028894 | 0.029247 | 0.029558 | 0.1 | 10.78 +Comm | 0.012367 | 0.013642 | 0.01503 | 0.9 | 5.03 +Output | 0.032475 | 0.040504 | 0.061019 | 5.9 | 14.93 +Modify | 0.032934 | 0.049086 | 0.0577 | 4.3 | 18.10 +Other | | 0.0008281 | | | 0.31 + +Nlocal: 11 ave 21 max 0 min +Histogram: 1 1 0 0 0 0 0 0 0 2 +Nghost: 32.5 ave 43 max 23 min +Histogram: 2 0 0 0 0 0 0 0 0 2 +Neighs: 185 ave 376 max 0 min +Histogram: 2 0 0 0 0 0 0 0 0 2 + +Total # of neighbors = 740 +Ave neighs/atom = 16.8182 +Ave special neighs/atom = 9.77273 +Neighbor list builds = 1000 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.1 b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.1 new file mode 100644 index 0000000000..14cac1dfad --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.1 @@ -0,0 +1,147 @@ +LAMMPS (5 Jun 2019) +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 1 by 1 MPI processor grid + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 44 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + special bonds CPU = 0.000217102 secs + read_data CPU = 0.00630778 secs +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 14 + 25 angles with max type 28 + 23 dihedrals with max type 36 + 14 impropers with max type 11 +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 13 + 31 angles with max type 27 + 39 dihedrals with max type 33 + 20 impropers with max type 1 +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 13 + 25 angles with max type 27 + 30 dihedrals with max type 33 + 16 impropers with max type 1 +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 15 + 19 angles with max type 29 + 16 dihedrals with max type 32 + 10 impropers with max type 13 +WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (../fix_bond_react.cpp:1785) +WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (../fix_bond_react.cpp:1785) +dynamic group bond_react_MASTER_group defined +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:319) + G vector (1/distance) = 0.0534597 + grid = 2 2 2 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0402256 + estimated relative force accuracy = 0.000121138 + using double precision FFTs + 3d grid and FFT values/proc = 343 8 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Setting up Verlet run ... + Unit style : real + Current step : 0 + Time step : 1 +WARNING: Inconsistent image flags (../domain.cpp:784) +Per MPI rank memory allocation (min/avg/max) = 34.35 | 34.35 | 34.35 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 300 346.78165 0.0034851739 0 0 + 50 416.49412 -20.293038 0.0034851739 1 0 + 100 746.49323 91.912227 0.0034851739 1 1 + 150 515.15907 -1.4024709 0.0034851739 1 1 + 200 441.14572 -19.333087 0.0034851739 1 1 + 250 376.40996 30.717679 0.0034851739 1 1 + 300 326.15127 -3.0433799 0.0034851739 1 1 + 350 326.21116 6.235391 0.0034851739 1 1 + 400 366.48556 3.9807338 0.0034851739 1 1 + 450 313.79097 7.6674629 0.0034851739 1 1 + 500 278.89836 14.102052 0.0034851739 1 1 + 550 267.50214 18.241417 0.0034851739 1 1 + 600 276.28064 7.4649611 0.0034851739 1 1 + 650 255.26713 -8.5258573 0.0034851739 1 1 + 700 258.59752 -5.3341215 0.0034851739 1 1 + 750 263.71264 33.369869 0.0034851739 1 1 + 800 246.22976 -15.349137 0.0034851739 1 1 + 850 255.93887 16.331669 0.0034851739 1 1 + 900 239.72525 -0.20075789 0.0034851739 1 1 + 950 213.73064 12.17619 0.0034851739 1 1 + 1000 218.25094 -9.0955642 0.0034851739 1 1 +Loop time of 0.348252 on 1 procs for 1000 steps with 44 atoms + +Performance: 248.096 ns/day, 0.097 hours/ns, 2871.483 timesteps/s +91.8% CPU use with 1 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.031941 | 0.031941 | 0.031941 | 0.0 | 9.17 +Bond | 0.13031 | 0.13031 | 0.13031 | 0.0 | 37.42 +Kspace | 0.037554 | 0.037554 | 0.037554 | 0.0 | 10.78 +Neigh | 0.047397 | 0.047397 | 0.047397 | 0.0 | 13.61 +Comm | 0.0025814 | 0.0025814 | 0.0025814 | 0.0 | 0.74 +Output | 0.083526 | 0.083526 | 0.083526 | 0.0 | 23.98 +Modify | 0.013602 | 0.013602 | 0.013602 | 0.0 | 3.91 +Other | | 0.001336 | | | 0.38 + +Nlocal: 44 ave 44 max 44 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 3 ave 3 max 3 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 818 ave 818 max 818 min +Histogram: 1 0 0 0 0 0 0 0 0 0 + +Total # of neighbors = 818 +Ave neighs/atom = 18.5909 +Ave special neighs/atom = 9.77273 +Neighbor list builds = 1000 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:00 diff --git a/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.4 b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.4 new file mode 100644 index 0000000000..6b13dd60d3 --- /dev/null +++ b/examples/USER/misc/bond_react/tiny_nylon/log.5Jun19.tiny_nylon.unstabilized.g++.4 @@ -0,0 +1,147 @@ +LAMMPS (5 Jun 2019) +Reading data file ... + orthogonal box = (-25 -25 -25) to (25 25 25) + 1 by 2 by 2 MPI processor grid + reading atoms ... + 44 atoms + reading velocities ... + 44 velocities + scanning bonds ... + 9 = max bonds/atom + scanning angles ... + 21 = max angles/atom + scanning dihedrals ... + 29 = max dihedrals/atom + scanning impropers ... + 29 = max impropers/atom + reading bonds ... + 42 bonds + reading angles ... + 74 angles + reading dihedrals ... + 100 dihedrals + reading impropers ... + 44 impropers +Finding 1-2 1-3 1-4 neighbors ... + special bond factors lj: 0 0 0 + special bond factors coul: 0 0 0 + 4 = max # of 1-2 neighbors + 6 = max # of 1-3 neighbors + 12 = max # of 1-4 neighbors + 41 = max # of special neighbors + special bonds CPU = 0.000163256 secs + read_data CPU = 0.0244579 secs +Read molecule mol1: + 18 atoms with max type 8 + 16 bonds with max type 14 + 25 angles with max type 28 + 23 dihedrals with max type 36 + 14 impropers with max type 11 +Read molecule mol2: + 18 atoms with max type 9 + 17 bonds with max type 13 + 31 angles with max type 27 + 39 dihedrals with max type 33 + 20 impropers with max type 1 +Read molecule mol3: + 15 atoms with max type 9 + 14 bonds with max type 13 + 25 angles with max type 27 + 30 dihedrals with max type 33 + 16 impropers with max type 1 +Read molecule mol4: + 15 atoms with max type 11 + 13 bonds with max type 15 + 19 angles with max type 29 + 16 dihedrals with max type 32 + 10 impropers with max type 13 +WARNING: Bond/react: Atom affected by reaction rxn1 too close to template edge (../fix_bond_react.cpp:1785) +WARNING: Bond/react: Atom affected by reaction rxn2 too close to template edge (../fix_bond_react.cpp:1785) +dynamic group bond_react_MASTER_group defined +PPPM initialization ... + using 12-bit tables for long-range coulomb (../kspace.cpp:319) + G vector (1/distance) = 0.0534597 + grid = 2 2 2 + stencil order = 5 + estimated absolute RMS force accuracy = 0.0402256 + estimated relative force accuracy = 0.000121138 + using double precision FFTs + 3d grid and FFT values/proc = 252 2 +Neighbor list info ... + update every 1 steps, delay 10 steps, check yes + max neighbors/atom: 2000, page size: 100000 + master list distance cutoff = 10.5 + ghost atom cutoff = 10.5 + binsize = 5.25, bins = 10 10 10 + 2 neighbor lists, perpetual/occasional/extra = 1 1 0 + (1) pair lj/class2/coul/long, perpetual + attributes: half, newton on + pair build: half/bin/newton + stencil: half/bin/3d/newton + bin: standard + (2) fix bond/react, occasional, copy from (1) + attributes: half, newton on + pair build: copy + stencil: none + bin: none +Setting up Verlet run ... + Unit style : real + Current step : 0 + Time step : 1 +WARNING: Inconsistent image flags (../domain.cpp:784) +Per MPI rank memory allocation (min/avg/max) = 33.34 | 33.69 | 34.37 Mbytes +Step Temp Press Density f_myrxns[1] f_myrxns[2] + 0 300 346.78165 0.0034851739 0 0 + 50 416.49412 -20.293038 0.0034851739 1 0 + 100 746.49323 91.912227 0.0034851739 1 1 + 150 515.15907 -1.4024709 0.0034851739 1 1 + 200 441.14572 -19.333087 0.0034851739 1 1 + 250 376.40996 30.717679 0.0034851739 1 1 + 300 326.15127 -3.0433799 0.0034851739 1 1 + 350 326.21116 6.235391 0.0034851739 1 1 + 400 366.48556 3.9807338 0.0034851739 1 1 + 450 313.79097 7.6674629 0.0034851739 1 1 + 500 278.89836 14.102052 0.0034851739 1 1 + 550 267.50214 18.241417 0.0034851739 1 1 + 600 276.28064 7.4649611 0.0034851739 1 1 + 650 255.26713 -8.5258573 0.0034851739 1 1 + 700 258.59752 -5.3341215 0.0034851739 1 1 + 750 263.71264 33.369869 0.0034851739 1 1 + 800 246.22976 -15.349137 0.0034851739 1 1 + 850 255.93887 16.331669 0.0034851739 1 1 + 900 239.72525 -0.20075789 0.0034851739 1 1 + 950 213.73064 12.17619 0.0034851739 1 1 + 1000 218.25094 -9.0955642 0.0034851739 1 1 +Loop time of 0.254903 on 4 procs for 1000 steps with 44 atoms + +Performance: 338.952 ns/day, 0.071 hours/ns, 3923.053 timesteps/s +99.8% CPU use with 4 MPI tasks x no OpenMP threads + +MPI task timing breakdown: +Section | min time | avg time | max time |%varavg| %total +--------------------------------------------------------------- +Pair | 0.00014252 | 0.0090715 | 0.021332 | 9.6 | 3.56 +Bond | 0.00047028 | 0.037261 | 0.10789 | 22.7 | 14.62 +Kspace | 0.051006 | 0.12756 | 0.1693 | 13.6 | 50.04 +Neigh | 0.035644 | 0.036088 | 0.036523 | 0.2 | 14.16 +Comm | 0.013984 | 0.016074 | 0.018676 | 1.6 | 6.31 +Output | 0.0002816 | 0.00033726 | 0.00044251 | 0.0 | 0.13 +Modify | 0.023697 | 0.027803 | 0.033552 | 2.5 | 10.91 +Other | | 0.0007123 | | | 0.28 + +Nlocal: 11 ave 29 max 0 min +Histogram: 1 1 0 0 1 0 0 0 0 1 +Nghost: 25 ave 31 max 12 min +Histogram: 1 0 0 0 0 0 0 0 2 1 +Neighs: 204.5 ave 443 max 0 min +Histogram: 2 0 0 0 0 0 0 0 1 1 + +Total # of neighbors = 818 +Ave neighs/atom = 18.5909 +Ave special neighs/atom = 9.77273 +Neighbor list builds = 1000 +Dangerous builds = 0 + +Please see the log.cite file for references relevant to this simulation + +Total wall time: 0:00:00 -- GitLab From 39f5b8c734af3e2408656f473638dcf39400babc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 1 Jul 2019 04:16:00 -0400 Subject: [PATCH 102/236] transform POEMS library to conform to IWYU conventions --- lib/poems/body.cpp | 14 ++++++++++++-- lib/poems/body.h | 20 +++++++++----------- lib/poems/body23joint.cpp | 16 ++++++++-------- lib/poems/body23joint.h | 6 ++---- lib/poems/colmatmap.h | 3 +++ lib/poems/colmatrix.cpp | 3 +-- lib/poems/colmatrix.h | 3 ++- lib/poems/eulerparameters.cpp | 4 ++++ lib/poems/eulerparameters.h | 6 +++--- lib/poems/fastmatrixops.cpp | 13 +++++++++++-- lib/poems/fastmatrixops.h | 11 ++++++++++- lib/poems/fixedpoint.cpp | 3 +++ lib/poems/fixedpoint.h | 2 ++ lib/poems/freebodyjoint.cpp | 12 ++++++++---- lib/poems/freebodyjoint.h | 3 +++ lib/poems/inertialframe.cpp | 4 +++- lib/poems/inertialframe.h | 3 +++ lib/poems/joint.cpp | 19 +++++++++++++++---- lib/poems/joint.h | 9 +++++++-- lib/poems/mat3x3.cpp | 3 ++- lib/poems/mat3x3.h | 3 +-- lib/poems/mat4x4.cpp | 2 ++ lib/poems/mat4x4.h | 4 +++- lib/poems/mat6x6.cpp | 2 ++ lib/poems/mat6x6.h | 3 ++- lib/poems/matrix.h | 2 ++ lib/poems/matrixfun.cpp | 10 ++++++++-- lib/poems/matrixfun.h | 18 +++++++++++++----- lib/poems/mixedjoint.cpp | 11 ++++++++--- lib/poems/mixedjoint.h | 4 ++++ lib/poems/norm.cpp | 6 ++++++ lib/poems/norm.h | 7 +++++-- lib/poems/onbody.cpp | 7 +++++-- lib/poems/onbody.h | 12 +++++++----- lib/poems/onfunctions.cpp | 9 +++++++-- lib/poems/onfunctions.h | 5 ++++- lib/poems/onsolver.cpp | 14 +++++++++++--- lib/poems/onsolver.h | 4 +++- lib/poems/particle.cpp | 1 - lib/poems/particle.h | 2 ++ lib/poems/poemstreenode.h | 6 ------ lib/poems/point.cpp | 4 +++- lib/poems/prismaticjoint.cpp | 4 ++++ lib/poems/prismaticjoint.h | 4 +++- lib/poems/revolutejoint.cpp | 4 ++++ lib/poems/revolutejoint.h | 5 +++-- lib/poems/rigidbody.cpp | 3 ++- lib/poems/rigidbody.h | 2 ++ lib/poems/rowmatrix.cpp | 2 +- lib/poems/rowmatrix.h | 3 +++ lib/poems/solver.cpp | 3 ++- lib/poems/solver.h | 4 ++-- lib/poems/sphericaljoint.cpp | 10 +++++++--- lib/poems/sphericaljoint.h | 6 ++---- lib/poems/system.cpp | 19 ++++++++++++++++++- lib/poems/system.h | 25 +------------------------ lib/poems/vect3.cpp | 9 +++++++++ lib/poems/vect3.h | 4 ++++ lib/poems/vect4.cpp | 2 ++ lib/poems/vect4.h | 4 +++- lib/poems/vect6.cpp | 2 ++ lib/poems/vect6.h | 3 +++ lib/poems/workspace.cpp | 19 +++++++++++++++---- lib/poems/workspace.h | 9 --------- 64 files changed, 301 insertions(+), 138 deletions(-) diff --git a/lib/poems/body.cpp b/lib/poems/body.cpp index 4ef05dd1e6..487d5e1ab7 100644 --- a/lib/poems/body.cpp +++ b/lib/poems/body.cpp @@ -14,9 +14,19 @@ * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - -#include "bodies.h" + +#include + +#include "body.h" +#include "inertialframe.h" +#include "mat3x3.h" +#include "particle.h" +#include "poemslist.h" #include "point.h" +#include "rigidbody.h" +#include "vect3.h" + +class Joint; using namespace std; diff --git a/lib/poems/body.h b/lib/poems/body.h index f8e0f6a5a3..06a9c72417 100644 --- a/lib/poems/body.h +++ b/lib/poems/body.h @@ -19,13 +19,11 @@ #ifndef BODY_H #define BODY_H -#include "poemslist.h" #include +#include "poemslist.h" #include "poemsobject.h" - -#include "matrices.h" - - +#include "mat3x3.h" +#include "vect3.h" // emumerated type enum BodyType { @@ -33,16 +31,16 @@ enum BodyType { PARTICLE = 1, RIGIDBODY = 2 }; - + class Point; class Joint; -class CompBody; + class Body : public POEMSObject { public: double mass; Mat3x3 inertia; - + Vect3 r; Vect3 v; Vect3 v_k; @@ -54,13 +52,13 @@ public: Vect3 alpha; Vect3 alpha_t; double KE; - + List joints; List points; Body(); - + bool ReadIn(std::istream& in); void WriteOut(std::ostream& out); bool ReadInPoints(std::istream& in); @@ -68,7 +66,7 @@ public: Point* GetPoint(int p); void AddJoint(Joint* joint); void AddPoint(Point* point); - + virtual bool ReadInBodyData(std::istream& in) = 0; virtual void WriteOutBodyData(std::ostream& out) = 0; virtual ~Body(); diff --git a/lib/poems/body23joint.cpp b/lib/poems/body23joint.cpp index 8cd0a95bca..7aa761fe2a 100644 --- a/lib/poems/body23joint.cpp +++ b/lib/poems/body23joint.cpp @@ -14,18 +14,18 @@ * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - +#include #include "body23joint.h" -#include "point.h" -#include "matrixfun.h" #include "body.h" -#include "fastmatrixops.h" -#include "norm.h" +#include "colmatrix.h" #include "eulerparameters.h" -#include "matrices.h" -#include - +#include "fastmatrixops.h" +#include "mat3x3.h" +#include "matrixfun.h" +#include "point.h" +#include "vect3.h" +#include "virtualmatrix.h" Body23Joint::Body23Joint(){ DimQandU(4,2); diff --git a/lib/poems/body23joint.h b/lib/poems/body23joint.h index 60253ac8a4..c47cdfb9de 100644 --- a/lib/poems/body23joint.h +++ b/lib/poems/body23joint.h @@ -18,11 +18,9 @@ #ifndef BODY23JOINT_H #define BODY23JOINT_H +#include #include "joint.h" -#include "vect3.h" -#include "mat3x3.h" - - +#include "matrix.h" class Body23Joint : public Joint { Matrix const_sP; diff --git a/lib/poems/colmatmap.h b/lib/poems/colmatmap.h index 3a6267a247..6d84870046 100644 --- a/lib/poems/colmatmap.h +++ b/lib/poems/colmatmap.h @@ -19,7 +19,10 @@ #ifndef COLMATMAP_H #define COLMATMAP_H +#include + #include "virtualcolmatrix.h" +#include "virtualmatrix.h" class ColMatrix; diff --git a/lib/poems/colmatrix.cpp b/lib/poems/colmatrix.cpp index dc6f49be2b..e7ae98a368 100644 --- a/lib/poems/colmatrix.cpp +++ b/lib/poems/colmatrix.cpp @@ -16,9 +16,8 @@ *_________________________________________________________________________*/ #include "colmatrix.h" -#include "rowmatrix.h" + #include -#include #include using namespace std; diff --git a/lib/poems/colmatrix.h b/lib/poems/colmatrix.h index 11fd85a928..70f13356e2 100644 --- a/lib/poems/colmatrix.h +++ b/lib/poems/colmatrix.h @@ -19,8 +19,9 @@ #ifndef COLMATRIX_H #define COLMATRIX_H +#include #include "virtualcolmatrix.h" -#include "colmatmap.h" +#include "virtualmatrix.h" class Matrix; class Vect6; diff --git a/lib/poems/eulerparameters.cpp b/lib/poems/eulerparameters.cpp index 032bc7da82..f698c40b3a 100644 --- a/lib/poems/eulerparameters.cpp +++ b/lib/poems/eulerparameters.cpp @@ -16,8 +16,12 @@ *_________________________________________________________________________*/ #include "eulerparameters.h" + #include +#include "colmatrix.h" +#include "mat3x3.h" + using namespace std; void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot){ diff --git a/lib/poems/eulerparameters.h b/lib/poems/eulerparameters.h index 029ade4b78..2e69a85fb9 100644 --- a/lib/poems/eulerparameters.h +++ b/lib/poems/eulerparameters.h @@ -14,12 +14,12 @@ * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #ifndef EULERPARAMETERS_H #define EULERPARAMETERS_H -#include "colmatrix.h" -#include "mat3x3.h" +class ColMatrix; +class Mat3x3; void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); diff --git a/lib/poems/fastmatrixops.cpp b/lib/poems/fastmatrixops.cpp index 782381a706..e6c81f0659 100644 --- a/lib/poems/fastmatrixops.cpp +++ b/lib/poems/fastmatrixops.cpp @@ -15,10 +15,19 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ -#include -#include "fastmatrixops.h" #include +#include "fastmatrixops.h" +#include "colmatmap.h" +#include "colmatrix.h" +#include "mat3x3.h" +#include "mat4x4.h" +#include "mat6x6.h" +#include "matrix.h" +#include "vect3.h" +#include "vect4.h" +#include "vect6.h" + using namespace std; // diff --git a/lib/poems/fastmatrixops.h b/lib/poems/fastmatrixops.h index e7ccdbd0ca..b2784a6e53 100644 --- a/lib/poems/fastmatrixops.h +++ b/lib/poems/fastmatrixops.h @@ -17,7 +17,16 @@ #ifndef FASTMATRIXOPS_H #define FASTMATRIXOPS_H -#include "matrices.h" + +class ColMatMap; +class ColMatrix; +class Mat3x3; +class Mat4x4; +class Mat6x6; +class Matrix; +class Vect3; +class Vect4; +class Vect6; void FastCross(Vect3& a, Vect3& b, Vect3& c); void FastSimpleRotation(Vect3& v, double q, Mat3x3& C); diff --git a/lib/poems/fixedpoint.cpp b/lib/poems/fixedpoint.cpp index 8600882393..238ddfed70 100644 --- a/lib/poems/fixedpoint.cpp +++ b/lib/poems/fixedpoint.cpp @@ -17,9 +17,12 @@ #include "fixedpoint.h" + #include #include +#include "virtualmatrix.h" + using namespace std; FixedPoint::FixedPoint(){ diff --git a/lib/poems/fixedpoint.h b/lib/poems/fixedpoint.h index b5ecb23906..fb8f23b0ae 100644 --- a/lib/poems/fixedpoint.h +++ b/lib/poems/fixedpoint.h @@ -19,6 +19,8 @@ #ifndef FIXEDPOINT_H #define FIXEDPOINT_H +#include + #include "point.h" #include "vect3.h" diff --git a/lib/poems/freebodyjoint.cpp b/lib/poems/freebodyjoint.cpp index d00f0bdb98..e6c59340f3 100644 --- a/lib/poems/freebodyjoint.cpp +++ b/lib/poems/freebodyjoint.cpp @@ -16,14 +16,18 @@ *_________________________________________________________________________*/ #include "freebodyjoint.h" -#include "point.h" + +#include + #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" -#include "norm.h" #include "eulerparameters.h" -#include "matrices.h" -#include +#include "colmatrix.h" +#include "mat3x3.h" +#include "mat6x6.h" +#include "vect3.h" +#include "virtualmatrix.h" FreeBodyJoint::FreeBodyJoint(){ diff --git a/lib/poems/freebodyjoint.h b/lib/poems/freebodyjoint.h index 27cacf7dc6..10574847e1 100644 --- a/lib/poems/freebodyjoint.h +++ b/lib/poems/freebodyjoint.h @@ -18,7 +18,10 @@ #ifndef FREEBODYJOINT_H #define FREEBODYJOINT_H +#include + #include "joint.h" +#include "matrix.h" class FreeBodyJoint : public Joint{ diff --git a/lib/poems/inertialframe.cpp b/lib/poems/inertialframe.cpp index 6c97b2f584..98ec820e7f 100644 --- a/lib/poems/inertialframe.cpp +++ b/lib/poems/inertialframe.cpp @@ -16,7 +16,9 @@ *_________________________________________________________________________*/ #include "inertialframe.h" -#include "fixedpoint.h" + +#include "mat3x3.h" +#include "virtualmatrix.h" using namespace std; diff --git a/lib/poems/inertialframe.h b/lib/poems/inertialframe.h index 08d0279a1e..3620641537 100644 --- a/lib/poems/inertialframe.h +++ b/lib/poems/inertialframe.h @@ -19,7 +19,10 @@ #ifndef INERTIALFRAME_H #define INERTIALFRAME_H +#include + #include "body.h" +#include "vect3.h" class InertialFrame : public Body { diff --git a/lib/poems/joint.cpp b/lib/poems/joint.cpp index 3bdd7b5fcd..ff24d5ebf5 100644 --- a/lib/poems/joint.cpp +++ b/lib/poems/joint.cpp @@ -16,13 +16,24 @@ *_________________________________________________________________________*/ -#include "joints.h" +#include +#include +#include + #include "body.h" #include "point.h" -#include -#include "matrixfun.h" #include "fastmatrixops.h" -#include +#include "body23joint.h" +#include "colmatrix.h" +#include "freebodyjoint.h" +#include "joint.h" +#include "mat3x3.h" +#include "matrix.h" +#include "mixedjoint.h" +#include "prismaticjoint.h" +#include "revolutejoint.h" +#include "sphericaljoint.h" +#include "virtualmatrix.h" using namespace std; diff --git a/lib/poems/joint.h b/lib/poems/joint.h index 17122af775..958805c4b5 100644 --- a/lib/poems/joint.h +++ b/lib/poems/joint.h @@ -18,9 +18,14 @@ #ifndef JOINT_H #define JOINT_H -#include "poemsobject.h" #include -#include "matrices.h" +#include "poemsobject.h" +#include "colmatrix.h" +#include "mat3x3.h" +#include "matrix.h" +#include "vect3.h" + +class VirtualMatrix; enum JointType { XYZJOINT = 0, diff --git a/lib/poems/mat3x3.cpp b/lib/poems/mat3x3.cpp index df24d4b108..3d9f1adcca 100644 --- a/lib/poems/mat3x3.cpp +++ b/lib/poems/mat3x3.cpp @@ -16,8 +16,9 @@ *_________________________________________________________________________*/ -#include "mat3x3.h" #include +#include +#include "mat3x3.h" using namespace std; diff --git a/lib/poems/mat3x3.h b/lib/poems/mat3x3.h index 4362b3ad9c..18abeadddc 100644 --- a/lib/poems/mat3x3.h +++ b/lib/poems/mat3x3.h @@ -18,12 +18,11 @@ #ifndef MAT3X3_H #define MAT3X3_H +#include #include "virtualmatrix.h" - class Vect3; class Mat6x6; -class Matrix; class ColMatrix; class Mat3x3 : public VirtualMatrix { diff --git a/lib/poems/mat4x4.cpp b/lib/poems/mat4x4.cpp index 4a611a6796..a6a587bc03 100644 --- a/lib/poems/mat4x4.cpp +++ b/lib/poems/mat4x4.cpp @@ -16,7 +16,9 @@ *_________________________________________________________________________*/ #include "mat4x4.h" + #include +#include using namespace std; diff --git a/lib/poems/mat4x4.h b/lib/poems/mat4x4.h index d7942b248e..c847f6e0d2 100644 --- a/lib/poems/mat4x4.h +++ b/lib/poems/mat4x4.h @@ -18,11 +18,13 @@ #ifndef MAT4X4_H #define MAT4X4_H +#include + #include "virtualmatrix.h" #include "matrix.h" - class Vect4; +class Matrix; class Mat4x4 : public VirtualMatrix { double elements[4][4]; diff --git a/lib/poems/mat6x6.cpp b/lib/poems/mat6x6.cpp index 16bffc5026..fdc917e03d 100644 --- a/lib/poems/mat6x6.cpp +++ b/lib/poems/mat6x6.cpp @@ -16,7 +16,9 @@ *_________________________________________________________________________*/ #include "mat6x6.h" + #include +#include using namespace std; diff --git a/lib/poems/mat6x6.h b/lib/poems/mat6x6.h index 11951b0442..5eaa4f803b 100644 --- a/lib/poems/mat6x6.h +++ b/lib/poems/mat6x6.h @@ -17,8 +17,9 @@ #ifndef MAT6X6_H #define MAT6X6_H -#include "virtualmatrix.h" +#include +#include "virtualmatrix.h" class Matrix; class Mat3x3; diff --git a/lib/poems/matrix.h b/lib/poems/matrix.h index 63699b9835..8bd8110760 100644 --- a/lib/poems/matrix.h +++ b/lib/poems/matrix.h @@ -18,6 +18,8 @@ #ifndef MATRIX_H #define MATRIX_H +#include + #include "virtualmatrix.h" class Mat3x3; diff --git a/lib/poems/matrixfun.cpp b/lib/poems/matrixfun.cpp index d193114679..99fbae4ca1 100644 --- a/lib/poems/matrixfun.cpp +++ b/lib/poems/matrixfun.cpp @@ -16,9 +16,15 @@ *_________________________________________________________________________*/ #include "matrixfun.h" -#include -#include "fastmatrixops.h" + #include +#include + +#include "fastmatrixops.h" +#include "vect4.h" +#include "virtualcolmatrix.h" +#include "virtualmatrix.h" +#include "virtualrowmatrix.h" using namespace std; diff --git a/lib/poems/matrixfun.h b/lib/poems/matrixfun.h index 600b608ad3..e9721eca7b 100644 --- a/lib/poems/matrixfun.h +++ b/lib/poems/matrixfun.h @@ -14,11 +14,22 @@ * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #ifndef MATRIXFUN_H #define MATRIXFUN_H -#include "matrices.h" +#include "colmatrix.h" +#include "mat3x3.h" +#include "mat4x4.h" +#include "mat6x6.h" +#include "matrix.h" +#include "rowmatrix.h" +#include "vect3.h" +#include "vect6.h" + +class VirtualColMatrix; +class VirtualMatrix; +class VirtualRowMatrix; // Create a Matrix VirtualMatrix* NewMatrix(int type); @@ -70,7 +81,4 @@ Matrix HStack(VirtualMatrix& A, VirtualMatrix& B); void Set6DAngularVector(Vect6& v6, Vect3& v3); void Set6DLinearVector(Vect6& v6, Vect3& v3); - - - #endif diff --git a/lib/poems/mixedjoint.cpp b/lib/poems/mixedjoint.cpp index c834ef621e..ef4ccd25df 100644 --- a/lib/poems/mixedjoint.cpp +++ b/lib/poems/mixedjoint.cpp @@ -16,13 +16,18 @@ *_________________________________________________________________________*/ #include "mixedjoint.h" -#include "point.h" + +#include + #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" -#include "norm.h" #include "eulerparameters.h" -#include "matrices.h" +#include "colmatrix.h" +#include "mat3x3.h" +#include "mat6x6.h" +#include "vect3.h" +#include "virtualmatrix.h" diff --git a/lib/poems/mixedjoint.h b/lib/poems/mixedjoint.h index 5f59b95f09..417f689523 100644 --- a/lib/poems/mixedjoint.h +++ b/lib/poems/mixedjoint.h @@ -18,7 +18,11 @@ #ifndef MIXEDJOINT_H #define MIXEDJOINT_H +#include + #include "joint.h" +#include "matrix.h" +#include "vect6.h" class MixedJoint : public Joint{ diff --git a/lib/poems/norm.cpp b/lib/poems/norm.cpp index 0f918cf968..6b8a56fa29 100644 --- a/lib/poems/norm.cpp +++ b/lib/poems/norm.cpp @@ -16,7 +16,13 @@ *_________________________________________________________________________*/ #include + #include "norm.h" +#include "colmatrix.h" +#include "rowmatrix.h" +#include "vect3.h" +#include "vect4.h" +#include "vect6.h" double Magnitude(ColMatrix& A){ double G; diff --git a/lib/poems/norm.h b/lib/poems/norm.h index 963a2ec5b2..b3ff285dea 100644 --- a/lib/poems/norm.h +++ b/lib/poems/norm.h @@ -18,8 +18,11 @@ #ifndef NORM_H #define NORM_H -#include "matrices.h" - +class ColMatrix; +class RowMatrix; +class Vect3; +class Vect4; +class Vect6; double Magnitude(ColMatrix& A); double Magnitude(RowMatrix& A); diff --git a/lib/poems/onbody.cpp b/lib/poems/onbody.cpp index 102900df8d..bf843be161 100644 --- a/lib/poems/onbody.cpp +++ b/lib/poems/onbody.cpp @@ -16,15 +16,18 @@ *_________________________________________________________________________*/ #include "onbody.h" + +#include +#include + #include "body.h" #include "inertialframe.h" #include "joint.h" #include "onfunctions.h" #include "virtualmatrix.h" #include "matrixfun.h" -#include -#include "norm.h" #include "eulerparameters.h" +#include "colmatrix.h" using namespace std; diff --git a/lib/poems/onbody.h b/lib/poems/onbody.h index d9923773c7..20190dfee8 100644 --- a/lib/poems/onbody.h +++ b/lib/poems/onbody.h @@ -22,6 +22,13 @@ #include "matrix.h" #include "vect6.h" #include "mat6x6.h" +#include "joint.h" +#include "mat3x3.h" +#include "vect3.h" + +class Body; +class ColMatrix; +class InertialFrame; // emumerated type enum Direction { @@ -29,11 +36,6 @@ enum Direction { FORWARD= 1 }; -class Body; -class InertialFrame; -class Joint; -class OnSolver; - class OnBody { Body* system_body; Joint* system_joint; diff --git a/lib/poems/onfunctions.cpp b/lib/poems/onfunctions.cpp index 582ab8cf8b..1d91dbf378 100644 --- a/lib/poems/onfunctions.cpp +++ b/lib/poems/onfunctions.cpp @@ -17,8 +17,13 @@ #include "onfunctions.h" -#include "matrixfun.h" -#include + +#include "mat3x3.h" +#include "mat6x6.h" +#include "vect3.h" +#include "vect6.h" +#include "virtualmatrix.h" + using namespace std; // friend of Vect3 & Vect6 diff --git a/lib/poems/onfunctions.h b/lib/poems/onfunctions.h index 8a69694095..42d0f4ac1c 100644 --- a/lib/poems/onfunctions.h +++ b/lib/poems/onfunctions.h @@ -18,7 +18,10 @@ #ifndef ONFUNCTIONS_H #define ONFUNCTIONS_H -#include "matrices.h" +class Mat3x3; +class Mat6x6; +class Vect3; +class Vect6; void OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV); void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC); diff --git a/lib/poems/onsolver.cpp b/lib/poems/onsolver.cpp index ad04d7e9e3..dd94c9c7ad 100644 --- a/lib/poems/onsolver.cpp +++ b/lib/poems/onsolver.cpp @@ -16,13 +16,21 @@ *_________________________________________________________________________*/ +#include +#include + #include "onsolver.h" #include "system.h" #include "onbody.h" #include "body.h" -#include "matrixfun.h" -#include - +#include "colmatmap.h" +#include "colmatrix.h" +#include "defines.h" +#include "inertialframe.h" +#include "matrix.h" +#include "poemslist.h" +#include "vect3.h" +#include "virtualmatrix.h" using namespace std; diff --git a/lib/poems/onsolver.h b/lib/poems/onsolver.h index f32b5880a9..b4bbd5e25d 100644 --- a/lib/poems/onsolver.h +++ b/lib/poems/onsolver.h @@ -21,7 +21,9 @@ #include "solver.h" #include "onbody.h" -#include + +class ColMatrix; +class Matrix; diff --git a/lib/poems/particle.cpp b/lib/poems/particle.cpp index 3496bc1906..0d953e00f6 100644 --- a/lib/poems/particle.cpp +++ b/lib/poems/particle.cpp @@ -17,7 +17,6 @@ #include "particle.h" -#include "fixedpoint.h" Particle::Particle(){ } diff --git a/lib/poems/particle.h b/lib/poems/particle.h index 20aa4831ea..0f13252f99 100644 --- a/lib/poems/particle.h +++ b/lib/poems/particle.h @@ -19,6 +19,8 @@ #ifndef PARTICLE_H #define PARTICLE_H +#include + #include "body.h" diff --git a/lib/poems/poemstreenode.h b/lib/poems/poemstreenode.h index b8f46031a5..e22bd9b97d 100644 --- a/lib/poems/poemstreenode.h +++ b/lib/poems/poemstreenode.h @@ -18,12 +18,6 @@ #ifndef TREENODE_H #define TREENODE_H -//#define NULL 0 - - -//Tree depends on TreeNode -class Tree; - // declares a tree node object for a binary tree class TreeNode{ diff --git a/lib/poems/point.cpp b/lib/poems/point.cpp index 4383844736..d7eed94efd 100644 --- a/lib/poems/point.cpp +++ b/lib/poems/point.cpp @@ -16,7 +16,9 @@ *_________________________________________________________________________*/ -#include "points.h" +#include "fixedpoint.h" +#include "point.h" +#include "vect3.h" Point::Point(){ position.Zeros(); diff --git a/lib/poems/prismaticjoint.cpp b/lib/poems/prismaticjoint.cpp index 7c01667a86..c7d4bed568 100644 --- a/lib/poems/prismaticjoint.cpp +++ b/lib/poems/prismaticjoint.cpp @@ -16,10 +16,14 @@ *_________________________________________________________________________*/ #include "prismaticjoint.h" + #include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" +#include "colmatrix.h" +#include "mat3x3.h" +#include "virtualmatrix.h" PrismaticJoint::PrismaticJoint(){ q.Dim(1); diff --git a/lib/poems/prismaticjoint.h b/lib/poems/prismaticjoint.h index 17cf050a78..c17be350cb 100644 --- a/lib/poems/prismaticjoint.h +++ b/lib/poems/prismaticjoint.h @@ -18,9 +18,11 @@ #ifndef PRISMATICJOINT_H #define PRISMATICJOINT_H +#include + #include "joint.h" #include "vect3.h" -#include "mat3x3.h" +#include "matrix.h" diff --git a/lib/poems/revolutejoint.cpp b/lib/poems/revolutejoint.cpp index ec5b1bec02..955a2f0dea 100644 --- a/lib/poems/revolutejoint.cpp +++ b/lib/poems/revolutejoint.cpp @@ -16,10 +16,14 @@ *_________________________________________________________________________*/ #include "revolutejoint.h" + #include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" +#include "colmatrix.h" +#include "mat3x3.h" +#include "virtualmatrix.h" RevoluteJoint::RevoluteJoint(){ DimQandU(1); diff --git a/lib/poems/revolutejoint.h b/lib/poems/revolutejoint.h index 478d48dbb9..ac1c06d5c5 100644 --- a/lib/poems/revolutejoint.h +++ b/lib/poems/revolutejoint.h @@ -18,11 +18,12 @@ #ifndef REVOLUTEJOINT_H #define REVOLUTEJOINT_H +#include #include "joint.h" #include "vect3.h" -#include "mat3x3.h" - +#include "matrix.h" +class VirtualMatrix; class RevoluteJoint : public Joint { Vect3 axis_pk; // unit vector in body1 basis diff --git a/lib/poems/rigidbody.cpp b/lib/poems/rigidbody.cpp index 3ac424f9e9..53acfa8bd4 100644 --- a/lib/poems/rigidbody.cpp +++ b/lib/poems/rigidbody.cpp @@ -16,7 +16,8 @@ *_________________________________________________________________________*/ #include "rigidbody.h" -#include "fixedpoint.h" +#include "mat3x3.h" +#include "virtualmatrix.h" using namespace std; diff --git a/lib/poems/rigidbody.h b/lib/poems/rigidbody.h index 0bb2a3ece2..2f4430e264 100644 --- a/lib/poems/rigidbody.h +++ b/lib/poems/rigidbody.h @@ -18,6 +18,8 @@ #ifndef RIGIDBODY_H #define RIGIDBODY_H +#include + #include "body.h" class RigidBody : public Body { diff --git a/lib/poems/rowmatrix.cpp b/lib/poems/rowmatrix.cpp index feb185070e..9fa57e773f 100644 --- a/lib/poems/rowmatrix.cpp +++ b/lib/poems/rowmatrix.cpp @@ -16,7 +16,7 @@ *_________________________________________________________________________*/ #include "rowmatrix.h" -#include "colmatrix.h" + #include #include diff --git a/lib/poems/rowmatrix.h b/lib/poems/rowmatrix.h index b04113e8ed..1dbb3d11e0 100644 --- a/lib/poems/rowmatrix.h +++ b/lib/poems/rowmatrix.h @@ -19,7 +19,10 @@ #ifndef ROWMATRIX_H #define ROWMATRIX_H +#include + #include "virtualrowmatrix.h" +#include "virtualmatrix.h" class RowMatrix : public VirtualRowMatrix { double* elements; diff --git a/lib/poems/solver.cpp b/lib/poems/solver.cpp index 67f5b607e3..9d2245149f 100644 --- a/lib/poems/solver.cpp +++ b/lib/poems/solver.cpp @@ -15,9 +15,10 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ +#include #include "solver.h" #include "system.h" -#include "matrices.h" +#include "onsolver.h" Solver::Solver(){ diff --git a/lib/poems/solver.h b/lib/poems/solver.h index 45564dd1ef..6a2debf497 100644 --- a/lib/poems/solver.h +++ b/lib/poems/solver.h @@ -17,12 +17,12 @@ #ifndef SOLVER_H #define SOLVER_H -#include + #include "colmatmap.h" -#include "matrices.h" #include "defines.h" class System; +class Matrix; class Solver{ protected: diff --git a/lib/poems/sphericaljoint.cpp b/lib/poems/sphericaljoint.cpp index fb5330db17..cba6d00a6e 100644 --- a/lib/poems/sphericaljoint.cpp +++ b/lib/poems/sphericaljoint.cpp @@ -17,14 +17,18 @@ #include "sphericaljoint.h" + +#include + #include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" -#include "norm.h" #include "eulerparameters.h" -#include "matrices.h" -#include +#include "colmatrix.h" +#include "mat3x3.h" +#include "vect3.h" +#include "virtualmatrix.h" SphericalJoint::SphericalJoint(){ diff --git a/lib/poems/sphericaljoint.h b/lib/poems/sphericaljoint.h index ef29f8e38e..90f1547873 100644 --- a/lib/poems/sphericaljoint.h +++ b/lib/poems/sphericaljoint.h @@ -18,11 +18,9 @@ #ifndef SPHERICALJOINT_H #define SPHERICALJOINT_H +#include #include "joint.h" -#include "vect3.h" -#include "mat3x3.h" - - +#include "matrix.h" class SphericalJoint : public Joint { Matrix const_sP; diff --git a/lib/poems/system.cpp b/lib/poems/system.cpp index 369213f7d0..1ac9ce1236 100644 --- a/lib/poems/system.cpp +++ b/lib/poems/system.cpp @@ -17,9 +17,26 @@ #include "system.h" + +#include +#include + #include "body.h" #include "joint.h" -#include +#include "colmatrix.h" +#include "eulerparameters.h" +#include "fixedpoint.h" +#include "freebodyjoint.h" +#include "inertialframe.h" +#include "mat3x3.h" +#include "matrix.h" +#include "matrixfun.h" +#include "rigidbody.h" +#include "sphericaljoint.h" +#include "vect3.h" +#include "virtualmatrix.h" + +class Point; System::System(){ diff --git a/lib/poems/system.h b/lib/poems/system.h index 1b59395de7..e5ce27194b 100644 --- a/lib/poems/system.h +++ b/lib/poems/system.h @@ -15,35 +15,12 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #ifndef SYSTEM_H #define SYSTEM_H - #include -#include -#include -#include -#include - #include "poemslist.h" -#include "matrices.h" -#include "workspace.h" -#include "matrixfun.h" -#include "onsolver.h" -#include "system.h" -#include "inertialframe.h" -#include "rigidbody.h" -#include "revolutejoint.h" -#include "fixedpoint.h" -#include "freebodyjoint.h" -#include "sphericaljoint.h" -#include "body23joint.h" -#include "mixedjoint.h" -#include "eulerparameters.h" -#include "matrices.h" -#include "norm.h" - class Body; class Joint; diff --git a/lib/poems/vect3.cpp b/lib/poems/vect3.cpp index 03c5d7bc00..7ce3230238 100644 --- a/lib/poems/vect3.cpp +++ b/lib/poems/vect3.cpp @@ -16,7 +16,9 @@ *_________________________________________________________________________*/ #include "vect3.h" + #include +#include using namespace std; @@ -141,6 +143,13 @@ Vect3& Vect3::operator+=(const Vect3& A){ return *this; } +Vect3& Vect3::operator-(){ + elements[0] = -elements[0]; + elements[1] = -elements[1]; + elements[2] = -elements[2]; + return *this; +} + Vect3& Vect3::operator-=(const Vect3& A){ elements[0] -= A.elements[0]; elements[1] -= A.elements[1]; diff --git a/lib/poems/vect3.h b/lib/poems/vect3.h index ababe18e51..a28832db6c 100644 --- a/lib/poems/vect3.h +++ b/lib/poems/vect3.h @@ -18,7 +18,10 @@ #ifndef VECT3_H #define VECT3_H +#include + #include "virtualcolmatrix.h" +#include "virtualmatrix.h" class Matrix; class Mat3x3; @@ -52,6 +55,7 @@ public: Vect3& operator*=(double b); Vect3& operator+=(const Vect3& A); Vect3& operator-=(const Vect3& A); + Vect3& operator-(); friend Matrix T(const Vect3& A); // a wasteful transpose friend Mat3x3 CrossMat(Vect3& a); // a wasteful cross matrix implementation diff --git a/lib/poems/vect4.cpp b/lib/poems/vect4.cpp index 3b5afddc50..b045998017 100644 --- a/lib/poems/vect4.cpp +++ b/lib/poems/vect4.cpp @@ -16,7 +16,9 @@ *_________________________________________________________________________*/ #include "vect4.h" + #include +#include using namespace std; diff --git a/lib/poems/vect4.h b/lib/poems/vect4.h index 695f5e158a..0b28994043 100644 --- a/lib/poems/vect4.h +++ b/lib/poems/vect4.h @@ -18,8 +18,10 @@ #ifndef VECT4_H #define VECT4_H -#include "virtualcolmatrix.h" +#include +#include "virtualcolmatrix.h" +#include "virtualmatrix.h" class Matrix; class Mat4x4; diff --git a/lib/poems/vect6.cpp b/lib/poems/vect6.cpp index eb65d24f16..5baadafc34 100644 --- a/lib/poems/vect6.cpp +++ b/lib/poems/vect6.cpp @@ -16,7 +16,9 @@ *_________________________________________________________________________*/ #include "vect6.h" + #include +#include using namespace std; diff --git a/lib/poems/vect6.h b/lib/poems/vect6.h index c346c852ef..8047c1bbf8 100644 --- a/lib/poems/vect6.h +++ b/lib/poems/vect6.h @@ -18,7 +18,10 @@ #ifndef VECT6_H #define VECT6_H +#include + #include "virtualcolmatrix.h" +#include "virtualmatrix.h" class Matrix; class Mat6x6; diff --git a/lib/poems/workspace.cpp b/lib/poems/workspace.cpp index 2b3257b0dd..29a1c95832 100644 --- a/lib/poems/workspace.cpp +++ b/lib/poems/workspace.cpp @@ -15,15 +15,26 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ +#include +#include // IWYU pragma: keep +#include #include "workspace.h" #include "system.h" #include "solver.h" #include "SystemProcessor.h" -#include -#include -#include -#include +#include "POEMSChain.h" +#include "body.h" +#include "colmatmap.h" +#include "colmatrix.h" +#include "defines.h" +#include "joint.h" +#include "mat3x3.h" +#include "matrix.h" +#include "matrixfun.h" +#include "poemslist.h" +#include "vect3.h" +#include "virtualmatrix.h" using namespace std; diff --git a/lib/poems/workspace.h b/lib/poems/workspace.h index 5faaf904dc..6213815d81 100644 --- a/lib/poems/workspace.h +++ b/lib/poems/workspace.h @@ -19,15 +19,6 @@ #ifndef WORKSPACE_H #define WORKSPACE_H -#include "matrices.h" -#include -#include -#include -#include -#include -#include - - class System; class Solver; -- GitLab From e9e7d995b270fd4abf7041474fd0c667453f4e99 Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Mon, 1 Jul 2019 11:37:13 +0100 Subject: [PATCH 103/236] move to user-misc --- src/USER-MISC/README | 1 + src/{ => USER-MISC}/compute_momentum.cpp | 0 src/{ => USER-MISC}/compute_momentum.h | 0 3 files changed, 1 insertion(+) rename src/{ => USER-MISC}/compute_momentum.cpp (100%) rename src/{ => USER-MISC}/compute_momentum.h (100%) diff --git a/src/USER-MISC/README b/src/USER-MISC/README index 219e19673d..7c48640e2a 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -31,6 +31,7 @@ compute basal/atom, Christopher Barrett, cdb333 at cavs.msstate.edu, 3 Mar 2013 compute cnp/atom, Paulo Branicio (USC), branicio at usc.edu, 31 May 2017 compute entropy/atom, Pablo Piaggi (EPFL), pablo.piaggi at epfl.ch, 15 June 2018 compute pressure/cylinder, Cody K. Addington (NCSU), , 2 Oct 2018 +compute momentum, Rupert Nash (University of Edinburgh), r.nash at epcc.ed.ac.uk, 28 June 2019 compute stress/mop, Romain Vermorel (U Pau) & Laurent Joly (U Lyon), romain.vermorel at univ-pau.fr & ljoly.ulyon at gmail.com, 5 Sep 18 compute stress/mop/profile, Romain Vermorel (U Pau) & Laurent Joly (U Lyon), romain.vermorel at univ-pau.fr & ljoly.ulyon at gmail.com, 5 Sep 18 compute temp/rotate, Laurent Joly (U Lyon), ljoly.ulyon at gmail.com, 8 Aug 11 diff --git a/src/compute_momentum.cpp b/src/USER-MISC/compute_momentum.cpp similarity index 100% rename from src/compute_momentum.cpp rename to src/USER-MISC/compute_momentum.cpp diff --git a/src/compute_momentum.h b/src/USER-MISC/compute_momentum.h similarity index 100% rename from src/compute_momentum.h rename to src/USER-MISC/compute_momentum.h -- GitLab From fb5e7e6f3badd73feb79768d6f4dbd0ed0c1c2de Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Mon, 1 Jul 2019 12:06:40 +0100 Subject: [PATCH 104/236] add note about USER-MISC package --- doc/src/compute_momentum.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/src/compute_momentum.txt b/doc/src/compute_momentum.txt index 4db171d42d..fc5243583e 100644 --- a/doc/src/compute_momentum.txt +++ b/doc/src/compute_momentum.txt @@ -36,9 +36,13 @@ output"_Howto_output.html doc page for an overview of LAMMPS output options. The vector value calculated by this compute is "extensive". The vector -value will be in momentum "units"_units.html. +value will be in mass*velocity "units"_units.html. -[Restrictions:] none +[Restrictions:] + +This compute is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Build +package"_Build_package.html doc page for more info. [Related commands:] -- GitLab From 32728375b97714dbbe42e68fc2c14b5a0c770aa8 Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Mon, 1 Jul 2019 13:39:32 +0100 Subject: [PATCH 105/236] add test script for compute momentum --- examples/USER/misc/momentum/in.momentum | 65 +++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 examples/USER/misc/momentum/in.momentum diff --git a/examples/USER/misc/momentum/in.momentum b/examples/USER/misc/momentum/in.momentum new file mode 100644 index 0000000000..5adcbfeff6 --- /dev/null +++ b/examples/USER/misc/momentum/in.momentum @@ -0,0 +1,65 @@ +# Test compute momentum with by comparing it's output with compute reduce + +# Script will output the two computations of the total momentum as +# thermo vars - they should be identical + +# 3D LJ Poiseuille flow simulation +dimension 3 +boundary p p p + +atom_style atomic +neighbor 0.3 bin +neigh_modify delay 5 + +# create geometry +lattice hcp 0.5 +region box block 0 20 0 10 0 10 +create_box 3 box +create_atoms 1 box + +mass 1 1.0 +mass 2 1.0 +mass 3 1.0 + +# LJ potentials +pair_style lj/cut 1.0 +pair_coeff * * 1.0 1.0 1.0 + +# define groups +region 1 block INF INF INF 1.0 INF INF +group lower region 1 +region 2 block INF INF 9.0 INF INF INF +group upper region 2 +group boundary union lower upper +group liquid subtract all boundary + +set group lower type 2 +set group upper type 3 + +# temperature settings +compute mobile liquid temp +velocity liquid create 1.0 100 temp mobile +fix 1 all nve +fix 2 liquid temp/rescale 200 1.0 2.0 0.02 1.0 +fix_modify 2 temp mobile + +velocity boundary set 0.0 0.0 0.0 +fix 4 lower setforce 0.0 0.0 0.0 +fix 5 upper setforce 0.0 0.0 0.0 +fix 6 liquid addforce 0.1 0.0 0.0 + +# Compute total momentum +compute mom liquid momentum + +# Comparison (momentum variables + compute reduce) +variable mx atom mass*vx +variable my atom mass*vy +variable mz atom mass*vz +compute mom_red liquid reduce sum v_mx v_my v_mz + +# Run +timestep 0.003 +thermo 1000 +thermo_style custom step c_mom_red[*] c_mom[*] + +run 100000 -- GitLab From 2443c8ad13ac452bcea30a3895f55394d89186ca Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 1 Jul 2019 09:14:22 -0400 Subject: [PATCH 106/236] reduce IWYU warnings for lammps.cpp --- src/lammps.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/lammps.cpp b/src/lammps.cpp index 052d14dfed..f8e7dceb89 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -19,20 +19,20 @@ #include #include #include "lammps.h" -#include "style_angle.h" -#include "style_atom.h" -#include "style_bond.h" -#include "style_command.h" -#include "style_compute.h" -#include "style_dihedral.h" -#include "style_dump.h" -#include "style_fix.h" -#include "style_improper.h" -#include "style_integrate.h" -#include "style_kspace.h" -#include "style_minimize.h" -#include "style_pair.h" -#include "style_region.h" +#include "style_angle.h" // IWYU pragma: keep +#include "style_atom.h" // IWYU pragma: keep +#include "style_bond.h" // IWYU pragma: keep +#include "style_command.h" // IWYU pragma: keep +#include "style_compute.h" // IWYU pragma: keep +#include "style_dihedral.h" // IWYU pragma: keep +#include "style_dump.h" // IWYU pragma: keep +#include "style_fix.h" // IWYU pragma: keep +#include "style_improper.h" // IWYU pragma: keep +#include "style_integrate.h" // IWYU pragma: keep +#include "style_kspace.h" // IWYU pragma: keep +#include "style_minimize.h" // IWYU pragma: keep +#include "style_pair.h" // IWYU pragma: keep +#include "style_region.h" // IWYU pragma: keep #include "universe.h" #include "input.h" #include "info.h" -- GitLab From 42c31227d9635de1da42550c8458aca622195a7a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 1 Jul 2019 14:31:41 -0400 Subject: [PATCH 107/236] continuing to clean up include file lists --- lib/poems/mat4x4.h | 2 -- src/KSPACE/pair_buck_coul_long.cpp | 3 +-- src/KSPACE/pair_buck_long_coul_long.cpp | 4 +--- src/MC/fix_bond_swap.cpp | 3 +-- src/MC/fix_bond_swap.h | 1 - src/MC/fix_gcmc.cpp | 7 ++----- src/PYTHON/fix_python_invoke.cpp | 3 --- src/PYTHON/fix_python_move.cpp | 7 ------- src/PYTHON/pair_python.cpp | 2 -- src/PYTHON/python_impl.cpp | 3 ++- src/PYTHON/python_impl.h | 1 + src/RIGID/fix_rigid_nh.cpp | 3 +-- src/RIGID/fix_rigid_nph_small.cpp | 1 - src/RIGID/fix_rigid_npt.cpp | 1 - src/RIGID/fix_rigid_npt_small.cpp | 1 - src/RIGID/fix_rigid_small.cpp | 4 ++-- src/imbalance_store.cpp | 1 - src/imbalance_time.cpp | 1 - src/lmppython.cpp | 4 ++++ src/lmppython.h | 5 ----- src/math_special.cpp | 2 +- src/min_linesearch.cpp | 1 - src/neigh_list.cpp | 2 +- src/npair_full_bin_ghost.cpp | 1 - src/npair_full_multi.cpp | 1 - src/npair_full_nsq.cpp | 1 - src/npair_full_nsq_ghost.cpp | 1 - src/npair_half_bin_atomonly_newton.cpp | 3 --- src/npair_half_bin_newtoff.cpp | 1 - src/npair_half_bin_newtoff_ghost.cpp | 1 - src/npair_half_bin_newton.cpp | 1 - src/npair_half_bin_newton_tri.cpp | 1 - src/npair_half_multi_newtoff.cpp | 1 - src/npair_half_multi_newton.cpp | 1 - src/npair_half_multi_newton_tri.cpp | 1 - src/npair_half_nsq_newtoff.cpp | 1 - src/npair_half_nsq_newtoff_ghost.cpp | 1 - src/npair_half_nsq_newton.cpp | 1 - src/npair_half_respa_bin_newtoff.cpp | 1 - src/npair_half_respa_bin_newton.cpp | 1 - src/npair_half_respa_bin_newton_tri.cpp | 1 - src/npair_half_respa_nsq_newtoff.cpp | 1 - src/npair_half_respa_nsq_newton.cpp | 1 - src/npair_half_size_bin_newtoff.cpp | 2 -- src/npair_half_size_bin_newton.cpp | 2 -- src/npair_half_size_bin_newton_tri.cpp | 2 -- src/npair_half_size_nsq_newtoff.cpp | 2 -- src/npair_half_size_nsq_newton.cpp | 2 -- src/npair_halffull_newtoff.cpp | 4 ---- src/npair_halffull_newton.cpp | 3 --- src/npair_skip.cpp | 3 --- src/pair_buck_coul_cut.cpp | 3 +-- src/pair_coul_cut.cpp | 3 +-- src/pointers.h | 1 + src/variable.cpp | 2 +- 55 files changed, 21 insertions(+), 92 deletions(-) diff --git a/lib/poems/mat4x4.h b/lib/poems/mat4x4.h index c847f6e0d2..a6ae232473 100644 --- a/lib/poems/mat4x4.h +++ b/lib/poems/mat4x4.h @@ -19,9 +19,7 @@ #define MAT4X4_H #include - #include "virtualmatrix.h" -#include "matrix.h" class Vect4; class Matrix; diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index 0a1ec88da5..a5427965dc 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_buck_coul_long.h" #include "atom.h" diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index c7a4a4b2f6..bcd290891e 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -15,9 +15,8 @@ Contributing author: Pieter J. in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "math_vector.h" #include "pair_buck_long_coul_long.h" @@ -29,7 +28,6 @@ #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "memory.h" #include "error.h" diff --git a/src/MC/fix_bond_swap.cpp b/src/MC/fix_bond_swap.cpp index 9a72667907..5da2b845d6 100644 --- a/src/MC/fix_bond_swap.cpp +++ b/src/MC/fix_bond_swap.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_bond_swap.h" #include "atom.h" @@ -23,7 +23,6 @@ #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "group.h" #include "comm.h" #include "domain.h" #include "modify.h" diff --git a/src/MC/fix_bond_swap.h b/src/MC/fix_bond_swap.h index 0443144c23..d24159d807 100644 --- a/src/MC/fix_bond_swap.h +++ b/src/MC/fix_bond_swap.h @@ -21,7 +21,6 @@ FixStyle(bond/swap,FixBondSwap) #define LMP_FIX_BONDSWAP_H #include "fix.h" -#include "pair.h" namespace LAMMPS_NS { diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 7ab0879335..4e48b71611 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -15,8 +15,8 @@ Contributing author: Paul Crozier, Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_gcmc.h" #include "atom.h" @@ -43,10 +43,7 @@ #include "math_const.h" #include "memory.h" #include "error.h" -#include "thermo.h" -#include "output.h" #include "neighbor.h" -#include "utils.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -371,7 +368,7 @@ void FixGCMC::options(int narg, char **arg) ngrouptypesmax*sizeof(char *), "fix_gcmc:grouptypestrings"); } - grouptypes[ngrouptypes] = atoi(arg[iarg+1]); + grouptypes[ngrouptypes] = force->inumeric(FLERR,arg[iarg+1]); int n = strlen(arg[iarg+2]) + 1; grouptypestrings[ngrouptypes] = new char[n]; strcpy(grouptypestrings[ngrouptypes],arg[iarg+2]); diff --git a/src/PYTHON/fix_python_invoke.cpp b/src/PYTHON/fix_python_invoke.cpp index 280c2d91e2..f704bd9741 100644 --- a/src/PYTHON/fix_python_invoke.cpp +++ b/src/PYTHON/fix_python_invoke.cpp @@ -16,13 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_python_invoke.h" -#include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" #include "lmppython.h" #include "python_compat.h" diff --git a/src/PYTHON/fix_python_move.cpp b/src/PYTHON/fix_python_move.cpp index ec21dbeadd..56b7768669 100644 --- a/src/PYTHON/fix_python_move.cpp +++ b/src/PYTHON/fix_python_move.cpp @@ -16,15 +16,8 @@ ------------------------------------------------------------------------- */ #include -#include -#include #include #include "fix_python_move.h" -#include "atom.h" -#include "comm.h" -#include "force.h" -#include "memory.h" -#include "neigh_list.h" #include "lmppython.h" #include "error.h" #include "python_compat.h" diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 2148fc67b8..638077da48 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -16,12 +16,10 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include "pair_python.h" #include "atom.h" -#include "comm.h" #include "force.h" #include "memory.h" #include "update.h" diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 9c650330af..249d4f7bb1 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -16,8 +16,9 @@ ------------------------------------------------------------------------- */ #include +#include #include -#include "lmppython.h" +#include "python_impl.h" #include "force.h" #include "input.h" #include "variable.h" diff --git a/src/PYTHON/python_impl.h b/src/PYTHON/python_impl.h index 2ccdda95c9..f890f54f3b 100644 --- a/src/PYTHON/python_impl.h +++ b/src/PYTHON/python_impl.h @@ -15,6 +15,7 @@ #define LMP_PYTHON_IMPL_H #include "pointers.h" +#include "lmppython.h" namespace LAMMPS_NS { diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 4dceb1b8b4..4acc8d3411 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -17,8 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_rigid_nh.h" #include "math_extra.h" @@ -32,7 +32,6 @@ #include "comm.h" #include "force.h" #include "kspace.h" -#include "output.h" #include "memory.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_nph_small.cpp b/src/RIGID/fix_rigid_nph_small.cpp index d32e3043f4..9b045eaf13 100644 --- a/src/RIGID/fix_rigid_nph_small.cpp +++ b/src/RIGID/fix_rigid_nph_small.cpp @@ -19,7 +19,6 @@ #include #include "fix_rigid_nph_small.h" -#include "domain.h" #include "modify.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_npt.cpp b/src/RIGID/fix_rigid_npt.cpp index da5d5ffaa5..526fc8f614 100644 --- a/src/RIGID/fix_rigid_npt.cpp +++ b/src/RIGID/fix_rigid_npt.cpp @@ -19,7 +19,6 @@ #include #include "fix_rigid_npt.h" -#include "domain.h" #include "modify.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_npt_small.cpp b/src/RIGID/fix_rigid_npt_small.cpp index f1fd5470da..fff338d687 100644 --- a/src/RIGID/fix_rigid_npt_small.cpp +++ b/src/RIGID/fix_rigid_npt_small.cpp @@ -19,7 +19,6 @@ #include #include "fix_rigid_npt_small.h" -#include "domain.h" #include "modify.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index dedd71c98d..8c2feb6436 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -11,10 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include +#include #include "fix_rigid_small.h" #include "math_extra.h" #include "atom.h" @@ -31,7 +32,6 @@ #include "neighbor.h" #include "force.h" #include "input.h" -#include "output.h" #include "variable.h" #include "random_mars.h" #include "math_const.h" diff --git a/src/imbalance_store.cpp b/src/imbalance_store.cpp index 6b69caf785..c117b60860 100644 --- a/src/imbalance_store.cpp +++ b/src/imbalance_store.cpp @@ -14,7 +14,6 @@ #include #include "imbalance_store.h" #include "atom.h" -#include "input.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/imbalance_time.cpp b/src/imbalance_time.cpp index a5fe538b8f..ceb3c08220 100644 --- a/src/imbalance_time.cpp +++ b/src/imbalance_time.cpp @@ -14,7 +14,6 @@ #include #include "imbalance_time.h" #include "atom.h" -#include "comm.h" #include "force.h" #include "timer.h" #include "error.h" diff --git a/src/lmppython.cpp b/src/lmppython.cpp index 7c6a490c24..52abd93f10 100644 --- a/src/lmppython.cpp +++ b/src/lmppython.cpp @@ -12,7 +12,11 @@ ------------------------------------------------------------------------- */ #include "lmppython.h" +#if LMP_PYTHON +#include "python_impl.h" +#else #include "error.h" +#endif using namespace LAMMPS_NS; diff --git a/src/lmppython.h b/src/lmppython.h index afc21037fb..3d55c4827b 100644 --- a/src/lmppython.h +++ b/src/lmppython.h @@ -51,11 +51,6 @@ private: }; } - -#endif - -#if LMP_PYTHON -#include "python_impl.h" #endif /* ERROR/WARNING messages: diff --git a/src/math_special.cpp b/src/math_special.cpp index 31567bdc77..b2f545ddc6 100644 --- a/src/math_special.cpp +++ b/src/math_special.cpp @@ -1,5 +1,5 @@ #include -#include // requires C++-11 +#include // IWYU pragma: keep #include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/min_linesearch.cpp b/src/min_linesearch.cpp index 33a781ecfe..3c0621c602 100644 --- a/src/min_linesearch.cpp +++ b/src/min_linesearch.cpp @@ -26,7 +26,6 @@ #include "min_linesearch.h" #include "atom.h" #include "modify.h" -#include "neighbor.h" #include "fix_minimize.h" #include "pair.h" #include "output.h" diff --git a/src/neigh_list.cpp b/src/neigh_list.cpp index 651b2ed70a..31720cc78c 100644 --- a/src/neigh_list.cpp +++ b/src/neigh_list.cpp @@ -12,7 +12,7 @@ ------------------------------------------------------------------------- */ #include "neigh_list.h" -#include "my_page.h" +#include "my_page.h" // IWYU pragma: keep #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/npair_full_bin_ghost.cpp b/src/npair_full_bin_ghost.cpp index 2edd03cc9e..61b27dd99d 100644 --- a/src/npair_full_bin_ghost.cpp +++ b/src/npair_full_bin_ghost.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_full_bin_ghost.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_full_multi.cpp b/src/npair_full_multi.cpp index 9a2490ac5d..40ed2275be 100644 --- a/src/npair_full_multi.cpp +++ b/src/npair_full_multi.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_full_multi.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_full_nsq.cpp b/src/npair_full_nsq.cpp index 1b404ffc94..76b66fd004 100644 --- a/src/npair_full_nsq.cpp +++ b/src/npair_full_nsq.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_full_nsq.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_full_nsq_ghost.cpp b/src/npair_full_nsq_ghost.cpp index 1727b2905e..b20fa9b8ce 100644 --- a/src/npair_full_nsq_ghost.cpp +++ b/src/npair_full_nsq_ghost.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_full_nsq_ghost.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_bin_atomonly_newton.cpp b/src/npair_half_bin_atomonly_newton.cpp index 6da44b4a5c..a7fa3985ef 100644 --- a/src/npair_half_bin_atomonly_newton.cpp +++ b/src/npair_half_bin_atomonly_newton.cpp @@ -12,12 +12,9 @@ ------------------------------------------------------------------------- */ #include "npair_half_bin_atomonly_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/npair_half_bin_newtoff.cpp b/src/npair_half_bin_newtoff.cpp index 4c44741ffe..65768918c9 100644 --- a/src/npair_half_bin_newtoff.cpp +++ b/src/npair_half_bin_newtoff.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_bin_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_bin_newtoff_ghost.cpp b/src/npair_half_bin_newtoff_ghost.cpp index 72ec15e66a..91fbf049cb 100644 --- a/src/npair_half_bin_newtoff_ghost.cpp +++ b/src/npair_half_bin_newtoff_ghost.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_bin_newtoff_ghost.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_bin_newton.cpp b/src/npair_half_bin_newton.cpp index 3a387870e3..fe388e1144 100644 --- a/src/npair_half_bin_newton.cpp +++ b/src/npair_half_bin_newton.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_bin_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_bin_newton_tri.cpp b/src/npair_half_bin_newton_tri.cpp index 169e710e0e..1f0e3c1187 100644 --- a/src/npair_half_bin_newton_tri.cpp +++ b/src/npair_half_bin_newton_tri.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_bin_newton_tri.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_multi_newtoff.cpp b/src/npair_half_multi_newtoff.cpp index 07b5c87a6c..57dcf29cc7 100644 --- a/src/npair_half_multi_newtoff.cpp +++ b/src/npair_half_multi_newtoff.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_multi_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_multi_newton.cpp b/src/npair_half_multi_newton.cpp index 3d90979329..a9293d3d64 100644 --- a/src/npair_half_multi_newton.cpp +++ b/src/npair_half_multi_newton.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_multi_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_multi_newton_tri.cpp b/src/npair_half_multi_newton_tri.cpp index 909c69246b..c1d845cb38 100644 --- a/src/npair_half_multi_newton_tri.cpp +++ b/src/npair_half_multi_newton_tri.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_multi_newton_tri.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_nsq_newtoff.cpp b/src/npair_half_nsq_newtoff.cpp index 06e8344332..db369687d0 100644 --- a/src/npair_half_nsq_newtoff.cpp +++ b/src/npair_half_nsq_newtoff.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_nsq_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_nsq_newtoff_ghost.cpp b/src/npair_half_nsq_newtoff_ghost.cpp index 1865061a8b..0a9b6d0f45 100644 --- a/src/npair_half_nsq_newtoff_ghost.cpp +++ b/src/npair_half_nsq_newtoff_ghost.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_nsq_newtoff_ghost.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_nsq_newton.cpp b/src/npair_half_nsq_newton.cpp index 11c71d5609..69489915b2 100644 --- a/src/npair_half_nsq_newton.cpp +++ b/src/npair_half_nsq_newton.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_nsq_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_respa_bin_newtoff.cpp b/src/npair_half_respa_bin_newtoff.cpp index 0145771f4a..8c1d8d684f 100644 --- a/src/npair_half_respa_bin_newtoff.cpp +++ b/src/npair_half_respa_bin_newtoff.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_respa_bin_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_respa_bin_newton.cpp b/src/npair_half_respa_bin_newton.cpp index 72a613204d..d2598fa1a4 100644 --- a/src/npair_half_respa_bin_newton.cpp +++ b/src/npair_half_respa_bin_newton.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_respa_bin_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_respa_bin_newton_tri.cpp b/src/npair_half_respa_bin_newton_tri.cpp index add1cf6e5c..efe48d48e1 100644 --- a/src/npair_half_respa_bin_newton_tri.cpp +++ b/src/npair_half_respa_bin_newton_tri.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_respa_bin_newton_tri.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_respa_nsq_newtoff.cpp b/src/npair_half_respa_nsq_newtoff.cpp index c0e932f0ae..334ebb5ca8 100644 --- a/src/npair_half_respa_nsq_newtoff.cpp +++ b/src/npair_half_respa_nsq_newtoff.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_respa_nsq_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_respa_nsq_newton.cpp b/src/npair_half_respa_nsq_newton.cpp index f7d161896d..7ecd02b0c5 100644 --- a/src/npair_half_respa_nsq_newton.cpp +++ b/src/npair_half_respa_nsq_newton.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_respa_nsq_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_size_bin_newtoff.cpp b/src/npair_half_size_bin_newtoff.cpp index 021452028b..b9e44675ac 100644 --- a/src/npair_half_size_bin_newtoff.cpp +++ b/src/npair_half_size_bin_newtoff.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_bin_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_size_bin_newton.cpp b/src/npair_half_size_bin_newton.cpp index 760c09570a..93bcc25373 100644 --- a/src/npair_half_size_bin_newton.cpp +++ b/src/npair_half_size_bin_newton.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_bin_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_size_bin_newton_tri.cpp b/src/npair_half_size_bin_newton_tri.cpp index d831982ed6..39068c02bc 100644 --- a/src/npair_half_size_bin_newton_tri.cpp +++ b/src/npair_half_size_bin_newton_tri.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_bin_newton_tri.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_size_nsq_newtoff.cpp b/src/npair_half_size_nsq_newtoff.cpp index 1c2fe5f3d5..6f169d0b6c 100644 --- a/src/npair_half_size_nsq_newtoff.cpp +++ b/src/npair_half_size_nsq_newtoff.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_nsq_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_half_size_nsq_newton.cpp b/src/npair_half_size_nsq_newton.cpp index ce9f8ec186..d427c14809 100644 --- a/src/npair_half_size_nsq_newton.cpp +++ b/src/npair_half_size_nsq_newton.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_nsq_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_halffull_newtoff.cpp b/src/npair_halffull_newtoff.cpp index 84816f07b2..6ff5433e88 100644 --- a/src/npair_halffull_newtoff.cpp +++ b/src/npair_halffull_newtoff.cpp @@ -12,12 +12,8 @@ ------------------------------------------------------------------------- */ #include "npair_halffull_newtoff.h" -#include "neighbor.h" #include "neigh_list.h" -#include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/npair_halffull_newton.cpp b/src/npair_halffull_newton.cpp index 371bbd33a8..0912cfe12f 100644 --- a/src/npair_halffull_newton.cpp +++ b/src/npair_halffull_newton.cpp @@ -12,12 +12,9 @@ ------------------------------------------------------------------------- */ #include "npair_halffull_newton.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/npair_skip.cpp b/src/npair_skip.cpp index 1fe202537a..028041a947 100644 --- a/src/npair_skip.cpp +++ b/src/npair_skip.cpp @@ -12,12 +12,9 @@ ------------------------------------------------------------------------- */ #include "npair_skip.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 094797694c..64475166e3 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -15,9 +15,8 @@ Contributing author: Eduardo Bringa (LLNL) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include "pair_buck_coul_cut.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_coul_cut.cpp b/src/pair_coul_cut.cpp index 196e064219..28973026cd 100644 --- a/src/pair_coul_cut.cpp +++ b/src/pair_coul_cut.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_coul_cut.h" #include "atom.h" diff --git a/src/pointers.h b/src/pointers.h index 5df5b72d47..1af07d5158 100644 --- a/src/pointers.h +++ b/src/pointers.h @@ -23,6 +23,7 @@ #include "lmptype.h" // IWYU pragma: export #include +#include // IWYU pragme: export #include // IWYU pragma: export #include "lammps.h" // IWYU pragma: export diff --git a/src/variable.cpp b/src/variable.cpp index 1416754073..111fc75a9a 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include @@ -34,7 +35,6 @@ #include "thermo.h" #include "random_mars.h" #include "math_const.h" -#include "atom_masks.h" #include "lmppython.h" #include "memory.h" #include "info.h" -- GitLab From 968335d4fdc15ec3db520cb780895e5eca151d41 Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Tue, 2 Jul 2019 10:34:10 +0200 Subject: [PATCH 108/236] Remove useless things --- src/compute_pressure.cpp | 2 +- src/compute_pressure.h | 1 - src/pair_hybrid.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index 96f577219d..16e56cb9df 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -87,7 +87,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : pstyle = new char[n]; strcpy(pstyle,arg[iarg++]); - nsub = 0; + int nsub = 0; if (narg > iarg) { if (isdigit(arg[iarg][0])) { diff --git a/src/compute_pressure.h b/src/compute_pressure.h index 31983e8e2c..2982271390 100644 --- a/src/compute_pressure.h +++ b/src/compute_pressure.h @@ -49,7 +49,6 @@ class ComputePressure : public Compute { void virial_compute(int, int); private: - int nsub; char *pstyle; }; diff --git a/src/pair_hybrid.h b/src/pair_hybrid.h index 1e0130ba3d..e313e16f18 100644 --- a/src/pair_hybrid.h +++ b/src/pair_hybrid.h @@ -33,7 +33,6 @@ class PairHybrid : public Pair { friend class Respa; friend class Info; friend class PairDeprecated; - friend class ComputePressure; public: PairHybrid(class LAMMPS *); virtual ~PairHybrid(); -- GitLab From 0761c4dbb97fbbbe3b61f37fc62b7ca61f74b558 Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Tue, 2 Jul 2019 10:47:36 +0200 Subject: [PATCH 109/236] Name change hybridpair->pair/hybrid --- doc/src/compute_pressure.txt | 2 +- src/compute_pressure.cpp | 20 ++++++++++---------- src/compute_pressure.h | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/src/compute_pressure.txt b/doc/src/compute_pressure.txt index 070376075e..b8d52b83de 100644 --- a/doc/src/compute_pressure.txt +++ b/doc/src/compute_pressure.txt @@ -22,7 +22,7 @@ keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {ks compute 1 all pressure thermo_temp compute 1 all pressure NULL pair bond -compute 1 all pressure NULL hybridpair lj/cut :pre +compute 1 all pressure NULL pair/hybrid lj/cut :pre [Description:] diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index 16e56cb9df..d586b7d953 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -67,7 +67,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : // process optional args - hybridpairflag = 0; + pairhybridflag = 0; if (narg == 4) { keflag = 1; pairflag = 1; @@ -81,7 +81,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : int iarg = 4; while (iarg < narg) { if (strcmp(arg[iarg],"ke") == 0) keflag = 1; - else if (strcmp(arg[iarg],"hybridpair") == 0) { + else if (strcmp(arg[iarg],"pair/hybrid") == 0) { int n = strlen(arg[++iarg]) + 1; if (lmp->suffix) n += strlen(lmp->suffix) + 1; pstyle = new char[n]; @@ -100,17 +100,17 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : // check if pair style with and without suffix exists - hybridpair = (Pair *) force->pair_match(pstyle,1,nsub); - if (!hybridpair && lmp->suffix) { + pairhybrid = (Pair *) force->pair_match(pstyle,1,nsub); + if (!pairhybrid && lmp->suffix) { strcat(pstyle,"/"); strcat(pstyle,lmp->suffix); - hybridpair = (Pair *) force->pair_match(pstyle,1,nsub); + pairhybrid = (Pair *) force->pair_match(pstyle,1,nsub); } - if (!hybridpair) + if (!pairhybrid) error->all(FLERR,"Unrecognized pair style in compute pressure command"); - hybridpairflag = 1; + pairhybridflag = 1; } else if (strcmp(arg[iarg],"pair") == 0) pairflag = 1; else if (strcmp(arg[iarg],"bond") == 0) bondflag = 1; @@ -173,7 +173,7 @@ void ComputePressure::init() nvirial = 0; vptr = NULL; - if (hybridpairflag && force->pair) nvirial++; + if (pairhybridflag && force->pair) nvirial++; if (pairflag && force->pair) nvirial++; if (bondflag && atom->molecular && force->bond) nvirial++; if (angleflag && atom->molecular && force->angle) nvirial++; @@ -186,10 +186,10 @@ void ComputePressure::init() if (nvirial) { vptr = new double*[nvirial]; nvirial = 0; - if (hybridpairflag && force->pair) { + if (pairhybridflag && force->pair) { PairHybrid *ph = (PairHybrid *) force->pair; ph->no_virial_fdotr_compute = 1; - vptr[nvirial++] = hybridpair->virial; + vptr[nvirial++] = pairhybrid->virial; } if (pairflag && force->pair) vptr[nvirial++] = force->pair->virial; if (bondflag && force->bond) vptr[nvirial++] = force->bond->virial; diff --git a/src/compute_pressure.h b/src/compute_pressure.h index 2982271390..76a4066179 100644 --- a/src/compute_pressure.h +++ b/src/compute_pressure.h @@ -41,8 +41,8 @@ class ComputePressure : public Compute { Compute *temperature; char *id_temp; double virial[6]; - int hybridpairflag; - class Pair *hybridpair; + int pairhybridflag; + class Pair *pairhybrid; int keflag,pairflag,bondflag,angleflag,dihedralflag,improperflag; int fixflag,kspaceflag; -- GitLab From fc1d8f2cbf03245a376dcb9fd4b1dcaf95e36fe5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 2 Jul 2019 01:12:16 -0400 Subject: [PATCH 110/236] more cleanup of include file handling. starting to work on files in packages --- src/OPT/pair_lj_long_coul_long_opt.cpp | 1 + src/PYTHON/fix_python_invoke.cpp | 2 +- src/PYTHON/fix_python_move.cpp | 2 +- src/PYTHON/pair_python.cpp | 2 +- src/PYTHON/python_impl.cpp | 2 +- src/RIGID/fix_ehex.cpp | 7 +-- src/RIGID/fix_ehex.h | 20 ++++----- src/RIGID/fix_rattle.cpp | 11 ----- src/RIGID/fix_rattle.h | 1 - src/RIGID/fix_rigid.cpp | 3 +- src/RIGID/fix_rigid_nh.cpp | 1 - src/RIGID/fix_rigid_nh_small.cpp | 3 +- src/RIGID/fix_rigid_nph.cpp | 1 - src/SHOCK/fix_append_atoms.cpp | 2 +- src/SHOCK/fix_msst.cpp | 5 +-- src/SHOCK/fix_nphug.cpp | 3 -- src/SHOCK/fix_wall_piston.cpp | 2 - src/SNAP/compute_snav_atom.cpp | 3 +- src/SNAP/pair_snap.cpp | 5 +-- src/SNAP/sna.cpp | 8 +--- src/SPIN/compute_spin.cpp | 8 +--- src/SPIN/fix_langevin_spin.cpp | 22 ++-------- src/SPIN/fix_neb_spin.cpp | 4 -- src/SPIN/fix_nve_spin.cpp | 16 +------ src/SPIN/fix_nve_spin.h | 2 - src/SPIN/fix_precession_spin.cpp | 9 +--- src/SPIN/fix_setforce_spin.cpp | 4 -- src/SPIN/min_spin.cpp | 3 -- src/SPIN/neb_spin.cpp | 8 ---- src/SPIN/pair_spin.cpp | 13 +----- src/SPIN/pair_spin.h | 2 +- src/SPIN/pair_spin_dipole_cut.cpp | 4 +- src/SPIN/pair_spin_dipole_long.cpp | 55 ++++++++++++------------ src/SPIN/pair_spin_dmi.cpp | 8 +--- src/SPIN/pair_spin_exchange.cpp | 8 +--- src/SPIN/pair_spin_magelec.cpp | 8 +--- src/SPIN/pair_spin_neel.cpp | 9 +--- src/SRD/fix_srd.cpp | 3 +- src/SRD/fix_wall_srd.cpp | 4 +- src/USER-EFF/atom_vec_electron.cpp | 2 - src/USER-EFF/compute_ke_atom_eff.cpp | 1 - src/USER-EFF/compute_ke_eff.cpp | 2 - src/USER-EFF/compute_temp_deform_eff.cpp | 1 - src/USER-EFF/compute_temp_eff.cpp | 2 - src/USER-EFF/compute_temp_region_eff.cpp | 2 - src/USER-EFF/fix_langevin_eff.cpp | 6 --- src/USER-EFF/fix_nh_eff.cpp | 2 - src/USER-EFF/fix_nve_eff.cpp | 2 - src/USER-EFF/fix_nvt_eff.cpp | 1 - src/USER-EFF/fix_temp_rescale_eff.cpp | 2 - src/USER-EFF/pair_eff_cut.cpp | 3 +- src/USER-PHONON/fix_phonon.cpp | 5 +-- 52 files changed, 75 insertions(+), 230 deletions(-) diff --git a/src/OPT/pair_lj_long_coul_long_opt.cpp b/src/OPT/pair_lj_long_coul_long_opt.cpp index 243b64391f..03853057f4 100644 --- a/src/OPT/pair_lj_long_coul_long_opt.cpp +++ b/src/OPT/pair_lj_long_coul_long_opt.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include +#include #include "pair_lj_long_coul_long_opt.h" #include "atom.h" #include "force.h" diff --git a/src/PYTHON/fix_python_invoke.cpp b/src/PYTHON/fix_python_invoke.cpp index f704bd9741..7fa9861c3f 100644 --- a/src/PYTHON/fix_python_invoke.cpp +++ b/src/PYTHON/fix_python_invoke.cpp @@ -15,7 +15,7 @@ Contributing author: Richard Berger (Temple U) ------------------------------------------------------------------------- */ -#include +#include // IWYU pragma: keep #include #include "fix_python_invoke.h" #include "force.h" diff --git a/src/PYTHON/fix_python_move.cpp b/src/PYTHON/fix_python_move.cpp index 56b7768669..b253df6828 100644 --- a/src/PYTHON/fix_python_move.cpp +++ b/src/PYTHON/fix_python_move.cpp @@ -15,7 +15,7 @@ Contributing author: Richard Berger (Temple U) ------------------------------------------------------------------------- */ -#include +#include // IWYU pragma: keep #include #include "fix_python_move.h" #include "lmppython.h" diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 638077da48..5b8f23400b 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -15,7 +15,7 @@ Contributing authors: Axel Kohlmeyer and Richard Berger (Temple U) ------------------------------------------------------------------------- */ -#include +#include // IWYU pragma: keep #include #include #include "pair_python.h" diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 249d4f7bb1..7456021675 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include // IWYU pragma: keep #include "python_impl.h" #include "force.h" #include "input.h" diff --git a/src/RIGID/fix_ehex.cpp b/src/RIGID/fix_ehex.cpp index 1476c71d3f..0bbdea51c6 100644 --- a/src/RIGID/fix_ehex.cpp +++ b/src/RIGID/fix_ehex.cpp @@ -22,8 +22,8 @@ which implements the heat exchange (HEX) algorithm. ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_ehex.h" #include "atom.h" @@ -33,14 +33,9 @@ #include "force.h" #include "update.h" #include "modify.h" -#include "input.h" -#include "variable.h" #include "memory.h" #include "error.h" #include "fix_shake.h" -#include "neighbor.h" -#include "comm.h" -#include "timer.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/RIGID/fix_ehex.h b/src/RIGID/fix_ehex.h index e29ddac135..860ed3d1f3 100644 --- a/src/RIGID/fix_ehex.h +++ b/src/RIGID/fix_ehex.h @@ -22,8 +22,6 @@ FixStyle(ehex,FixEHEX) #define LMP_FIX_EHEX_H #include "fix.h" -#include "fix_shake.h" -#include "region.h" #define EHEX_DEBUG 0 namespace LAMMPS_NS { @@ -41,9 +39,9 @@ class FixEHEX : public Fix { double memory_usage(); void update_scalingmask(); void com_properties(double *, double *, double *, double*, double *, double*); - bool rescale_atom(int i, Region*region); + bool rescale_atom(int i, class Region *region); virtual void grow_arrays(int nmax); - bool check_cluster(tagint *shake_atom, int n, Region * region); + bool check_cluster(tagint *shake_atom, int n, class Region *region); private: int iregion; @@ -53,14 +51,14 @@ class FixEHEX : public Fix { char *idregion; int me; - double **x; // coordinates - double **f; // forces - double **v; // velocities - double *mass; // masses - double *rmass; // reduced masses - int *type; // atom types + double **x; // coordinates + double **f; // forces + double **v; // velocities + double *mass; // masses + double *rmass; // reduced masses + int *type; // atom types int nlocal; // number of local atoms - FixShake * fshake; // pointer to fix_shake/fix_rattle + class FixShake * fshake; // pointer to fix_shake/fix_rattle int constraints; // constraints (0/1) int cluster; // rescaling entire clusters (0/1) int hex; // HEX mode (0/1) diff --git a/src/RIGID/fix_rattle.cpp b/src/RIGID/fix_rattle.cpp index 403f3091c6..db43b9e82d 100644 --- a/src/RIGID/fix_rattle.cpp +++ b/src/RIGID/fix_rattle.cpp @@ -17,31 +17,20 @@ #include #include -#include #include -#include #include "fix_rattle.h" #include "atom.h" -#include "atom_vec.h" -#include "molecule.h" #include "update.h" -#include "respa.h" #include "modify.h" #include "domain.h" #include "force.h" -#include "bond.h" -#include "angle.h" #include "comm.h" -#include "group.h" -#include "fix_respa.h" -#include "math_const.h" #include "math_extra.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; using namespace MathExtra; // set RATTLE_DEBUG 1 to check constraints at end of timestep diff --git a/src/RIGID/fix_rattle.h b/src/RIGID/fix_rattle.h index 48edaef379..cab148f10c 100644 --- a/src/RIGID/fix_rattle.h +++ b/src/RIGID/fix_rattle.h @@ -20,7 +20,6 @@ FixStyle(rattle,FixRattle) #ifndef LMP_FIX_RATTLE_H #define LMP_FIX_RATTLE_H -#include "fix.h" #include "fix_shake.h" namespace LAMMPS_NS { diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index abb669bc02..19eb22a7fa 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include #include #include "fix_rigid.h" @@ -31,7 +31,6 @@ #include "force.h" #include "input.h" #include "variable.h" -#include "output.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 4acc8d3411..2e1090ec88 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -17,7 +17,6 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include #include #include "fix_rigid_nh.h" diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 5016d3f168..8de588bd9b 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -17,8 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_rigid_nh_small.h" #include "math_extra.h" @@ -32,7 +32,6 @@ #include "comm.h" #include "force.h" #include "kspace.h" -#include "output.h" #include "memory.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_nph.cpp b/src/RIGID/fix_rigid_nph.cpp index 45a4a8d09c..6080fb05af 100644 --- a/src/RIGID/fix_rigid_nph.cpp +++ b/src/RIGID/fix_rigid_nph.cpp @@ -19,7 +19,6 @@ #include #include "fix_rigid_nph.h" -#include "domain.h" #include "modify.h" #include "error.h" diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index 2e515839c5..5e81b75c0d 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include -#include #include "fix_append_atoms.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index c800e8a85d..15ee4d370f 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -17,22 +17,19 @@ see Reed, Fried, Joannopoulos, Phys Rev Lett, 90, 235503 (2003) ------------------------------------------------------------------------- */ +#include #include -#include #include #include "fix_msst.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "output.h" #include "modify.h" #include "fix_external.h" #include "compute.h" #include "kspace.h" #include "update.h" -#include "respa.h" #include "domain.h" -#include "thermo.h" #include "memory.h" #include "error.h" diff --git a/src/SHOCK/fix_nphug.cpp b/src/SHOCK/fix_nphug.cpp index c6df6646cf..5d5a1642c0 100644 --- a/src/SHOCK/fix_nphug.cpp +++ b/src/SHOCK/fix_nphug.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "fix_nphug.h" #include "modify.h" @@ -22,8 +21,6 @@ #include "force.h" #include "domain.h" #include "group.h" -#include "memory.h" -#include "comm.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index eb89e19517..31f70b4174 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -13,10 +13,8 @@ #include #include -#include #include "fix_wall_piston.h" #include "atom.h" -#include "modify.h" #include "domain.h" #include "lattice.h" #include "update.h" diff --git a/src/SNAP/compute_snav_atom.cpp b/src/SNAP/compute_snav_atom.cpp index 1f702496ed..5faf7a1872 100644 --- a/src/SNAP/compute_snav_atom.cpp +++ b/src/SNAP/compute_snav_atom.cpp @@ -10,10 +10,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "sna.h" #include #include #include "compute_snav_atom.h" +#include "sna.h" #include "atom.h" #include "update.h" #include "modify.h" @@ -21,7 +21,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "force.h" -#include "pair.h" #include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index f9ba8922a0..f0f3ef72c6 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -11,24 +11,21 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include #include #include "pair_snap.h" #include "atom.h" -#include "atom_vec.h" #include "force.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "sna.h" -#include "domain.h" #include "memory.h" #include "error.h" -#include - using namespace LAMMPS_NS; #define MAXLINE 1024 diff --git a/src/SNAP/sna.cpp b/src/SNAP/sna.cpp index ec545c51b2..d7d9b5163d 100644 --- a/src/SNAP/sna.cpp +++ b/src/SNAP/sna.cpp @@ -15,17 +15,11 @@ Contributing authors: Aidan Thompson, Christian Trott, SNL ------------------------------------------------------------------------- */ -#include "sna.h" #include +#include "sna.h" #include "math_const.h" -#include "math_extra.h" -#include -#include - #include "memory.h" #include "error.h" -#include "comm.h" -#include "atom.h" using namespace std; using namespace LAMMPS_NS; diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index 0a881e1de6..ec11bc68f2 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -22,20 +22,16 @@ ------------------------------------------------------------------------- */ #include -#include -#include "atom.h" +#include #include "compute_spin.h" -#include "domain.h" +#include "atom.h" #include "error.h" #include "force.h" -#include "math_special.h" #include "math_const.h" #include "memory.h" -#include "modify.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathSpecial; using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/fix_langevin_spin.cpp b/src/SPIN/fix_langevin_spin.cpp index ec6f719a77..6936c701c6 100644 --- a/src/SPIN/fix_langevin_spin.cpp +++ b/src/SPIN/fix_langevin_spin.cpp @@ -21,31 +21,19 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include #include #include -#include - -#include "atom.h" -#include "atom_vec_ellipsoid.h" +#include "fix_langevin_spin.h" #include "comm.h" -#include "compute.h" -#include "domain.h" #include "error.h" -#include "fix_langevin_spin.h" #include "force.h" -#include "group.h" -#include "input.h" #include "math_const.h" -#include "math_extra.h" #include "memory.h" #include "modify.h" -#include "random_mars.h" #include "random_park.h" -#include "region.h" #include "respa.h" #include "update.h" -#include "variable.h" +#include "utils.h" using namespace LAMMPS_NS; using namespace FixConst; @@ -142,13 +130,11 @@ void FixLangevinSpin::init() void FixLangevinSpin::setup(int vflag) { - if (strstr(update->integrate_style,"verlet")) - post_force(vflag); - else { + if (utils::strmatch(update->integrate_style,"^respa")) { ((Respa *) update->integrate)->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); ((Respa *) update->integrate)->copy_f_flevel(nlevels_respa-1); - } + } else post_force(vflag); } /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index a8cb0cd2ca..7ed8967a24 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -23,13 +23,11 @@ #include #include -#include #include #include "fix_neb_spin.h" #include "universe.h" #include "update.h" #include "atom.h" -#include "domain.h" #include "comm.h" #include "modify.h" #include "compute.h" @@ -37,11 +35,9 @@ #include "memory.h" #include "error.h" #include "force.h" -#include "math_const.h" using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; enum{SINGLE_PROC_DIRECT,SINGLE_PROC_MAP,MULTI_PROC}; diff --git a/src/SPIN/fix_nve_spin.cpp b/src/SPIN/fix_nve_spin.cpp index 595ddb0cc2..d35585c7a6 100644 --- a/src/SPIN/fix_nve_spin.cpp +++ b/src/SPIN/fix_nve_spin.cpp @@ -21,38 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include -#include #include - +#include "fix_nve_spin.h" #include "atom.h" -#include "atom_vec.h" #include "citeme.h" #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_nve_spin.h" #include "fix_precession_spin.h" #include "fix_langevin_spin.h" #include "fix_setforce_spin.h" #include "force.h" -#include "math_vector.h" -#include "math_extra.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "pair.h" -#include "pair_hybrid.h" #include "pair_spin.h" -#include "respa.h" #include "update.h" using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; -using namespace MathExtra; static const char cite_fix_nve_spin[] = "fix nve/spin command:\n\n" diff --git a/src/SPIN/fix_nve_spin.h b/src/SPIN/fix_nve_spin.h index 4800575c06..1e3b87c1fb 100644 --- a/src/SPIN/fix_nve_spin.h +++ b/src/SPIN/fix_nve_spin.h @@ -21,8 +21,6 @@ FixStyle(nve/spin,FixNVESpin) #define LMP_FIX_NVE_SPIN_H #include "fix.h" -#include "pair.h" -#include "pair_spin.h" namespace LAMMPS_NS { diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 1ea134d367..7764bb0438 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -21,21 +21,16 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include +#include "fix_precession_spin.h" #include "atom.h" #include "error.h" -#include "domain.h" -#include "error.h" -#include "fix_precession_spin.h" #include "force.h" #include "input.h" #include "math_const.h" -#include "memory.h" #include "modify.h" -#include "neigh_list.h" #include "respa.h" #include "update.h" #include "variable.h" diff --git a/src/SPIN/fix_setforce_spin.cpp b/src/SPIN/fix_setforce_spin.cpp index c2807418ec..1ab35c9663 100644 --- a/src/SPIN/fix_setforce_spin.cpp +++ b/src/SPIN/fix_setforce_spin.cpp @@ -21,7 +21,6 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include #include #include "fix_setforce_spin.h" #include "atom.h" @@ -29,12 +28,9 @@ #include "modify.h" #include "domain.h" #include "region.h" -#include "respa.h" #include "input.h" #include "variable.h" #include "memory.h" -#include "error.h" -#include "force.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/SPIN/min_spin.cpp b/src/SPIN/min_spin.cpp index 2bddc110e7..3a330f448a 100644 --- a/src/SPIN/min_spin.cpp +++ b/src/SPIN/min_spin.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include "min_spin.h" #include "universe.h" @@ -29,8 +28,6 @@ #include "output.h" #include "timer.h" #include "error.h" -#include "modify.h" -#include "math_special.h" #include "math_const.h" using namespace LAMMPS_NS; diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 46a0541488..400ce3d363 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -21,18 +21,12 @@ Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ -// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h -// due to OpenMPI bug which sets INT64_MAX via its mpi.h -// before lmptype.h can set flags to insure it is done correctly - -#include "lmptype.h" #include #include #include #include #include "neb_spin.h" #include "citeme.h" -#include "compute.h" #include "force.h" #include "universe.h" #include "atom.h" @@ -49,10 +43,8 @@ #include "timer.h" #include "memory.h" #include "error.h" -#include "math_const.h" using namespace LAMMPS_NS; -using namespace MathConst; static const char cite_neb_spin[] = "neb/spin command:\n\n" diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index 929b79bef3..93d9a1e127 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -21,26 +21,15 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include -#include #include - +#include "pair_spin.h" #include "atom.h" -#include "comm.h" #include "error.h" #include "fix.h" -#include "fix_nve_spin.h" #include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" -#include "memory.h" #include "modify.h" #include "pair.h" -#include "pair_hybrid.h" -#include "pair_hybrid_overlay.h" -#include "pair_spin.h" #include "update.h" using namespace LAMMPS_NS; diff --git a/src/SPIN/pair_spin.h b/src/SPIN/pair_spin.h index 1be8550c65..3a909e1d13 100644 --- a/src/SPIN/pair_spin.h +++ b/src/SPIN/pair_spin.h @@ -14,7 +14,7 @@ #ifndef LMP_PAIR_SPIN_H #define LMP_PAIR_SPIN_H -#include "pair.h" +#include "pair.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index 4ff198488a..8d9b5b8f2b 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -21,9 +21,8 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_spin_dipole_cut.h" #include "atom.h" @@ -31,6 +30,7 @@ #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" +#include "fix.h" #include "fix_nve_spin.h" #include "force.h" #include "math_const.h" diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index e3575a6a07..84c55a8c3c 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -13,20 +13,19 @@ /* ------------------------------------------------------------------------ Contributing authors: Julien Tranchida (SNL) - Stan Moore (SNL) + Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include - #include "pair_spin_dipole_long.h" #include "atom.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" +#include "fix.h" #include "fix_nve_spin.h" #include "force.h" #include "kspace.h" @@ -59,12 +58,12 @@ lockfixnvespin(NULL) no_virial_fdotr_compute = 1; lattice_flag = 0; - hbar = force->hplanck/MY_2PI; // eV/(rad.THz) + hbar = force->hplanck/MY_2PI; // eV/(rad.THz) mub = 9.274e-4; // in A.Ang^2 mu_0 = 785.15; // in eV/Ang/A^2 mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV.Ang^3 - //mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV - mub2mu0hbinv = mub2mu0 / hbar; // in rad.THz + //mub2mu0 = mub * mub * mu_0 / (4.0*MY_PI); // in eV + mub2mu0hbinv = mub2mu0 / hbar; // in rad.THz } @@ -243,7 +242,7 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) double **x = atom->x; double **f = atom->f; double **fm = atom->fm; - double **sp = atom->sp; + double **sp = atom->sp; int *type = atom->type; int nlocal = atom->nlocal; int newton_pair = force->newton_pair; @@ -314,36 +313,36 @@ void PairSpinDipoleLong::compute(int eflag, int vflag) bij[2] = (3.0*bij[1] + pre2*expm2) * r2inv; bij[3] = (5.0*bij[2] + pre3*expm2) * r2inv; - compute_long(i,j,eij,bij,fmi,spi,spj); - compute_long_mech(i,j,eij,bij,fmi,spi,spj); + compute_long(i,j,eij,bij,fmi,spi,spj); + compute_long_mech(i,j,eij,bij,fmi,spi,spj); } // force accumulation - f[i][0] += fi[0]; - f[i][1] += fi[1]; + f[i][0] += fi[0]; + f[i][1] += fi[1]; f[i][2] += fi[2]; - fm[i][0] += fmi[0]; - fm[i][1] += fmi[1]; + fm[i][0] += fmi[0]; + fm[i][1] += fmi[1]; fm[i][2] += fmi[2]; if (newton_pair || j < nlocal) { - f[j][0] -= fi[0]; - f[j][1] -= fi[1]; + f[j][0] -= fi[0]; + f[j][1] -= fi[1]; f[j][2] -= fi[2]; } if (eflag) { - if (rsq <= local_cut2) { - evdwl -= spi[0]*fmi[0] + spi[1]*fmi[1] + - spi[2]*fmi[2]; - evdwl *= hbar; - } + if (rsq <= local_cut2) { + evdwl -= spi[0]*fmi[0] + spi[1]*fmi[1] + + spi[2]*fmi[2]; + evdwl *= hbar; + } } else evdwl = 0.0; if (evflag) ev_tally_xyz(i,j,nlocal,newton_pair, - evdwl,ecoul,fi[0],fi[1],fi[2],rij[0],rij[1],rij[2]); + evdwl,ecoul,fi[0],fi[1],fi[2],rij[0],rij[1],rij[2]); } } @@ -365,7 +364,7 @@ void PairSpinDipoleLong::compute_single_pair(int ii, double fmi[3]) int *type = atom->type; double **x = atom->x; - double **sp = atom->sp; + double **sp = atom->sp; double **fm_long = atom->fm_long; ilist = list->ilist; @@ -550,7 +549,7 @@ void PairSpinDipoleLong::write_restart(FILE *fp) for (j = i; j <= atom->ntypes; j++) { fwrite(&setflag[i][j],sizeof(int),1,fp); if (setflag[i][j]) { - fwrite(&cut_spin_long[i][j],sizeof(int),1,fp); + fwrite(&cut_spin_long[i][j],sizeof(int),1,fp); } } } @@ -573,10 +572,10 @@ void PairSpinDipoleLong::read_restart(FILE *fp) if (me == 0) fread(&setflag[i][j],sizeof(int),1,fp); MPI_Bcast(&setflag[i][j],1,MPI_INT,0,world); if (setflag[i][j]) { - if (me == 0) { - fread(&cut_spin_long[i][j],sizeof(int),1,fp); - } - MPI_Bcast(&cut_spin_long[i][j],1,MPI_INT,0,world); + if (me == 0) { + fread(&cut_spin_long[i][j],sizeof(int),1,fp); + } + MPI_Bcast(&cut_spin_long[i][j],1,MPI_INT,0,world); } } } diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 41430d230f..651f4397bd 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -21,28 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_dmi.h" #include "atom.h" #include "comm.h" #include "error.h" #include "force.h" #include "fix.h" #include "fix_nve_spin.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_dmi.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index 93b6d9501e..059a8f5f34 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -21,28 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_exchange.h" #include "atom.h" #include "comm.h" #include "error.h" #include "fix.h" #include "fix_nve_spin.h" #include "force.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_exchange.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_magelec.cpp b/src/SPIN/pair_spin_magelec.cpp index 1f1488b93c..55b96582c8 100644 --- a/src/SPIN/pair_spin_magelec.cpp +++ b/src/SPIN/pair_spin_magelec.cpp @@ -21,28 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_magelec.h" #include "atom.h" #include "comm.h" #include "error.h" #include "fix.h" #include "fix_nve_spin.h" #include "force.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_magelec.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index 03041da17f..4d68dbdc22 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -21,29 +21,24 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include #include -#include #include - +#include "pair_spin_neel.h" #include "atom.h" #include "comm.h" #include "error.h" -#include "force.h" #include "fix.h" #include "fix_nve_spin.h" #include "force.h" -#include "pair_hybrid.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "modify.h" -#include "pair_spin_neel.h" #include "update.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index d87d2b5e56..a20ec212fd 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -15,9 +15,9 @@ Contributing authors: Jeremy Lechman (SNL), Pieter in 't Veld (BASF) ------------------------------------------------------------------------- */ +#include #include #include -#include #include "fix_srd.h" #include "math_extra.h" #include "atom.h" @@ -27,7 +27,6 @@ #include "group.h" #include "update.h" #include "force.h" -#include "pair.h" #include "domain.h" #include "neighbor.h" #include "comm.h" diff --git a/src/SRD/fix_wall_srd.cpp b/src/SRD/fix_wall_srd.cpp index 24b0c3cec5..cb0f023640 100644 --- a/src/SRD/fix_wall_srd.cpp +++ b/src/SRD/fix_wall_srd.cpp @@ -11,11 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include #include "fix_wall_srd.h" -#include "atom.h" -#include "modify.h" #include "fix.h" #include "domain.h" #include "lattice.h" diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index 1bc5387c9e..5de78f7510 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -15,7 +15,6 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include #include #include #include "atom_vec_electron.h" @@ -23,7 +22,6 @@ #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "citeme.h" #include "memory.h" diff --git a/src/USER-EFF/compute_ke_atom_eff.cpp b/src/USER-EFF/compute_ke_atom_eff.cpp index b1b87cd3df..c943366f1b 100644 --- a/src/USER-EFF/compute_ke_atom_eff.cpp +++ b/src/USER-EFF/compute_ke_atom_eff.cpp @@ -15,7 +15,6 @@ Contributing author: Andres Jaramillo-Botero ------------------------------------------------------------------------- */ -#include #include #include #include "compute_ke_atom_eff.h" diff --git a/src/USER-EFF/compute_ke_eff.cpp b/src/USER-EFF/compute_ke_eff.cpp index b4f571cb63..3e277fc66c 100644 --- a/src/USER-EFF/compute_ke_eff.cpp +++ b/src/USER-EFF/compute_ke_eff.cpp @@ -16,14 +16,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include "compute_ke_eff.h" #include "atom.h" #include "update.h" #include "force.h" #include "domain.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-EFF/compute_temp_deform_eff.cpp b/src/USER-EFF/compute_temp_deform_eff.cpp index 23abb4f99d..7a12a69982 100644 --- a/src/USER-EFF/compute_temp_deform_eff.cpp +++ b/src/USER-EFF/compute_temp_deform_eff.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include "compute_temp_deform_eff.h" diff --git a/src/USER-EFF/compute_temp_eff.cpp b/src/USER-EFF/compute_temp_eff.cpp index 956461adf1..d745269ff5 100644 --- a/src/USER-EFF/compute_temp_eff.cpp +++ b/src/USER-EFF/compute_temp_eff.cpp @@ -17,8 +17,6 @@ #include #include -#include -#include #include "compute_temp_eff.h" #include "atom.h" #include "update.h" diff --git a/src/USER-EFF/compute_temp_region_eff.cpp b/src/USER-EFF/compute_temp_region_eff.cpp index 659bdfca5e..cec87b29ab 100644 --- a/src/USER-EFF/compute_temp_region_eff.cpp +++ b/src/USER-EFF/compute_temp_region_eff.cpp @@ -16,14 +16,12 @@ ------------------------------------------------------------------------- */ #include -#include #include #include #include "compute_temp_region_eff.h" #include "atom.h" #include "update.h" #include "force.h" -#include "modify.h" #include "domain.h" #include "region.h" #include "group.h" diff --git a/src/USER-EFF/fix_langevin_eff.cpp b/src/USER-EFF/fix_langevin_eff.cpp index d362113997..5158d7c681 100644 --- a/src/USER-EFF/fix_langevin_eff.cpp +++ b/src/USER-EFF/fix_langevin_eff.cpp @@ -17,19 +17,13 @@ #include #include -#include #include #include "fix_langevin_eff.h" -#include "math_extra.h" #include "atom.h" -#include "force.h" #include "update.h" #include "modify.h" #include "compute.h" #include "domain.h" -#include "region.h" -#include "respa.h" -#include "comm.h" #include "input.h" #include "variable.h" #include "random_mars.h" diff --git a/src/USER-EFF/fix_nh_eff.cpp b/src/USER-EFF/fix_nh_eff.cpp index 3e0a59612c..034233732e 100644 --- a/src/USER-EFF/fix_nh_eff.cpp +++ b/src/USER-EFF/fix_nh_eff.cpp @@ -15,12 +15,10 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include #include #include "fix_nh_eff.h" #include "atom.h" #include "atom_vec.h" -#include "group.h" #include "error.h" #include "domain.h" diff --git a/src/USER-EFF/fix_nve_eff.cpp b/src/USER-EFF/fix_nve_eff.cpp index 699dd9f949..ea719c91c0 100644 --- a/src/USER-EFF/fix_nve_eff.cpp +++ b/src/USER-EFF/fix_nve_eff.cpp @@ -15,8 +15,6 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include #include #include #include "fix_nve_eff.h" diff --git a/src/USER-EFF/fix_nvt_eff.cpp b/src/USER-EFF/fix_nvt_eff.cpp index 9e23ee023b..8516accd31 100644 --- a/src/USER-EFF/fix_nvt_eff.cpp +++ b/src/USER-EFF/fix_nvt_eff.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include -#include #include "fix_nvt_eff.h" #include "group.h" #include "modify.h" diff --git a/src/USER-EFF/fix_temp_rescale_eff.cpp b/src/USER-EFF/fix_temp_rescale_eff.cpp index 37f45b3c28..4a8f4b0372 100644 --- a/src/USER-EFF/fix_temp_rescale_eff.cpp +++ b/src/USER-EFF/fix_temp_rescale_eff.cpp @@ -23,8 +23,6 @@ #include "force.h" #include "group.h" #include "update.h" -#include "domain.h" -#include "region.h" #include "comm.h" #include "modify.h" #include "compute.h" diff --git a/src/USER-EFF/pair_eff_cut.cpp b/src/USER-EFF/pair_eff_cut.cpp index f566922ef7..a4c0557620 100644 --- a/src/USER-EFF/pair_eff_cut.cpp +++ b/src/USER-EFF/pair_eff_cut.cpp @@ -15,8 +15,8 @@ Contributing author: Andres Jaramillo-Botero ------------------------------------------------------------------------- */ +#include #include -#include #include #include #include "pair_eff_cut.h" @@ -31,7 +31,6 @@ #include "neigh_list.h" #include "memory.h" #include "error.h" -#include "atom_vec_electron.h" using namespace LAMMPS_NS; diff --git a/src/USER-PHONON/fix_phonon.cpp b/src/USER-PHONON/fix_phonon.cpp index cdbe4068bc..9b663ce383 100644 --- a/src/USER-PHONON/fix_phonon.cpp +++ b/src/USER-PHONON/fix_phonon.cpp @@ -23,8 +23,8 @@ konglt@sjtu.edu.cn; konglt@gmail.com ------------------------------------------------------------------------- */ -#include -#include +#include +#include #include #include "fix_phonon.h" #include "fft3d_wrap.h" @@ -33,7 +33,6 @@ #include "domain.h" #include "force.h" #include "group.h" -#include "lattice.h" #include "modify.h" #include "update.h" #include "citeme.h" -- GitLab From 350d8f581275b43aceb8c2c14d59701ec2c4b3dd Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Tue, 2 Jul 2019 15:51:52 +0200 Subject: [PATCH 111/236] Missing some hybridpair replacement --- doc/src/compute_pressure.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/compute_pressure.txt b/doc/src/compute_pressure.txt index b8d52b83de..9b27413cfc 100644 --- a/doc/src/compute_pressure.txt +++ b/doc/src/compute_pressure.txt @@ -16,7 +16,7 @@ ID, group-ID are documented in "compute"_compute.html command pressure = style name of this compute command temp-ID = ID of compute that calculates temperature, can be NULL if not needed zero or more keywords may be appended -keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} or {hybridpair} :ul +keyword = {ke} or {pair} or {bond} or {angle} or {dihedral} or {improper} or {kspace} or {fix} or {virial} or {pair/hybrid} :ul [Examples:] @@ -68,7 +68,7 @@ extra keywords are listed, then only those components are summed to compute temperature or ke and/or the virial. The {virial} keyword means include all terms except the kinetic energy {ke}. -The {hybridpair} keyword means to only include contribution +The {pair/hybrid} keyword means to only include contribution from a sub-style in a {hybrid} or {hybrid/overlay} pair style. Details of how LAMMPS computes the virial efficiently for the entire -- GitLab From 9984cbc99a371665d933e974bb0c84e66c720846 Mon Sep 17 00:00:00 2001 From: Julien Devemy Date: Tue, 2 Jul 2019 16:13:20 +0200 Subject: [PATCH 112/236] Recheck existence of pair style in init --- src/compute_pressure.cpp | 16 +++++++++++++++- src/compute_pressure.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index d586b7d953..2f412c23a0 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -87,7 +87,7 @@ ComputePressure::ComputePressure(LAMMPS *lmp, int narg, char **arg) : pstyle = new char[n]; strcpy(pstyle,arg[iarg++]); - int nsub = 0; + nsub = 0; if (narg > iarg) { if (isdigit(arg[iarg][0])) { @@ -166,6 +166,20 @@ void ComputePressure::init() temperature = modify->compute[icompute]; } + // recheck if pair style with and without suffix exists + + if (pairhybridflag) { + pairhybrid = (Pair *) force->pair_match(pstyle,1,nsub); + if (!pairhybrid && lmp->suffix) { + strcat(pstyle,"/"); + strcat(pstyle,lmp->suffix); + pairhybrid = (Pair *) force->pair_match(pstyle,1,nsub); + } + + if (!pairhybrid) + error->all(FLERR,"Unrecognized pair style in compute pressure command"); + } + // detect contributions to virial // vptr points to all virial[6] contributions diff --git a/src/compute_pressure.h b/src/compute_pressure.h index 76a4066179..8d0ec4aa04 100644 --- a/src/compute_pressure.h +++ b/src/compute_pressure.h @@ -50,6 +50,7 @@ class ComputePressure : public Compute { private: char *pstyle; + int nsub; }; } -- GitLab From 11708c8f96aa0f020d8c562a577940578ec4882a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 2 Jul 2019 12:07:26 -0400 Subject: [PATCH 113/236] continue cleaning up include files based on IWYU --- src/npair_skip_respa.cpp | 3 --- src/npair_skip_size.cpp | 2 -- src/npair_skip_size_off2on.cpp | 2 -- src/npair_skip_size_off2on_oneside.cpp | 2 -- src/nstencil_full_bin_2d.cpp | 2 -- src/nstencil_full_bin_3d.cpp | 2 -- src/nstencil_full_ghost_bin_2d.cpp | 2 -- src/nstencil_full_ghost_bin_3d.cpp | 2 -- src/nstencil_full_multi_2d.cpp | 2 -- src/nstencil_full_multi_3d.cpp | 2 -- src/nstencil_half_bin_2d_newtoff.cpp | 2 -- src/nstencil_half_bin_2d_newton.cpp | 2 -- src/nstencil_half_bin_2d_newton_tri.cpp | 2 -- src/nstencil_half_bin_3d_newtoff.cpp | 2 -- src/nstencil_half_bin_3d_newton.cpp | 2 -- src/nstencil_half_bin_3d_newton_tri.cpp | 2 -- src/nstencil_half_ghost_bin_2d_newtoff.cpp | 2 -- src/nstencil_half_ghost_bin_3d_newtoff.cpp | 2 -- src/nstencil_half_multi_2d_newtoff.cpp | 2 -- src/nstencil_half_multi_2d_newton.cpp | 2 -- src/nstencil_half_multi_2d_newton_tri.cpp | 2 -- src/nstencil_half_multi_3d_newtoff.cpp | 2 -- src/nstencil_half_multi_3d_newton.cpp | 2 -- src/nstencil_half_multi_3d_newton_tri.cpp | 2 -- src/ntopo.cpp | 2 +- src/output.cpp | 3 --- src/pair.cpp | 10 ++-------- src/pair_beck.cpp | 3 +-- src/pair_born.cpp | 3 +-- src/pair_born_coul_dsf.cpp | 4 +--- src/pair_born_coul_wolf.cpp | 4 +--- src/pair_buck.cpp | 3 +-- src/pair_coul_debye.cpp | 6 +----- src/pair_coul_dsf.cpp | 3 +-- src/pair_coul_streitz.cpp | 4 +--- src/pair_coul_wolf.cpp | 4 +--- src/pair_dpd.cpp | 4 +--- src/pair_dpd_tstat.cpp | 1 + src/pair_gauss.cpp | 4 +--- src/pair_hybrid.cpp | 3 +-- src/pair_hybrid_overlay.cpp | 3 --- src/pair_lj96_cut.cpp | 4 +--- src/pair_lj_cubic.cpp | 5 +---- src/pair_lj_cut.cpp | 4 +--- 44 files changed, 19 insertions(+), 107 deletions(-) diff --git a/src/npair_skip_respa.cpp b/src/npair_skip_respa.cpp index 1d4eda5354..68436654b2 100644 --- a/src/npair_skip_respa.cpp +++ b/src/npair_skip_respa.cpp @@ -12,12 +12,9 @@ ------------------------------------------------------------------------- */ #include "npair_skip_respa.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/npair_skip_size.cpp b/src/npair_skip_size.cpp index 67717ae576..436d21f76f 100644 --- a/src/npair_skip_size.cpp +++ b/src/npair_skip_size.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_skip_size.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_skip_size_off2on.cpp b/src/npair_skip_size_off2on.cpp index 74a80e6d3d..cd674ff777 100644 --- a/src/npair_skip_size_off2on.cpp +++ b/src/npair_skip_size_off2on.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_skip_size_off2on.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/npair_skip_size_off2on_oneside.cpp b/src/npair_skip_size_off2on_oneside.cpp index a042acd1c6..0540592cba 100644 --- a/src/npair_skip_size_off2on_oneside.cpp +++ b/src/npair_skip_size_off2on_oneside.cpp @@ -11,9 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_skip_size_off2on_oneside.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/nstencil_full_bin_2d.cpp b/src/nstencil_full_bin_2d.cpp index 0986c40dd4..b18d990bba 100644 --- a/src/nstencil_full_bin_2d.cpp +++ b/src/nstencil_full_bin_2d.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_full_bin_2d.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_full_bin_3d.cpp b/src/nstencil_full_bin_3d.cpp index b6a2198132..46ec073ddd 100644 --- a/src/nstencil_full_bin_3d.cpp +++ b/src/nstencil_full_bin_3d.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_full_bin_3d.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_full_ghost_bin_2d.cpp b/src/nstencil_full_ghost_bin_2d.cpp index bbbf1a4466..5ac19569c5 100644 --- a/src/nstencil_full_ghost_bin_2d.cpp +++ b/src/nstencil_full_ghost_bin_2d.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_full_ghost_bin_2d.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_full_ghost_bin_3d.cpp b/src/nstencil_full_ghost_bin_3d.cpp index e9abca2174..6ee56516dc 100644 --- a/src/nstencil_full_ghost_bin_3d.cpp +++ b/src/nstencil_full_ghost_bin_3d.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_full_ghost_bin_3d.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_full_multi_2d.cpp b/src/nstencil_full_multi_2d.cpp index ed2ffe11dc..c69c53a761 100644 --- a/src/nstencil_full_multi_2d.cpp +++ b/src/nstencil_full_multi_2d.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_full_multi_2d.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_full_multi_3d.cpp b/src/nstencil_full_multi_3d.cpp index c171bfadc5..df47c1e7e9 100644 --- a/src/nstencil_full_multi_3d.cpp +++ b/src/nstencil_full_multi_3d.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_full_multi_3d.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_bin_2d_newtoff.cpp b/src/nstencil_half_bin_2d_newtoff.cpp index e51db6fe7a..f3a6c5d08b 100644 --- a/src/nstencil_half_bin_2d_newtoff.cpp +++ b/src/nstencil_half_bin_2d_newtoff.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_2d_newtoff.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_bin_2d_newton.cpp b/src/nstencil_half_bin_2d_newton.cpp index 9479bbf0c8..8fdc8f1aa9 100644 --- a/src/nstencil_half_bin_2d_newton.cpp +++ b/src/nstencil_half_bin_2d_newton.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_2d_newton.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_bin_2d_newton_tri.cpp b/src/nstencil_half_bin_2d_newton_tri.cpp index 4f89b1c326..30d064fb29 100644 --- a/src/nstencil_half_bin_2d_newton_tri.cpp +++ b/src/nstencil_half_bin_2d_newton_tri.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_2d_newton_tri.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_bin_3d_newtoff.cpp b/src/nstencil_half_bin_3d_newtoff.cpp index 433de400c2..e44a93d47d 100644 --- a/src/nstencil_half_bin_3d_newtoff.cpp +++ b/src/nstencil_half_bin_3d_newtoff.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_3d_newtoff.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_bin_3d_newton.cpp b/src/nstencil_half_bin_3d_newton.cpp index 24c234c004..998ed28afe 100644 --- a/src/nstencil_half_bin_3d_newton.cpp +++ b/src/nstencil_half_bin_3d_newton.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_3d_newton.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_bin_3d_newton_tri.cpp b/src/nstencil_half_bin_3d_newton_tri.cpp index 691ce0bb80..2aae44ceaf 100644 --- a/src/nstencil_half_bin_3d_newton_tri.cpp +++ b/src/nstencil_half_bin_3d_newton_tri.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_3d_newton_tri.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_ghost_bin_2d_newtoff.cpp b/src/nstencil_half_ghost_bin_2d_newtoff.cpp index 4bb0ecafe2..6f9a7585fe 100644 --- a/src/nstencil_half_ghost_bin_2d_newtoff.cpp +++ b/src/nstencil_half_ghost_bin_2d_newtoff.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_ghost_bin_2d_newtoff.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_ghost_bin_3d_newtoff.cpp b/src/nstencil_half_ghost_bin_3d_newtoff.cpp index 1026b11542..6492fe4a4e 100644 --- a/src/nstencil_half_ghost_bin_3d_newtoff.cpp +++ b/src/nstencil_half_ghost_bin_3d_newtoff.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_ghost_bin_3d_newtoff.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_multi_2d_newtoff.cpp b/src/nstencil_half_multi_2d_newtoff.cpp index 567abe2878..63cd3fd524 100644 --- a/src/nstencil_half_multi_2d_newtoff.cpp +++ b/src/nstencil_half_multi_2d_newtoff.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_multi_2d_newtoff.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_multi_2d_newton.cpp b/src/nstencil_half_multi_2d_newton.cpp index 5dc2c37148..f6f6c488a5 100644 --- a/src/nstencil_half_multi_2d_newton.cpp +++ b/src/nstencil_half_multi_2d_newton.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_multi_2d_newton.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_multi_2d_newton_tri.cpp b/src/nstencil_half_multi_2d_newton_tri.cpp index 59a5a1d19e..b44ab36ea0 100644 --- a/src/nstencil_half_multi_2d_newton_tri.cpp +++ b/src/nstencil_half_multi_2d_newton_tri.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_multi_2d_newton_tri.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_multi_3d_newtoff.cpp b/src/nstencil_half_multi_3d_newtoff.cpp index 72b882dddc..5a83c4e002 100644 --- a/src/nstencil_half_multi_3d_newtoff.cpp +++ b/src/nstencil_half_multi_3d_newtoff.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_multi_3d_newtoff.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_multi_3d_newton.cpp b/src/nstencil_half_multi_3d_newton.cpp index 9a5d5cab65..5b0c7f9f63 100644 --- a/src/nstencil_half_multi_3d_newton.cpp +++ b/src/nstencil_half_multi_3d_newton.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_multi_3d_newton.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/nstencil_half_multi_3d_newton_tri.cpp b/src/nstencil_half_multi_3d_newton_tri.cpp index 953beb3211..b25a0d0bdb 100644 --- a/src/nstencil_half_multi_3d_newton_tri.cpp +++ b/src/nstencil_half_multi_3d_newton_tri.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_multi_3d_newton_tri.h" -#include "neighbor.h" -#include "neigh_list.h" #include "atom.h" using namespace LAMMPS_NS; diff --git a/src/ntopo.cpp b/src/ntopo.cpp index 8a87a5d6e5..05e287e192 100644 --- a/src/ntopo.cpp +++ b/src/ntopo.cpp @@ -11,7 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include #include "ntopo.h" #include "atom.h" #include "neighbor.h" diff --git a/src/output.cpp b/src/output.cpp index 6253d7de37..fb2f9a700d 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -11,8 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include #include "output.h" #include "style_dump.h" @@ -26,7 +24,6 @@ #include "domain.h" #include "thermo.h" #include "modify.h" -#include "compute.h" #include "force.h" #include "dump.h" #include "write_restart.h" diff --git a/src/pair.cpp b/src/pair.cpp index 2b4863a54c..3d7bdaa62c 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -16,23 +16,17 @@ ------------------------------------------------------------------------- */ #include -#include -#include -#include +#include // IWYU pragma: keep +#include // IWYU pragma: keep #include -#include -#include #include #include "pair.h" #include "atom.h" #include "neighbor.h" -#include "neigh_list.h" #include "domain.h" #include "comm.h" #include "force.h" #include "kspace.h" -#include "update.h" -#include "modify.h" #include "compute.h" #include "suffix.h" #include "atom_masks.h" diff --git a/src/pair_beck.cpp b/src/pair_beck.cpp index 17731ebf0b..8ba3ef80f2 100644 --- a/src/pair_beck.cpp +++ b/src/pair_beck.cpp @@ -15,9 +15,8 @@ Contributing author: Jonathan Zimmerman (Sandia) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include "pair_beck.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_born.cpp b/src/pair_born.cpp index 78434c91f8..ae7456ddbb 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -15,9 +15,8 @@ Contributing Author: Sai Jayaraman (Sandia) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_born.h" #include "atom.h" diff --git a/src/pair_born_coul_dsf.cpp b/src/pair_born_coul_dsf.cpp index 2e565897b5..51b9a2677d 100644 --- a/src/pair_born_coul_dsf.cpp +++ b/src/pair_born_coul_dsf.cpp @@ -16,10 +16,8 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ +#include #include -#include -#include -#include #include "pair_born_coul_dsf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_born_coul_wolf.cpp b/src/pair_born_coul_wolf.cpp index 3bb0e39e57..f4ccac80a1 100644 --- a/src/pair_born_coul_wolf.cpp +++ b/src/pair_born_coul_wolf.cpp @@ -15,10 +15,8 @@ Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov ------------------------------------------------------------------------- */ +#include #include -#include -#include -#include #include "pair_born_coul_wolf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index a3cf1a38d6..b9795fb0ed 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_buck.h" #include "atom.h" diff --git a/src/pair_coul_debye.cpp b/src/pair_coul_debye.cpp index c8afdabb93..cd23ef1919 100644 --- a/src/pair_coul_debye.cpp +++ b/src/pair_coul_debye.cpp @@ -11,17 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include -#include -#include #include "pair_coul_debye.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/pair_coul_dsf.cpp b/src/pair_coul_dsf.cpp index e487ff171c..4c15b5d330 100644 --- a/src/pair_coul_dsf.cpp +++ b/src/pair_coul_dsf.cpp @@ -16,9 +16,8 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_coul_dsf.h" #include "atom.h" diff --git a/src/pair_coul_streitz.cpp b/src/pair_coul_streitz.cpp index 282c855249..f577564ac1 100644 --- a/src/pair_coul_streitz.cpp +++ b/src/pair_coul_streitz.cpp @@ -15,8 +15,8 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include #include -#include #include #include #include "pair_coul_streitz.h" @@ -27,8 +27,6 @@ #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "group.h" -#include "update.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/pair_coul_wolf.cpp b/src/pair_coul_wolf.cpp index dbf21b8bee..8c15378de8 100644 --- a/src/pair_coul_wolf.cpp +++ b/src/pair_coul_wolf.cpp @@ -15,10 +15,8 @@ Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov ------------------------------------------------------------------------- */ +#include #include -#include -#include -#include #include "pair_coul_wolf.h" #include "atom.h" #include "comm.h" diff --git a/src/pair_dpd.cpp b/src/pair_dpd.cpp index 914b4aee17..e5e6cf7dae 100644 --- a/src/pair_dpd.cpp +++ b/src/pair_dpd.cpp @@ -15,12 +15,10 @@ Contributing author: Kurt Smith (U Pittsburgh) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include "pair_dpd.h" #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "update.h" #include "force.h" diff --git a/src/pair_dpd_tstat.cpp b/src/pair_dpd_tstat.cpp index 1207c954eb..66c8d91ab1 100644 --- a/src/pair_dpd_tstat.cpp +++ b/src/pair_dpd_tstat.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "pair_dpd_tstat.h" #include "atom.h" diff --git a/src/pair_gauss.cpp b/src/pair_gauss.cpp index 2d157d6cac..7df9a417c3 100644 --- a/src/pair_gauss.cpp +++ b/src/pair_gauss.cpp @@ -15,15 +15,13 @@ Contributing author: Sai Jayaraman (Sandia) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_gauss.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 9aff8a387a..daeee3d2b3 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -12,8 +12,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include #include #include #include "pair_hybrid.h" diff --git a/src/pair_hybrid_overlay.cpp b/src/pair_hybrid_overlay.cpp index 717c0de1d1..496e3d0406 100644 --- a/src/pair_hybrid_overlay.cpp +++ b/src/pair_hybrid_overlay.cpp @@ -11,14 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include #include #include "pair_hybrid_overlay.h" #include "atom.h" #include "force.h" -#include "neighbor.h" -#include "neigh_request.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index cefe9b87e0..62e645ef2c 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -15,9 +15,8 @@ Contributing author: Chuanfu Luo (luochuanfu@gmail.com) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_lj96_cut.h" #include "atom.h" @@ -27,7 +26,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory.h" diff --git a/src/pair_lj_cubic.cpp b/src/pair_lj_cubic.cpp index fdbfca608f..8b1b4b7627 100644 --- a/src/pair_lj_cubic.cpp +++ b/src/pair_lj_cubic.cpp @@ -16,15 +16,12 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include #include -#include -#include -#include #include "pair_lj_cubic.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index 2a0fcde3a5..9284923218 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -15,9 +15,8 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_lj_cut.h" #include "atom.h" @@ -27,7 +26,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory.h" -- GitLab From 0c4af8b820f4d6f559d07086db91a2c1dee67a47 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Tue, 2 Jul 2019 22:13:06 -0600 Subject: [PATCH 114/236] spelling: attempt add file paths to false positives --- doc/utils/sphinx-config/conf.py | 3 +++ doc/utils/sphinx-config/custom_filters.py | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 doc/utils/sphinx-config/custom_filters.py diff --git a/doc/utils/sphinx-config/conf.py b/doc/utils/sphinx-config/conf.py index 29de3af156..646fbd2e94 100644 --- a/doc/utils/sphinx-config/conf.py +++ b/doc/utils/sphinx-config/conf.py @@ -312,3 +312,6 @@ if spelling_spec: spelling_lang='en_US' spelling_word_list_filename='false_positives.txt' + + from custom_filters import PathFilter + spelling_filters = [PathFilter] diff --git a/doc/utils/sphinx-config/custom_filters.py b/doc/utils/sphinx-config/custom_filters.py new file mode 100644 index 0000000000..3df26854e4 --- /dev/null +++ b/doc/utils/sphinx-config/custom_filters.py @@ -0,0 +1,9 @@ +class PathFilter(Filter): + r"""Filter skipping over simple file paths + """ + _DOC_ERRORS = ["zA"] + _pattern = re.compile(r"\/[^\s].*") + def _skip(self,word): + if self._pattern.match(word): + return True + return False -- GitLab From 7967cb11339b3ae52e9de9c671e5c611b1d9b1f2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 2 Jul 2019 22:56:56 -0400 Subject: [PATCH 115/236] put implementation header first to avoid issues with mpi.h and lmptype.h with OpenMPI --- doc/include-file-conventions.md | 4 ++-- src/angle.h | 2 +- src/angle_deprecated.cpp | 5 +++-- src/angle_hybrid.cpp | 2 +- src/angle_zero.cpp | 2 +- src/atom.cpp | 2 +- src/atom_map.cpp | 2 +- src/atom_vec.cpp | 2 +- src/atom_vec_atomic.cpp | 2 +- src/atom_vec_body.cpp | 2 +- src/atom_vec_charge.cpp | 2 +- src/atom_vec_ellipsoid.cpp | 2 +- src/atom_vec_hybrid.cpp | 2 +- src/atom_vec_line.cpp | 2 +- src/atom_vec_sphere.cpp | 2 +- src/atom_vec_tri.cpp | 2 +- src/balance.cpp | 2 +- src/body.cpp | 2 +- src/bond.cpp | 2 +- src/bond_deprecated.cpp | 2 +- src/bond_hybrid.cpp | 2 +- src/bond_zero.cpp | 2 +- src/change_box.cpp | 2 +- src/comm.cpp | 2 +- src/comm_brick.cpp | 2 +- src/comm_tiled.cpp | 2 +- src/compute.cpp | 2 +- src/compute_adf.cpp | 2 +- src/compute_aggregate_atom.cpp | 2 +- src/compute_angle.cpp | 2 +- src/compute_angle_local.cpp | 2 +- src/compute_angmom_chunk.cpp | 2 +- src/compute_bond.cpp | 2 +- src/compute_bond_local.cpp | 2 +- src/compute_centro_atom.cpp | 2 +- src/compute_chunk_atom.cpp | 2 +- src/compute_chunk_spread_atom.cpp | 2 +- src/compute_cluster_atom.cpp | 2 +- src/compute_cna_atom.cpp | 2 +- src/compute_com_chunk.cpp | 2 +- src/compute_contact_atom.cpp | 2 +- src/compute_coord_atom.cpp | 2 +- src/compute_deprecated.cpp | 2 +- src/compute_dihedral.cpp | 2 +- src/compute_dihedral_local.cpp | 2 +- src/compute_dipole_chunk.cpp | 2 +- src/compute_displace_atom.cpp | 2 +- src/compute_erotate_sphere.cpp | 2 +- src/compute_erotate_sphere_atom.cpp | 2 +- src/compute_fragment_atom.cpp | 2 +- src/compute_global_atom.cpp | 2 +- src/compute_group_group.cpp | 2 +- src/compute_gyration.cpp | 2 +- src/compute_gyration_chunk.cpp | 2 +- src/compute_heat_flux.cpp | 2 +- src/compute_hexorder_atom.cpp | 2 +- src/compute_improper.cpp | 2 +- src/compute_improper_local.cpp | 2 +- src/compute_inertia_chunk.cpp | 2 +- src/compute_ke.cpp | 2 +- src/compute_ke_atom.cpp | 2 +- src/compute_msd.cpp | 2 +- src/compute_msd_chunk.cpp | 2 +- src/compute_omega_chunk.cpp | 2 +- src/compute_orientorder_atom.cpp | 2 +- src/compute_pair.cpp | 2 +- src/compute_pair_local.cpp | 2 +- src/compute_pe.cpp | 2 +- src/compute_pe_atom.cpp | 2 +- src/compute_pressure.cpp | 2 +- src/compute_property_atom.cpp | 2 +- src/compute_property_chunk.cpp | 2 +- src/compute_property_local.cpp | 2 +- src/compute_rdf.cpp | 2 +- src/compute_reduce.cpp | 2 +- src/compute_reduce_chunk.cpp | 2 +- src/compute_reduce_region.cpp | 2 +- src/compute_slice.cpp | 2 +- src/compute_stress_atom.cpp | 2 +- src/compute_temp.cpp | 2 +- src/compute_temp_chunk.cpp | 2 +- src/compute_temp_com.cpp | 2 +- src/compute_temp_deform.cpp | 2 +- src/compute_temp_partial.cpp | 2 +- src/compute_temp_profile.cpp | 2 +- src/compute_temp_ramp.cpp | 2 +- src/compute_temp_region.cpp | 2 +- src/compute_temp_sphere.cpp | 2 +- src/compute_torque_chunk.cpp | 2 +- src/compute_vacf.cpp | 2 +- src/compute_vcm_chunk.cpp | 2 +- src/create_atoms.cpp | 2 +- src/create_bonds.cpp | 2 +- src/create_box.cpp | 2 +- src/delete_atoms.cpp | 2 +- src/delete_bonds.cpp | 2 +- src/deprecated.cpp | 2 +- src/dihedral_deprecated.cpp | 2 +- src/dihedral_hybrid.cpp | 2 +- src/dihedral_zero.cpp | 2 +- src/displace_atoms.cpp | 2 +- src/domain.cpp | 2 +- src/dump.cpp | 2 +- src/dump_atom.cpp | 2 +- src/dump_cfg.cpp | 2 +- src/dump_custom.cpp | 2 +- src/dump_dcd.cpp | 2 +- src/dump_deprecated.cpp | 2 +- src/dump_image.cpp | 2 +- src/dump_local.cpp | 2 +- src/dump_movie.cpp | 2 +- src/dump_xyz.cpp | 2 +- src/error.cpp | 2 +- src/finish.cpp | 2 +- src/fix.cpp | 2 +- src/fix_adapt.cpp | 2 +- src/fix_addforce.cpp | 2 +- src/fix_ave_atom.cpp | 2 +- src/fix_ave_chunk.cpp | 3 +-- src/fix_ave_correlate.cpp | 3 +-- src/fix_ave_histo.cpp | 3 +-- src/fix_ave_histo_weight.cpp | 3 +-- src/fix_ave_time.cpp | 3 +-- src/fix_aveforce.cpp | 2 +- src/fix_balance.cpp | 2 +- src/fix_box_relax.cpp | 2 +- src/fix_controller.cpp | 2 +- src/fix_deform.cpp | 2 +- src/fix_deprecated.cpp | 2 +- src/fix_drag.cpp | 2 +- src/fix_dt_reset.cpp | 2 +- src/fix_enforce2d.cpp | 2 +- src/fix_external.cpp | 2 +- src/fix_gravity.cpp | 2 +- src/fix_group.cpp | 2 +- src/fix_halt.cpp | 2 +- src/fix_heat.cpp | 2 +- src/fix_indent.cpp | 2 +- src/fix_langevin.cpp | 2 +- src/fix_lineforce.cpp | 2 +- src/fix_momentum.cpp | 2 +- src/fix_move.cpp | 2 +- src/fix_neigh_history.cpp | 2 +- src/fix_nh.cpp | 2 +- src/fix_nh_sphere.cpp | 2 +- src/fix_nph.cpp | 2 +- src/fix_nph_sphere.cpp | 2 +- src/fix_npt.cpp | 2 +- src/fix_npt_sphere.cpp | 2 +- src/fix_nve.cpp | 2 +- src/fix_nve_limit.cpp | 2 +- src/fix_nve_noforce.cpp | 2 +- src/fix_nve_sphere.cpp | 2 +- src/fix_nvt.cpp | 2 +- src/fix_nvt_sllod.cpp | 2 +- src/fix_nvt_sphere.cpp | 2 +- src/fix_planeforce.cpp | 2 +- src/fix_press_berendsen.cpp | 2 +- src/fix_print.cpp | 2 +- src/fix_property_atom.cpp | 2 +- src/fix_recenter.cpp | 2 +- src/fix_respa.cpp | 2 +- src/fix_restrain.cpp | 2 +- src/fix_setforce.cpp | 2 +- src/fix_spring.cpp | 2 +- src/fix_spring_chunk.cpp | 2 +- src/fix_spring_rg.cpp | 2 +- src/fix_spring_self.cpp | 2 +- src/fix_store.cpp | 2 +- src/fix_store_force.cpp | 2 +- src/fix_store_state.cpp | 2 +- src/fix_temp_berendsen.cpp | 2 +- src/fix_temp_csld.cpp | 2 +- src/fix_temp_csvr.cpp | 2 +- src/fix_temp_rescale.cpp | 2 +- src/fix_tmd.cpp | 2 +- src/fix_vector.cpp | 2 +- src/fix_viscous.cpp | 2 +- src/fix_wall.cpp | 2 +- src/fix_wall_lj1043.cpp | 2 +- src/fix_wall_lj126.cpp | 2 +- src/fix_wall_lj93.cpp | 2 +- src/fix_wall_reflect.cpp | 2 +- src/fix_wall_region.cpp | 2 +- src/force.cpp | 2 +- src/group.cpp | 2 +- src/hashlittle.cpp | 5 ++--- src/hashlittle.h | 11 ++++++++++- src/image.cpp | 2 +- src/output.cpp | 1 + src/pair_lj_cut_coul_cut.cpp | 3 +-- src/pair_lj_cut_coul_debye.cpp | 2 +- src/pair_lj_cut_coul_dsf.cpp | 5 ++--- src/pointers.h | 2 +- 194 files changed, 208 insertions(+), 205 deletions(-) diff --git a/doc/include-file-conventions.md b/doc/include-file-conventions.md index 3f591361f5..1f206c8f88 100644 --- a/doc/include-file-conventions.md +++ b/doc/include-file-conventions.md @@ -97,10 +97,10 @@ statements should follow the "include what you use" principle. ### Order of Include Statements Include files should be included in this order: -* lmptype.h (should only be included if `MPI_LMP_XXX` data types are used) +* the header matching the implementation (`some_class.h` for file `some_class.cpp`) * mpi.h * system and library headers (anything that is using angular brackets; C-library headers first, then C++) -* LAMMPS local headers (first the header matching the implementation file, the rest in mostly alphabetical order) +* LAMMPS local headers (preferably in alphabetical order) ### Special Cases and Exceptions diff --git a/src/angle.h b/src/angle.h index 7a008f7ca7..3e6812c4fd 100644 --- a/src/angle.h +++ b/src/angle.h @@ -14,7 +14,7 @@ #ifndef LMP_ANGLE_H #define LMP_ANGLE_H -#include "pointers.h" // IWYU pragma: export +#include "pointers.h" namespace LAMMPS_NS { diff --git a/src/angle_deprecated.cpp b/src/angle_deprecated.cpp index b5af217b7b..cc29c9978e 100644 --- a/src/angle_deprecated.cpp +++ b/src/angle_deprecated.cpp @@ -15,12 +15,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "angle_deprecated.h" +#include #include "angle_hybrid.h" #include "comm.h" #include "force.h" #include "error.h" +#include "utils.h" using namespace LAMMPS_NS; @@ -43,7 +44,7 @@ void AngleDeprecated::settings(int, char **) // hybrid substyles are created in AngleHybrid::settings(), so when this is // called, our style was just added at the end of the list of substyles - if (strncmp(my_style,"hybrid",6) == 0) { + if (utils::strmatch(my_style,"^hybrid")) { AngleHybrid *hybrid = (AngleHybrid *)force->angle; my_style = hybrid->keywords[hybrid->nstyles]; } diff --git a/src/angle_hybrid.cpp b/src/angle_hybrid.cpp index 47baf770a5..a4729efb38 100644 --- a/src/angle_hybrid.cpp +++ b/src/angle_hybrid.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "angle_hybrid.h" #include #include #include -#include "angle_hybrid.h" #include "atom.h" #include "neighbor.h" #include "comm.h" diff --git a/src/angle_zero.cpp b/src/angle_zero.cpp index 62eab85aee..3c92b852b3 100644 --- a/src/angle_zero.cpp +++ b/src/angle_zero.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ +#include "angle_zero.h" #include #include -#include "angle_zero.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/atom.cpp b/src/atom.cpp index eab8a3063d..1073d9ebbb 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom.h" #include #include #include #include -#include "atom.h" #include "style_atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" diff --git a/src/atom_map.cpp b/src/atom_map.cpp index 6af3b9c288..7949e327a9 100644 --- a/src/atom_map.cpp +++ b/src/atom_map.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom.h" #include #include -#include "atom.h" #include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index a7ca6fcb19..11fe2dba06 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec.h" #include #include -#include "atom_vec.h" #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index e1c9a1e524..7b452e018f 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_atomic.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index fad5b3eae0..8cc220c8b9 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_body.h" #include #include #include -#include "atom_vec_body.h" #include "my_pool_chunk.h" #include "style_body.h" #include "body.h" diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index 440393385d..950fe06488 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_charge.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index ad167bef79..a9c36a61f4 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "atom_vec_ellipsoid.h" #include #include -#include "atom_vec_ellipsoid.h" #include "math_extra.h" #include "atom.h" #include "comm.h" diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 7e1fb01e5d..a750b17ac3 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_hybrid.h" #include #include -#include "atom_vec_hybrid.h" #include "atom.h" #include "domain.h" #include "modify.h" diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index 6b197d2663..d694c42043 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_line.h" #include #include #include -#include "atom_vec_line.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index b3f4bfe391..713fb0d721 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_sphere.h" #include #include -#include "atom_vec_sphere.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index b0b6eca19b..9a6afce02f 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_tri.h" #include #include #include -#include "atom_vec_tri.h" #include "math_extra.h" #include "atom.h" #include "comm.h" diff --git a/src/balance.cpp b/src/balance.cpp index 04f342b69b..c3b6f7d3bf 100644 --- a/src/balance.cpp +++ b/src/balance.cpp @@ -18,10 +18,10 @@ //#define BALANCE_DEBUG 1 +#include "balance.h" #include #include #include -#include "balance.h" #include "atom.h" #include "comm.h" #include "rcb.h" diff --git a/src/body.cpp b/src/body.cpp index 10f88bd43b..c0e58d3f4c 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "body.h" +#include using namespace LAMMPS_NS; diff --git a/src/bond.cpp b/src/bond.cpp index 0d50b7e3e5..bb54306280 100644 --- a/src/bond.cpp +++ b/src/bond.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "bond.h" +#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/bond_deprecated.cpp b/src/bond_deprecated.cpp index 567b1a4d00..3e20553cac 100644 --- a/src/bond_deprecated.cpp +++ b/src/bond_deprecated.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "bond_deprecated.h" +#include #include "bond_hybrid.h" #include "comm.h" #include "force.h" diff --git a/src/bond_hybrid.cpp b/src/bond_hybrid.cpp index 9028886758..0b1c944196 100644 --- a/src/bond_hybrid.cpp +++ b/src/bond_hybrid.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "bond_hybrid.h" #include #include #include -#include "bond_hybrid.h" #include "atom.h" #include "neighbor.h" #include "comm.h" diff --git a/src/bond_zero.cpp b/src/bond_zero.cpp index c473abbe4b..9be37c13be 100644 --- a/src/bond_zero.cpp +++ b/src/bond_zero.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ +#include "bond_zero.h" #include #include -#include "bond_zero.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/change_box.cpp b/src/change_box.cpp index 1fed65b430..98119fb3bf 100644 --- a/src/change_box.cpp +++ b/src/change_box.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "change_box.h" #include #include #include -#include "change_box.h" #include "atom.h" #include "modify.h" #include "fix.h" diff --git a/src/comm.cpp b/src/comm.cpp index 5f846cf292..53ec6b990c 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "comm.h" #include #include #include -#include "comm.h" #include "universe.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index dcf30807f5..928357d5be 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -15,10 +15,10 @@ Contributing author (triclinic) : Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "comm_brick.h" #include #include #include -#include "comm_brick.h" #include "atom.h" #include "atom_vec.h" #include "pair.h" diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index 385b7fdf22..e145f50f75 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "comm_tiled.h" #include #include #include -#include "comm_tiled.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/compute.cpp b/src/compute.cpp index 8ff8487104..cc92d2b5d3 100644 --- a/src/compute.cpp +++ b/src/compute.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute.h" #include #include -#include "compute.h" #include "domain.h" #include "force.h" #include "group.h" diff --git a/src/compute_adf.cpp b/src/compute_adf.cpp index a17561ff54..dee5fb214f 100644 --- a/src/compute_adf.cpp +++ b/src/compute_adf.cpp @@ -15,10 +15,10 @@ Contributing authors: Aidan P. Thompson (SNL) ------------------------------------------------------------------------- */ +#include "compute_adf.h" #include #include #include -#include "compute_adf.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_aggregate_atom.cpp b/src/compute_aggregate_atom.cpp index 9a797124bd..e495ac6899 100644 --- a/src/compute_aggregate_atom.cpp +++ b/src/compute_aggregate_atom.cpp @@ -15,10 +15,10 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "compute_aggregate_atom.h" #include #include #include -#include "compute_aggregate_atom.h" #include "atom.h" #include "atom_vec.h" #include "update.h" diff --git a/src/compute_angle.cpp b/src/compute_angle.cpp index c1c02a1cc4..fc72a58453 100644 --- a/src/compute_angle.cpp +++ b/src/compute_angle.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_angle.h" +#include #include "angle.h" #include "update.h" #include "force.h" diff --git a/src/compute_angle_local.cpp b/src/compute_angle_local.cpp index 1196211665..b100824ea9 100644 --- a/src/compute_angle_local.cpp +++ b/src/compute_angle_local.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_angle_local.h" #include #include -#include "compute_angle_local.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/compute_angmom_chunk.cpp b/src/compute_angmom_chunk.cpp index ec42015527..05ea963b82 100644 --- a/src/compute_angmom_chunk.cpp +++ b/src/compute_angmom_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_angmom_chunk.h" #include #include -#include "compute_angmom_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_bond.cpp b/src/compute_bond.cpp index 4fd3bbef30..5cc947c764 100644 --- a/src/compute_bond.cpp +++ b/src/compute_bond.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_bond.h" +#include #include "bond.h" #include "update.h" #include "force.h" diff --git a/src/compute_bond_local.cpp b/src/compute_bond_local.cpp index ccdd3ee77c..d579772384 100644 --- a/src/compute_bond_local.cpp +++ b/src/compute_bond_local.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_bond_local.h" #include #include -#include "compute_bond_local.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/compute_centro_atom.cpp b/src/compute_centro_atom.cpp index 7df94271fc..18fc31390f 100644 --- a/src/compute_centro_atom.cpp +++ b/src/compute_centro_atom.cpp @@ -15,8 +15,8 @@ Contributing author: Michel Perez (U Lyon) for non-fcc lattices ------------------------------------------------------------------------- */ -#include #include "compute_centro_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_chunk_atom.cpp b/src/compute_chunk_atom.cpp index fd9204f1cb..92567101de 100644 --- a/src/compute_chunk_atom.cpp +++ b/src/compute_chunk_atom.cpp @@ -13,13 +13,13 @@ // NOTE: allow for bin center to be variables for sphere/cylinder +#include "compute_chunk_atom.h" #include #include #include #include #include #include -#include "compute_chunk_atom.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_chunk_spread_atom.cpp b/src/compute_chunk_spread_atom.cpp index 3d0cea1add..51dad00c25 100644 --- a/src/compute_chunk_spread_atom.cpp +++ b/src/compute_chunk_spread_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_chunk_spread_atom.h" #include #include -#include "compute_chunk_spread_atom.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_cluster_atom.cpp b/src/compute_cluster_atom.cpp index febe0658a0..ff227b3590 100644 --- a/src/compute_cluster_atom.cpp +++ b/src/compute_cluster_atom.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_cluster_atom.h" #include #include #include -#include "compute_cluster_atom.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_cna_atom.cpp b/src/compute_cna_atom.cpp index d764e739b3..054798f637 100644 --- a/src/compute_cna_atom.cpp +++ b/src/compute_cna_atom.cpp @@ -15,10 +15,10 @@ Contributing author: Wan Liang (Chinese Academy of Sciences) ------------------------------------------------------------------------- */ +#include "compute_cna_atom.h" #include #include #include -#include "compute_cna_atom.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_com_chunk.cpp b/src/compute_com_chunk.cpp index 7b4c960cf4..c39911214c 100644 --- a/src/compute_com_chunk.cpp +++ b/src/compute_com_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_com_chunk.h" #include #include -#include "compute_com_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_contact_atom.cpp b/src/compute_contact_atom.cpp index e4afc1d761..7a288afb43 100644 --- a/src/compute_contact_atom.cpp +++ b/src/compute_contact_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_contact_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_coord_atom.cpp b/src/compute_coord_atom.cpp index 8cedcbc027..30747c1314 100644 --- a/src/compute_coord_atom.cpp +++ b/src/compute_coord_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_coord_atom.h" #include #include -#include "compute_coord_atom.h" #include "compute_orientorder_atom.h" #include "atom.h" #include "update.h" diff --git a/src/compute_deprecated.cpp b/src/compute_deprecated.cpp index 069fa73437..1db78b6bdf 100644 --- a/src/compute_deprecated.cpp +++ b/src/compute_deprecated.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_deprecated.h" +#include #include "comm.h" #include "error.h" diff --git a/src/compute_dihedral.cpp b/src/compute_dihedral.cpp index 16823050da..e50903104a 100644 --- a/src/compute_dihedral.cpp +++ b/src/compute_dihedral.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_dihedral.h" +#include #include "update.h" #include "force.h" #include "dihedral.h" diff --git a/src/compute_dihedral_local.cpp b/src/compute_dihedral_local.cpp index 784ae9c607..ac2c884c3f 100644 --- a/src/compute_dihedral_local.cpp +++ b/src/compute_dihedral_local.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_dihedral_local.h" #include #include -#include "compute_dihedral_local.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/compute_dipole_chunk.cpp b/src/compute_dipole_chunk.cpp index 090bc5df94..3790da2035 100644 --- a/src/compute_dipole_chunk.cpp +++ b/src/compute_dipole_chunk.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_dipole_chunk.h" #include #include #include -#include "compute_dipole_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_displace_atom.cpp b/src/compute_displace_atom.cpp index 3773159143..41db4db1d6 100644 --- a/src/compute_displace_atom.cpp +++ b/src/compute_displace_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_displace_atom.h" #include #include -#include "compute_displace_atom.h" #include "atom.h" #include "update.h" #include "group.h" diff --git a/src/compute_erotate_sphere.cpp b/src/compute_erotate_sphere.cpp index 65bb8a9770..2a8588f061 100644 --- a/src/compute_erotate_sphere.cpp +++ b/src/compute_erotate_sphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_erotate_sphere.h" +#include #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_erotate_sphere_atom.cpp b/src/compute_erotate_sphere_atom.cpp index 999bc062c5..78664a912f 100644 --- a/src/compute_erotate_sphere_atom.cpp +++ b/src/compute_erotate_sphere_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_erotate_sphere_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_fragment_atom.cpp b/src/compute_fragment_atom.cpp index d59b519d09..f9b68dd217 100644 --- a/src/compute_fragment_atom.cpp +++ b/src/compute_fragment_atom.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "compute_fragment_atom.h" #include #include -#include "compute_fragment_atom.h" #include "atom.h" #include "atom_vec.h" #include "update.h" diff --git a/src/compute_global_atom.cpp b/src/compute_global_atom.cpp index 6685f746a1..15f8a8f1aa 100644 --- a/src/compute_global_atom.cpp +++ b/src/compute_global_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_global_atom.h" #include #include -#include "compute_global_atom.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_group_group.cpp b/src/compute_group_group.cpp index 11e1aac720..f978b4a228 100644 --- a/src/compute_group_group.cpp +++ b/src/compute_group_group.cpp @@ -16,10 +16,10 @@ K-space terms added by Stan Moore (BYU) ------------------------------------------------------------------------- */ +#include "compute_group_group.h" #include #include #include -#include "compute_group_group.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_gyration.cpp b/src/compute_gyration.cpp index 3c5656a5af..2b1a26cc75 100644 --- a/src/compute_gyration.cpp +++ b/src/compute_gyration.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_gyration.h" +#include #include "update.h" #include "atom.h" #include "group.h" diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp index f3db37d62f..5677ce4b6a 100644 --- a/src/compute_gyration_chunk.cpp +++ b/src/compute_gyration_chunk.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_gyration_chunk.h" #include #include #include -#include "compute_gyration_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_heat_flux.cpp b/src/compute_heat_flux.cpp index 9bd827c713..b717dce04a 100644 --- a/src/compute_heat_flux.cpp +++ b/src/compute_heat_flux.cpp @@ -16,9 +16,9 @@ Mario Pinto (Computational Research Lab, Pune, India) ------------------------------------------------------------------------- */ +#include "compute_heat_flux.h" #include #include -#include "compute_heat_flux.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_hexorder_atom.cpp b/src/compute_hexorder_atom.cpp index c54f4b1aae..96d4c47678 100644 --- a/src/compute_hexorder_atom.cpp +++ b/src/compute_hexorder_atom.cpp @@ -15,10 +15,10 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "compute_hexorder_atom.h" #include #include #include -#include "compute_hexorder_atom.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_improper.cpp b/src/compute_improper.cpp index 2f068dfb74..181771dcfb 100644 --- a/src/compute_improper.cpp +++ b/src/compute_improper.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_improper.h" +#include #include "update.h" #include "force.h" #include "improper.h" diff --git a/src/compute_improper_local.cpp b/src/compute_improper_local.cpp index ec1734cd96..e363749b67 100644 --- a/src/compute_improper_local.cpp +++ b/src/compute_improper_local.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_improper_local.h" #include #include -#include "compute_improper_local.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/compute_inertia_chunk.cpp b/src/compute_inertia_chunk.cpp index d1a7cb9fc1..be980a08ee 100644 --- a/src/compute_inertia_chunk.cpp +++ b/src/compute_inertia_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_inertia_chunk.h" #include #include -#include "compute_inertia_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_ke.cpp b/src/compute_ke.cpp index 3418cc678f..c6ba478dcb 100644 --- a/src/compute_ke.cpp +++ b/src/compute_ke.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_ke.h" +#include #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_ke_atom.cpp b/src/compute_ke_atom.cpp index c5506996da..102d6364ff 100644 --- a/src/compute_ke_atom.cpp +++ b/src/compute_ke_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_ke_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_msd.cpp b/src/compute_msd.cpp index d2e17eff9e..b4115d859c 100644 --- a/src/compute_msd.cpp +++ b/src/compute_msd.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_msd.h" #include #include -#include "compute_msd.h" #include "atom.h" #include "update.h" #include "group.h" diff --git a/src/compute_msd_chunk.cpp b/src/compute_msd_chunk.cpp index 8520b36993..8039a4fcd5 100644 --- a/src/compute_msd_chunk.cpp +++ b/src/compute_msd_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_msd_chunk.h" #include #include -#include "compute_msd_chunk.h" #include "atom.h" #include "group.h" #include "update.h" diff --git a/src/compute_omega_chunk.cpp b/src/compute_omega_chunk.cpp index 360255e908..327c64493f 100644 --- a/src/compute_omega_chunk.cpp +++ b/src/compute_omega_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_omega_chunk.h" #include #include -#include "compute_omega_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_orientorder_atom.cpp b/src/compute_orientorder_atom.cpp index 8a0a525fdc..266df575f9 100644 --- a/src/compute_orientorder_atom.cpp +++ b/src/compute_orientorder_atom.cpp @@ -16,10 +16,10 @@ Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "compute_orientorder_atom.h" #include #include #include -#include "compute_orientorder_atom.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_pair.cpp b/src/compute_pair.cpp index df4f3a1ddb..e9a3faf723 100644 --- a/src/compute_pair.cpp +++ b/src/compute_pair.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_pair.h" #include #include #include -#include "compute_pair.h" #include "update.h" #include "force.h" #include "pair.h" diff --git a/src/compute_pair_local.cpp b/src/compute_pair_local.cpp index 1ab46a0297..2018d929f3 100644 --- a/src/compute_pair_local.cpp +++ b/src/compute_pair_local.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_pair_local.h" #include #include #include -#include "compute_pair_local.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_pe.cpp b/src/compute_pe.cpp index 5839ec2095..fd7b74b43a 100644 --- a/src/compute_pe.cpp +++ b/src/compute_pe.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_pe.h" #include #include -#include "compute_pe.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_pe_atom.cpp b/src/compute_pe_atom.cpp index b3ace2d419..274e1b05a6 100644 --- a/src/compute_pe_atom.cpp +++ b/src/compute_pe_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_pe_atom.h" +#include #include "atom.h" #include "update.h" #include "comm.h" diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index 431f039de3..1782a040ae 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_pressure.h" #include #include -#include "compute_pressure.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index 0b57840696..065e3eeb82 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_property_atom.h" #include #include -#include "compute_property_atom.h" #include "math_extra.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/compute_property_chunk.cpp b/src/compute_property_chunk.cpp index 089e867598..579c7cae3f 100644 --- a/src/compute_property_chunk.cpp +++ b/src/compute_property_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_property_chunk.h" #include #include -#include "compute_property_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_property_local.cpp b/src/compute_property_local.cpp index ddcf5913ca..651e1190b1 100644 --- a/src/compute_property_local.cpp +++ b/src/compute_property_local.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_property_local.h" +#include #include "atom.h" #include "atom_vec.h" #include "update.h" diff --git a/src/compute_rdf.cpp b/src/compute_rdf.cpp index b1fa8bb2a3..501a506c98 100644 --- a/src/compute_rdf.cpp +++ b/src/compute_rdf.cpp @@ -15,10 +15,10 @@ Contributing authors: Paul Crozier (SNL), Jeff Greathouse (SNL) ------------------------------------------------------------------------- */ +#include "compute_rdf.h" #include #include #include -#include "compute_rdf.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_reduce.cpp b/src/compute_reduce.cpp index e7692b0797..8467554faa 100644 --- a/src/compute_reduce.cpp +++ b/src/compute_reduce.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_reduce.h" #include #include #include -#include "compute_reduce.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/compute_reduce_chunk.cpp b/src/compute_reduce_chunk.cpp index 5eda71b21b..3b68e20fcb 100644 --- a/src/compute_reduce_chunk.cpp +++ b/src/compute_reduce_chunk.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_reduce_chunk.h" #include #include #include -#include "compute_reduce_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_reduce_region.cpp b/src/compute_reduce_region.cpp index 30a5c6393f..9074124a61 100644 --- a/src/compute_reduce_region.cpp +++ b/src/compute_reduce_region.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_reduce_region.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_slice.cpp b/src/compute_slice.cpp index 6e509c24d4..67b60882f6 100644 --- a/src/compute_slice.cpp +++ b/src/compute_slice.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_slice.h" #include #include #include -#include "compute_slice.h" #include "update.h" #include "modify.h" #include "fix.h" diff --git a/src/compute_stress_atom.cpp b/src/compute_stress_atom.cpp index f84c977bdb..7c0ed9ef17 100644 --- a/src/compute_stress_atom.cpp +++ b/src/compute_stress_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_stress_atom.h" +#include #include "atom.h" #include "update.h" #include "comm.h" diff --git a/src/compute_temp.cpp b/src/compute_temp.cpp index c330249a7e..e77531ee28 100644 --- a/src/compute_temp.cpp +++ b/src/compute_temp.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_temp.h" +#include #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_temp_chunk.cpp b/src/compute_temp_chunk.cpp index 229e98e258..e66aa64a27 100644 --- a/src/compute_temp_chunk.cpp +++ b/src/compute_temp_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_temp_chunk.h" #include #include -#include "compute_temp_chunk.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_temp_com.cpp b/src/compute_temp_com.cpp index 21814e1940..e5b9b3d828 100644 --- a/src/compute_temp_com.cpp +++ b/src/compute_temp_com.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_temp_com.h" +#include #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_temp_deform.cpp b/src/compute_temp_deform.cpp index 39780b5cf6..ff8909a5c7 100644 --- a/src/compute_temp_deform.cpp +++ b/src/compute_temp_deform.cpp @@ -15,9 +15,9 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "compute_temp_deform.h" #include #include -#include "compute_temp_deform.h" #include "domain.h" #include "atom.h" #include "update.h" diff --git a/src/compute_temp_partial.cpp b/src/compute_temp_partial.cpp index 8d5ff66796..6bffcef374 100644 --- a/src/compute_temp_partial.cpp +++ b/src/compute_temp_partial.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_temp_partial.h" +#include #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_temp_profile.cpp b/src/compute_temp_profile.cpp index 21c87b31a2..fce145848e 100644 --- a/src/compute_temp_profile.cpp +++ b/src/compute_temp_profile.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_temp_profile.h" #include #include -#include "compute_temp_profile.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_temp_ramp.cpp b/src/compute_temp_ramp.cpp index 715d2aa9f4..0899f89fd1 100644 --- a/src/compute_temp_ramp.cpp +++ b/src/compute_temp_ramp.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_temp_ramp.h" #include #include -#include "compute_temp_ramp.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_temp_region.cpp b/src/compute_temp_region.cpp index 4aa4dac0a1..a1b1b77648 100644 --- a/src/compute_temp_region.cpp +++ b/src/compute_temp_region.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_temp_region.h" #include #include -#include "compute_temp_region.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_temp_sphere.cpp b/src/compute_temp_sphere.cpp index b490a5ec45..d2bfe6db61 100644 --- a/src/compute_temp_sphere.cpp +++ b/src/compute_temp_sphere.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_temp_sphere.h" #include #include -#include "compute_temp_sphere.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/compute_torque_chunk.cpp b/src/compute_torque_chunk.cpp index e43155493f..35eef8fe10 100644 --- a/src/compute_torque_chunk.cpp +++ b/src/compute_torque_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_torque_chunk.h" #include #include -#include "compute_torque_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/compute_vacf.cpp b/src/compute_vacf.cpp index 787c2503ca..761f827347 100644 --- a/src/compute_vacf.cpp +++ b/src/compute_vacf.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_vacf.h" #include #include -#include "compute_vacf.h" #include "atom.h" #include "update.h" #include "group.h" diff --git a/src/compute_vcm_chunk.cpp b/src/compute_vcm_chunk.cpp index cf30130763..b0a8dbeee7 100644 --- a/src/compute_vcm_chunk.cpp +++ b/src/compute_vcm_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_vcm_chunk.h" #include #include -#include "compute_vcm_chunk.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/create_atoms.cpp b/src/create_atoms.cpp index 8504023a70..f6cff042fe 100644 --- a/src/create_atoms.cpp +++ b/src/create_atoms.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "create_atoms.h" #include #include -#include "create_atoms.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/create_bonds.cpp b/src/create_bonds.cpp index e00fe109ca..5b7c354595 100644 --- a/src/create_bonds.cpp +++ b/src/create_bonds.cpp @@ -15,9 +15,9 @@ Contributing authors: Mike Salerno (NRL) added single methods ------------------------------------------------------------------------- */ +#include "create_bonds.h" #include #include -#include "create_bonds.h" #include "atom.h" #include "domain.h" #include "force.h" diff --git a/src/create_box.cpp b/src/create_box.cpp index 5ec960bec4..4a826cb691 100644 --- a/src/create_box.cpp +++ b/src/create_box.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "create_box.h" +#include #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/delete_atoms.cpp b/src/delete_atoms.cpp index ff4b97a3a4..e8d9c5d53b 100644 --- a/src/delete_atoms.cpp +++ b/src/delete_atoms.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "delete_atoms.h" #include #include #include -#include "delete_atoms.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" diff --git a/src/delete_bonds.cpp b/src/delete_bonds.cpp index c4d591543a..c450f77ee7 100644 --- a/src/delete_bonds.cpp +++ b/src/delete_bonds.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "delete_bonds.h" #include #include #include -#include "delete_bonds.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/deprecated.cpp b/src/deprecated.cpp index 66ddcfeff4..86af54fbfd 100644 --- a/src/deprecated.cpp +++ b/src/deprecated.cpp @@ -15,8 +15,8 @@ Contributing authors: Axel Kohlmeyer (Temple U), ------------------------------------------------------------------------- */ -#include #include "deprecated.h" +#include #include "comm.h" #include "error.h" #include "input.h" diff --git a/src/dihedral_deprecated.cpp b/src/dihedral_deprecated.cpp index 70888ca76d..0205b1b887 100644 --- a/src/dihedral_deprecated.cpp +++ b/src/dihedral_deprecated.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "dihedral_deprecated.h" +#include #include "dihedral_hybrid.h" #include "comm.h" #include "force.h" diff --git a/src/dihedral_hybrid.cpp b/src/dihedral_hybrid.cpp index 27fd7084bc..0863be955d 100644 --- a/src/dihedral_hybrid.cpp +++ b/src/dihedral_hybrid.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "dihedral_hybrid.h" #include #include #include -#include "dihedral_hybrid.h" #include "atom.h" #include "neighbor.h" #include "comm.h" diff --git a/src/dihedral_zero.cpp b/src/dihedral_zero.cpp index 0367477267..daf46fe79a 100644 --- a/src/dihedral_zero.cpp +++ b/src/dihedral_zero.cpp @@ -15,8 +15,8 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include #include "dihedral_zero.h" +#include #include "atom.h" #include "force.h" #include "memory.h" diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 8bae173a1d..dc94c3ed35 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "displace_atoms.h" #include #include #include -#include "displace_atoms.h" #include "atom.h" #include "modify.h" #include "domain.h" diff --git a/src/domain.cpp b/src/domain.cpp index 197eff514a..372b264013 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -15,10 +15,10 @@ Contributing author (triclinic) : Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "domain.h" #include #include #include -#include "domain.h" #include "style_region.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/dump.cpp b/src/dump.cpp index b08a4de2ad..57a8decbb0 100644 --- a/src/dump.cpp +++ b/src/dump.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "dump.h" #include #include -#include "dump.h" #include "atom.h" #include "irregular.h" #include "update.h" diff --git a/src/dump_atom.cpp b/src/dump_atom.cpp index c95256ac21..e2e77cfb77 100644 --- a/src/dump_atom.cpp +++ b/src/dump_atom.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "dump_atom.h" +#include #include "domain.h" #include "atom.h" #include "update.h" diff --git a/src/dump_cfg.cpp b/src/dump_cfg.cpp index eb5329e0d1..3430720b8c 100644 --- a/src/dump_cfg.cpp +++ b/src/dump_cfg.cpp @@ -16,8 +16,8 @@ Memory efficiency improved by Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include #include "dump_cfg.h" +#include #include "atom.h" #include "domain.h" #include "memory.h" diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 75e4e42bcd..ce83e442c9 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "dump_custom.h" #include #include -#include "dump_custom.h" #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/dump_dcd.cpp b/src/dump_dcd.cpp index ce669fecfd..254b371e22 100644 --- a/src/dump_dcd.cpp +++ b/src/dump_dcd.cpp @@ -16,10 +16,10 @@ Axel Kohlmeyer (Temple U), support for groups ------------------------------------------------------------------------- */ +#include "dump_dcd.h" #include #include #include -#include "dump_dcd.h" #include "domain.h" #include "atom.h" #include "update.h" diff --git a/src/dump_deprecated.cpp b/src/dump_deprecated.cpp index f0999f4276..4263b9801f 100644 --- a/src/dump_deprecated.cpp +++ b/src/dump_deprecated.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "dump_deprecated.h" +#include #include "comm.h" #include "error.h" diff --git a/src/dump_image.cpp b/src/dump_image.cpp index 0b4ca43879..7e6bc0c44c 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "dump_image.h" #include #include #include #include -#include "dump_image.h" #include "image.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/dump_local.cpp b/src/dump_local.cpp index f99b7ac06c..9f021a7b6a 100644 --- a/src/dump_local.cpp +++ b/src/dump_local.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "dump_local.h" #include #include #include -#include "dump_local.h" #include "modify.h" #include "fix.h" #include "compute.h" diff --git a/src/dump_movie.cpp b/src/dump_movie.cpp index 37d8a37f4d..ea67320d4a 100644 --- a/src/dump_movie.cpp +++ b/src/dump_movie.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "dump_movie.h" +#include #include "comm.h" #include "force.h" #include "error.h" diff --git a/src/dump_xyz.cpp b/src/dump_xyz.cpp index 4d50cfc2c8..10ba10f995 100644 --- a/src/dump_xyz.cpp +++ b/src/dump_xyz.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "dump_xyz.h" +#include #include "atom.h" #include "error.h" #include "memory.h" diff --git a/src/error.cpp b/src/error.cpp index 8970145b7c..656c957ee2 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "error.h" #include #include #include -#include "error.h" #include "universe.h" #include "output.h" #include "input.h" diff --git a/src/finish.cpp b/src/finish.cpp index 77c959b945..bef3ae89eb 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "finish.h" #include #include #include #include -#include "finish.h" #include "timer.h" #include "universe.h" #include "accelerator_kokkos.h" diff --git a/src/fix.cpp b/src/fix.cpp index 1913ed483e..e0cfeca1a9 100644 --- a/src/fix.cpp +++ b/src/fix.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix.h" #include #include -#include "fix.h" #include "atom.h" #include "group.h" #include "force.h" diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 7ac6128558..8668690e1d 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_adapt.h" +#include #include "atom.h" #include "bond.h" #include "update.h" diff --git a/src/fix_addforce.cpp b/src/fix_addforce.cpp index e29c4ffe9f..275ec2c846 100644 --- a/src/fix_addforce.cpp +++ b/src/fix_addforce.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_addforce.h" #include #include #include -#include "fix_addforce.h" #include "atom.h" #include "atom_masks.h" #include "update.h" diff --git a/src/fix_ave_atom.cpp b/src/fix_ave_atom.cpp index e6566632de..694df2bcf7 100644 --- a/src/fix_ave_atom.cpp +++ b/src/fix_ave_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_ave_atom.h" #include #include -#include "fix_ave_atom.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index 1533d1fa4f..45eb38f5c2 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -11,12 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_ave_chunk.h" #include -#include // IWYU pragma: keep #include #include #include -#include "fix_ave_chunk.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/fix_ave_correlate.cpp b/src/fix_ave_correlate.cpp index 555c1ac026..f65b53efc8 100644 --- a/src/fix_ave_correlate.cpp +++ b/src/fix_ave_correlate.cpp @@ -17,12 +17,11 @@ Reese Jones (Sandia) ------------------------------------------------------------------------- */ +#include "fix_ave_correlate.h" #include -#include // IWYU pragma: keep #include #include #include -#include "fix_ave_correlate.h" #include "update.h" #include "modify.h" #include "compute.h" diff --git a/src/fix_ave_histo.cpp b/src/fix_ave_histo.cpp index 29fdc21c74..5a5de6d0b6 100644 --- a/src/fix_ave_histo.cpp +++ b/src/fix_ave_histo.cpp @@ -11,12 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_ave_histo.h" #include -#include // IWYU pragma: keep #include #include #include -#include "fix_ave_histo.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/fix_ave_histo_weight.cpp b/src/fix_ave_histo_weight.cpp index 5eeb074472..1f0d282e5d 100644 --- a/src/fix_ave_histo_weight.cpp +++ b/src/fix_ave_histo_weight.cpp @@ -14,11 +14,10 @@ /* ---------------------------------------------------------------------- Contributing author: Shawn Coleman (ARL) ------------------------------------------------------------------------- */ +#include "fix_ave_histo_weight.h" #include -#include // IWYU pragma: keep #include #include "fix.h" -#include "fix_ave_histo_weight.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/fix_ave_time.cpp b/src/fix_ave_time.cpp index 4820215f46..05d556d0c8 100644 --- a/src/fix_ave_time.cpp +++ b/src/fix_ave_time.cpp @@ -15,12 +15,11 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "fix_ave_time.h" #include -#include // IWYU pragma: keep #include #include #include -#include "fix_ave_time.h" #include "update.h" #include "force.h" #include "modify.h" diff --git a/src/fix_aveforce.cpp b/src/fix_aveforce.cpp index 4791a8b022..8ad07780a9 100644 --- a/src/fix_aveforce.cpp +++ b/src/fix_aveforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_aveforce.h" #include #include -#include "fix_aveforce.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/fix_balance.cpp b/src/fix_balance.cpp index f9c32e8df0..5ca1ec124a 100644 --- a/src/fix_balance.cpp +++ b/src/fix_balance.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_balance.h" +#include #include "balance.h" #include "update.h" #include "atom.h" diff --git a/src/fix_box_relax.cpp b/src/fix_box_relax.cpp index c73c0ade88..c19ea918b4 100644 --- a/src/fix_box_relax.cpp +++ b/src/fix_box_relax.cpp @@ -15,9 +15,9 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "fix_box_relax.h" #include #include -#include "fix_box_relax.h" #include "atom.h" #include "domain.h" #include "update.h" diff --git a/src/fix_controller.cpp b/src/fix_controller.cpp index eb7a794962..855869a574 100644 --- a/src/fix_controller.cpp +++ b/src/fix_controller.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_controller.h" #include #include -#include "fix_controller.h" #include "force.h" #include "update.h" #include "modify.h" diff --git a/src/fix_deform.cpp b/src/fix_deform.cpp index 96d7580c39..9d84c4bb62 100644 --- a/src/fix_deform.cpp +++ b/src/fix_deform.cpp @@ -15,9 +15,9 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "fix_deform.h" #include #include -#include "fix_deform.h" #include "atom.h" #include "update.h" #include "comm.h" diff --git a/src/fix_deprecated.cpp b/src/fix_deprecated.cpp index 7db27152ba..0c212668b3 100644 --- a/src/fix_deprecated.cpp +++ b/src/fix_deprecated.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_deprecated.h" +#include #include "comm.h" #include "error.h" diff --git a/src/fix_drag.cpp b/src/fix_drag.cpp index 006d1c46d0..9af5a37675 100644 --- a/src/fix_drag.cpp +++ b/src/fix_drag.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_drag.h" #include #include #include -#include "fix_drag.h" #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/fix_dt_reset.cpp b/src/fix_dt_reset.cpp index 4e6195c4fa..da4bdad827 100644 --- a/src/fix_dt_reset.cpp +++ b/src/fix_dt_reset.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_dt_reset.h" #include #include #include -#include "fix_dt_reset.h" #include "atom.h" #include "update.h" #include "integrate.h" diff --git a/src/fix_enforce2d.cpp b/src/fix_enforce2d.cpp index 986ded5d16..3edd24e9af 100644 --- a/src/fix_enforce2d.cpp +++ b/src/fix_enforce2d.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_enforce2d.h" +#include #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/fix_external.cpp b/src/fix_external.cpp index 2c926e26b5..afb420df93 100644 --- a/src/fix_external.cpp +++ b/src/fix_external.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_external.h" +#include #include "atom.h" #include "update.h" #include "memory.h" diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp index 8508a92cc4..14ba913c01 100644 --- a/src/fix_gravity.cpp +++ b/src/fix_gravity.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_gravity.h" #include #include #include -#include "fix_gravity.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/fix_group.cpp b/src/fix_group.cpp index 8a332bed95..d2eea9f781 100644 --- a/src/fix_group.cpp +++ b/src/fix_group.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_group.h" +#include #include "group.h" #include "update.h" #include "atom.h" diff --git a/src/fix_halt.cpp b/src/fix_halt.cpp index 133494fb8e..8ebb39f0e9 100644 --- a/src/fix_halt.cpp +++ b/src/fix_halt.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_halt.h" #include #include #include -#include "fix_halt.h" #include "update.h" #include "force.h" #include "input.h" diff --git a/src/fix_heat.cpp b/src/fix_heat.cpp index f78a9c0860..67d445df92 100644 --- a/src/fix_heat.cpp +++ b/src/fix_heat.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "fix_heat.h" #include #include #include -#include "fix_heat.h" #include "atom.h" #include "domain.h" #include "region.h" diff --git a/src/fix_indent.cpp b/src/fix_indent.cpp index 6a42cadefd..04837ff39b 100644 --- a/src/fix_indent.cpp +++ b/src/fix_indent.cpp @@ -15,10 +15,10 @@ Contributing author: Ravi Agrawal (Northwestern U) ------------------------------------------------------------------------- */ +#include "fix_indent.h" #include #include #include -#include "fix_indent.h" #include "atom.h" #include "input.h" #include "variable.h" diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 0f48562048..f8fea76c94 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -16,10 +16,10 @@ Aidan Thompson (SNL) GJF formulation ------------------------------------------------------------------------- */ +#include "fix_langevin.h" #include #include #include -#include "fix_langevin.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/fix_lineforce.cpp b/src/fix_lineforce.cpp index 61c6341aa6..c153ee65dd 100644 --- a/src/fix_lineforce.cpp +++ b/src/fix_lineforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_lineforce.h" #include #include -#include "fix_lineforce.h" #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/fix_momentum.cpp b/src/fix_momentum.cpp index bf94a94362..a363cb8eac 100644 --- a/src/fix_momentum.cpp +++ b/src/fix_momentum.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_momentum.h" #include #include #include -#include "fix_momentum.h" #include "atom.h" #include "domain.h" #include "group.h" diff --git a/src/fix_move.cpp b/src/fix_move.cpp index 646f943ef9..770c0fca6b 100644 --- a/src/fix_move.cpp +++ b/src/fix_move.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_move.h" #include #include -#include "fix_move.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/fix_neigh_history.cpp b/src/fix_neigh_history.cpp index ca593f29df..5c740ae649 100644 --- a/src/fix_neigh_history.cpp +++ b/src/fix_neigh_history.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_neigh_history.h" #include #include -#include "fix_neigh_history.h" #include "my_page.h" #include "atom.h" #include "comm.h" diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 3ffdff54cf..bb3fe7559c 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -15,9 +15,9 @@ Contributing authors: Mark Stevens (SNL), Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "fix_nh.h" #include #include -#include "fix_nh.h" #include "atom.h" #include "force.h" #include "group.h" diff --git a/src/fix_nh_sphere.cpp b/src/fix_nh_sphere.cpp index 0f1024700a..1ff3fc2d4d 100644 --- a/src/fix_nh_sphere.cpp +++ b/src/fix_nh_sphere.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "fix_nh_sphere.h" #include #include -#include "fix_nh_sphere.h" #include "atom.h" #include "atom_vec.h" #include "error.h" diff --git a/src/fix_nph.cpp b/src/fix_nph.cpp index 40265ef57c..7148b024de 100644 --- a/src/fix_nph.cpp +++ b/src/fix_nph.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nph.h" +#include #include "modify.h" #include "error.h" diff --git a/src/fix_nph_sphere.cpp b/src/fix_nph_sphere.cpp index 3fcbe5e9c6..f64f144f34 100644 --- a/src/fix_nph_sphere.cpp +++ b/src/fix_nph_sphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nph_sphere.h" +#include #include "modify.h" #include "error.h" diff --git a/src/fix_npt.cpp b/src/fix_npt.cpp index d17577d68d..e856fafe2d 100644 --- a/src/fix_npt.cpp +++ b/src/fix_npt.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_npt.h" +#include #include "modify.h" #include "error.h" diff --git a/src/fix_npt_sphere.cpp b/src/fix_npt_sphere.cpp index 50ac990daf..9cbb17b0ca 100644 --- a/src/fix_npt_sphere.cpp +++ b/src/fix_npt_sphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_npt_sphere.h" +#include #include "modify.h" #include "error.h" diff --git a/src/fix_nve.cpp b/src/fix_nve.cpp index 3396f3ca47..863ce5404d 100644 --- a/src/fix_nve.cpp +++ b/src/fix_nve.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nve.h" +#include #include "atom.h" #include "force.h" #include "update.h" diff --git a/src/fix_nve_limit.cpp b/src/fix_nve_limit.cpp index 49bed2e3dd..d63c736e73 100644 --- a/src/fix_nve_limit.cpp +++ b/src/fix_nve_limit.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nve_limit.h" #include #include #include -#include "fix_nve_limit.h" #include "atom.h" #include "force.h" #include "update.h" diff --git a/src/fix_nve_noforce.cpp b/src/fix_nve_noforce.cpp index 7b61aac18e..022e8abe74 100644 --- a/src/fix_nve_noforce.cpp +++ b/src/fix_nve_noforce.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nve_noforce.h" +#include #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/fix_nve_sphere.cpp b/src/fix_nve_sphere.cpp index 94e8aa88ac..c0fea17c2b 100644 --- a/src/fix_nve_sphere.cpp +++ b/src/fix_nve_sphere.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nve_sphere.h" #include #include -#include "fix_nve_sphere.h" #include "atom.h" #include "domain.h" #include "atom_vec.h" diff --git a/src/fix_nvt.cpp b/src/fix_nvt.cpp index 7247612dd4..6f0d4c6c50 100644 --- a/src/fix_nvt.cpp +++ b/src/fix_nvt.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nvt.h" +#include #include "group.h" #include "modify.h" #include "error.h" diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index 16e2fb1d3d..138794862a 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -15,8 +15,8 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ -#include #include "fix_nvt_sllod.h" +#include #include "math_extra.h" #include "atom.h" #include "domain.h" diff --git a/src/fix_nvt_sphere.cpp b/src/fix_nvt_sphere.cpp index 44046699ba..fed3799011 100644 --- a/src/fix_nvt_sphere.cpp +++ b/src/fix_nvt_sphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nvt_sphere.h" +#include #include "group.h" #include "modify.h" #include "error.h" diff --git a/src/fix_planeforce.cpp b/src/fix_planeforce.cpp index a83d00a506..a3f27277bd 100644 --- a/src/fix_planeforce.cpp +++ b/src/fix_planeforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_planeforce.h" #include #include -#include "fix_planeforce.h" #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/fix_press_berendsen.cpp b/src/fix_press_berendsen.cpp index ad3e3d1e1c..c090c554e2 100644 --- a/src/fix_press_berendsen.cpp +++ b/src/fix_press_berendsen.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_press_berendsen.h" #include #include -#include "fix_press_berendsen.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/fix_print.cpp b/src/fix_print.cpp index da2e2b54f3..dc76fc39f9 100644 --- a/src/fix_print.cpp +++ b/src/fix_print.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_print.h" #include #include -#include "fix_print.h" #include "update.h" #include "input.h" #include "modify.h" diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 62c3ec985b..555114e4f9 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_property_atom.h" #include #include -#include "fix_property_atom.h" #include "atom.h" #include "comm.h" #include "memory.h" diff --git a/src/fix_recenter.cpp b/src/fix_recenter.cpp index cd50d7dc34..f461e0fa52 100644 --- a/src/fix_recenter.cpp +++ b/src/fix_recenter.cpp @@ -15,9 +15,9 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins U) ------------------------------------------------------------------------- */ +#include "fix_recenter.h" #include #include -#include "fix_recenter.h" #include "atom.h" #include "group.h" #include "update.h" diff --git a/src/fix_respa.cpp b/src/fix_respa.cpp index ea2eb5050a..742dd5c58b 100644 --- a/src/fix_respa.cpp +++ b/src/fix_respa.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_respa.h" +#include #include "atom.h" #include "force.h" #include "memory.h" diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index 3b9980d567..5a0d4fb662 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -16,10 +16,10 @@ support for bond and angle restraints by Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ +#include "fix_restrain.h" #include #include #include -#include "fix_restrain.h" #include "atom.h" #include "force.h" #include "update.h" diff --git a/src/fix_setforce.cpp b/src/fix_setforce.cpp index f01008dc10..77c4bfbddc 100644 --- a/src/fix_setforce.cpp +++ b/src/fix_setforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_setforce.h" #include #include -#include "fix_setforce.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index c87cec2766..510b194ab7 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "fix_spring.h" #include #include -#include "fix_spring.h" #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/fix_spring_chunk.cpp b/src/fix_spring_chunk.cpp index f6ebadde94..e14936a976 100644 --- a/src/fix_spring_chunk.cpp +++ b/src/fix_spring_chunk.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_spring_chunk.h" #include #include -#include "fix_spring_chunk.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/fix_spring_rg.cpp b/src/fix_spring_rg.cpp index 1d5b87c599..f1e68bffa4 100644 --- a/src/fix_spring_rg.cpp +++ b/src/fix_spring_rg.cpp @@ -16,8 +16,8 @@ Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include #include "fix_spring_rg.h" +#include #include "atom.h" #include "update.h" #include "group.h" diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index a5aa600229..c94f21b492 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -15,9 +15,9 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins University) ------------------------------------------------------------------------- */ +#include "fix_spring_self.h" #include #include -#include "fix_spring_self.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/fix_store.cpp b/src/fix_store.cpp index a370632489..94c62c1850 100644 --- a/src/fix_store.cpp +++ b/src/fix_store.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_store.h" +#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index 8afd985615..5c25f0e162 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_store_force.h" +#include #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/fix_store_state.cpp b/src/fix_store_state.cpp index da899a173c..18dfa026d9 100644 --- a/src/fix_store_state.cpp +++ b/src/fix_store_state.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_store_state.h" #include #include -#include "fix_store_state.h" #include "atom.h" #include "domain.h" #include "update.h" diff --git a/src/fix_temp_berendsen.cpp b/src/fix_temp_berendsen.cpp index b4dd65b0c5..be8922be4e 100644 --- a/src/fix_temp_berendsen.cpp +++ b/src/fix_temp_berendsen.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_temp_berendsen.h" #include #include -#include "fix_temp_berendsen.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/fix_temp_csld.cpp b/src/fix_temp_csld.cpp index 57f7104c61..f827c88f51 100644 --- a/src/fix_temp_csld.cpp +++ b/src/fix_temp_csld.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_temp_csld.h" #include #include -#include "fix_temp_csld.h" #include "atom.h" #include "force.h" #include "memory.h" diff --git a/src/fix_temp_csvr.cpp b/src/fix_temp_csvr.cpp index 9f8135ffc8..55cbb60407 100644 --- a/src/fix_temp_csvr.cpp +++ b/src/fix_temp_csvr.cpp @@ -16,10 +16,10 @@ Based on code by Paolo Raiteri (Curtin U) and Giovanni Bussi (SISSA) ------------------------------------------------------------------------- */ +#include "fix_temp_csvr.h" #include #include #include -#include "fix_temp_csvr.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/fix_temp_rescale.cpp b/src/fix_temp_rescale.cpp index 378997c0c4..a9d605d5ba 100644 --- a/src/fix_temp_rescale.cpp +++ b/src/fix_temp_rescale.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_temp_rescale.h" #include #include -#include "fix_temp_rescale.h" #include "atom.h" #include "force.h" #include "group.h" diff --git a/src/fix_tmd.cpp b/src/fix_tmd.cpp index a0425db36c..ec8cdb859c 100644 --- a/src/fix_tmd.cpp +++ b/src/fix_tmd.cpp @@ -16,10 +16,10 @@ Christian Burisch (Bochum Univeristy, Germany) ------------------------------------------------------------------------- */ +#include "fix_tmd.h" #include #include #include -#include "fix_tmd.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/fix_vector.cpp b/src/fix_vector.cpp index b7be472be6..53093acbf6 100644 --- a/src/fix_vector.cpp +++ b/src/fix_vector.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_vector.h" #include #include -#include "fix_vector.h" #include "update.h" #include "force.h" #include "modify.h" diff --git a/src/fix_viscous.cpp b/src/fix_viscous.cpp index cc60b1bda4..bdd1e19976 100644 --- a/src/fix_viscous.cpp +++ b/src/fix_viscous.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_viscous.h" +#include #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 1046efc2df..8ceafb4bfc 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_wall.h" #include #include -#include "fix_wall.h" #include "input.h" #include "variable.h" #include "domain.h" diff --git a/src/fix_wall_lj1043.cpp b/src/fix_wall_lj1043.cpp index a93f4dd699..5656cf113d 100644 --- a/src/fix_wall_lj1043.cpp +++ b/src/fix_wall_lj1043.cpp @@ -15,8 +15,8 @@ Contributing author: Jonathan Lee (Sandia) ------------------------------------------------------------------------- */ -#include #include "fix_wall_lj1043.h" +#include #include "atom.h" #include "math_const.h" diff --git a/src/fix_wall_lj126.cpp b/src/fix_wall_lj126.cpp index 369ef78c97..e748e2ef13 100644 --- a/src/fix_wall_lj126.cpp +++ b/src/fix_wall_lj126.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_wall_lj126.h" +#include #include "atom.h" #include "error.h" diff --git a/src/fix_wall_lj93.cpp b/src/fix_wall_lj93.cpp index ce5a06c81b..c0e81b60ee 100644 --- a/src/fix_wall_lj93.cpp +++ b/src/fix_wall_lj93.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_wall_lj93.h" +#include #include "atom.h" #include "error.h" diff --git a/src/fix_wall_reflect.cpp b/src/fix_wall_reflect.cpp index edf5c40a5f..bc3414d650 100644 --- a/src/fix_wall_reflect.cpp +++ b/src/fix_wall_reflect.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_wall_reflect.h" +#include #include "atom.h" #include "comm.h" #include "update.h" diff --git a/src/fix_wall_region.cpp b/src/fix_wall_region.cpp index cb1c3c2ab2..c1a689d90a 100644 --- a/src/fix_wall_region.cpp +++ b/src/fix_wall_region.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_wall_region.h" #include #include #include -#include "fix_wall_region.h" #include "atom.h" #include "domain.h" #include "region.h" diff --git a/src/force.cpp b/src/force.cpp index e4939a10e8..1a826b2843 100644 --- a/src/force.cpp +++ b/src/force.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "force.h" #include #include #include -#include "force.h" #include "style_bond.h" #include "style_angle.h" #include "style_dihedral.h" diff --git a/src/group.cpp b/src/group.cpp index a37d209947..d119964ea1 100644 --- a/src/group.cpp +++ b/src/group.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "group.h" #include #include #include #include -#include "group.h" #include "domain.h" #include "atom.h" #include "force.h" diff --git a/src/hashlittle.cpp b/src/hashlittle.cpp index e9340a7e55..c3824b71fe 100644 --- a/src/hashlittle.cpp +++ b/src/hashlittle.cpp @@ -2,8 +2,7 @@ // from lookup3.c, by Bob Jenkins, May 2006, Public Domain // bob_jenkins@burtleburtle.net -#include -#include +#include "hashlittle.h" // if the system defines the __BYTE_ORDER__ define, // we use it instead of guessing the platform @@ -141,7 +140,7 @@ acceptable. Do NOT use for cryptographic purposes. ------------------------------------------------------------------------------- */ -uint32_t hashlittle( const void *key, size_t length, uint32_t initval) +uint32_t LAMMPS_NS::hashlittle(const void *key, size_t length, uint32_t initval) { #ifndef PURIFY_HATES_HASHLITTLE diff --git a/src/hashlittle.h b/src/hashlittle.h index 7b57a35c80..75380d366b 100644 --- a/src/hashlittle.h +++ b/src/hashlittle.h @@ -2,4 +2,13 @@ // from lookup3.c, by Bob Jenkins, May 2006, Public Domain // bob_jenkins@burtleburtle.net -uint32_t hashlittle(const void *key, size_t length, uint32_t); +#ifndef LMP_HASHLITTLE_H +#define LMP_HASHLITTLE_H + +#include +#include + +namespace LAMMPS_NS { + uint32_t hashlittle(const void *key, size_t length, uint32_t); +} +#endif diff --git a/src/image.cpp b/src/image.cpp index ccd6d98d87..4a5009b8ed 100644 --- a/src/image.cpp +++ b/src/image.cpp @@ -15,11 +15,11 @@ Contributing author: Nathan Fabian (Sandia) ------------------------------------------------------------------------- */ +#include "image.h" #include #include #include #include -#include "image.h" #include "math_extra.h" #include "random_mars.h" #include "math_const.h" diff --git a/src/output.cpp b/src/output.cpp index fb2f9a700d..be6f66b7aa 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include #include "output.h" #include "style_dump.h" diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index 38a6e2c431..9ffa02156e 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include -#include #include #include "pair_lj_cut_coul_cut.h" #include "atom.h" diff --git a/src/pair_lj_cut_coul_debye.cpp b/src/pair_lj_cut_coul_debye.cpp index cc6e92b2e3..ab6220bd24 100644 --- a/src/pair_lj_cut_coul_debye.cpp +++ b/src/pair_lj_cut_coul_debye.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include #include -#include #include "pair_lj_cut_coul_debye.h" #include "atom.h" #include "neigh_list.h" diff --git a/src/pair_lj_cut_coul_dsf.cpp b/src/pair_lj_cut_coul_dsf.cpp index f114a5851f..778f9f2fb4 100644 --- a/src/pair_lj_cut_coul_dsf.cpp +++ b/src/pair_lj_cut_coul_dsf.cpp @@ -16,11 +16,10 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_dsf.h" +#include #include -#include -#include #include -#include "pair_lj_cut_coul_dsf.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pointers.h b/src/pointers.h index 1af07d5158..2d528db392 100644 --- a/src/pointers.h +++ b/src/pointers.h @@ -22,7 +22,7 @@ #define LMP_POINTERS_H #include "lmptype.h" // IWYU pragma: export -#include +#include // IWYU pragma: export #include // IWYU pragme: export #include // IWYU pragma: export #include "lammps.h" // IWYU pragma: export -- GitLab From 63dcd999d8c5cbfd07d109836d72355bc138281e Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 3 Jul 2019 11:49:38 -0500 Subject: [PATCH 116/236] Switch to kim-api c-bindings for SimulatorModel --- src/KIM/fix_store_kim.cpp | 12 +++++--- src/KIM/kim_init.cpp | 60 ++++++++++++++++++------------------ src/KIM/kim_interactions.cpp | 49 +++++++++++++++-------------- 3 files changed, 63 insertions(+), 58 deletions(-) diff --git a/src/KIM/fix_store_kim.cpp b/src/KIM/fix_store_kim.cpp index c9a99acca9..1bd924bcfb 100644 --- a/src/KIM/fix_store_kim.cpp +++ b/src/KIM/fix_store_kim.cpp @@ -56,7 +56,9 @@ #include #include "fix_store_kim.h" -#include "KIM_SimulatorModel.hpp" +extern "C" { +#include "KIM_SimulatorModel.h" +} #include "error.h" using namespace LAMMPS_NS; @@ -78,8 +80,8 @@ FixStoreKIM::~FixStoreKIM() // free associated storage if (simulator_model) { - KIM::SimulatorModel *sm = (KIM::SimulatorModel *)simulator_model; - KIM::SimulatorModel::Destroy(&sm); + KIM_SimulatorModel *sm = (KIM_SimulatorModel *)simulator_model; + KIM_SimulatorModel_Destroy(&sm); simulator_model = NULL; } @@ -116,8 +118,8 @@ void FixStoreKIM::setptr(const char *name, void *ptr) { if (strcmp(name,"simulator_model") == 0) { if (simulator_model) { - KIM::SimulatorModel *sm = (KIM::SimulatorModel *)simulator_model; - KIM::SimulatorModel::Destroy(&sm); + KIM_SimulatorModel *sm = (KIM_SimulatorModel *)simulator_model; + KIM_SimulatorModel_Destroy(&sm); } simulator_model = ptr; } else if (strcmp(name,"model_name") == 0) { diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 080e3dac3f..052e63263f 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -75,9 +75,6 @@ extern "C" { #include "KIM_SimulatorHeaders.h" } -//@@@@@ Need to switch to c-bindings when they are available. -#include "KIM_SimulatorModel.hpp" -//@@@@@ using namespace LAMMPS_NS; @@ -214,29 +211,30 @@ void KimInit::determine_model_type_and_units(char * model_name, } } - KIM::SimulatorModel * kim_SM; - kim_error = KIM::SimulatorModel::Create(model_name, &kim_SM); + KIM_SimulatorModel * kim_SM; + kim_error = KIM_SimulatorModel_Create(model_name, &kim_SM); if (kim_error) error->all(FLERR,"KIM model name not found"); model_type = SM; int sim_fields; int sim_lines; - std::string const * sim_field; - std::string const * sim_value; - kim_SM->GetNumberOfSimulatorFields(&sim_fields); - kim_SM->CloseTemplateMap(); + char const * sim_field; + char const * sim_value; + KIM_SimulatorModel_GetNumberOfSimulatorFields(kim_SM, &sim_fields); + KIM_SimulatorModel_CloseTemplateMap(kim_SM); for (int i=0; i < sim_fields; ++i) { - kim_SM->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + KIM_SimulatorModel_GetSimulatorFieldMetadata( + kim_SM,i,&sim_lines,&sim_field); - if (*sim_field == "units") { - kim_SM->GetSimulatorFieldLine(i,0,&sim_value); - int len=(*sim_value).length()+1; - *model_units = new char[len]; strcpy(*model_units,sim_value->c_str()); + if (0 == strcmp(sim_field,"units")) { + KIM_SimulatorModel_GetSimulatorFieldLine(kim_SM,i,0,&sim_value); + int len=strlen(sim_value)+1; + *model_units = new char[len]; strcpy(*model_units,sim_value); break; } } - KIM::SimulatorModel::Destroy(&kim_SM); + KIM_SimulatorModel_Destroy(&kim_SM); if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) { std::string mesg("Incompatible units for KIM Simulator Model, " @@ -271,16 +269,16 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units) kim_init_log_delimiter("begin"); int kimerror; - // @@@@@ switch to c-bindings when they are available - KIM::SimulatorModel * simulatorModel; + KIM_SimulatorModel * simulatorModel; if (model_type == SM) { - kimerror = KIM::SimulatorModel::Create(model_name,&simulatorModel); + kimerror = KIM_SimulatorModel_Create(model_name,&simulatorModel); - const std::string *sim_name, *sim_version; - simulatorModel->GetSimulatorNameAndVersion(&sim_name, &sim_version); + char const *sim_name, *sim_version; + KIM_SimulatorModel_GetSimulatorNameAndVersion( + simulatorModel,&sim_name, &sim_version); - if (*sim_name != "LAMMPS") + if (0 != strcmp(sim_name,"LAMMPS")) error->all(FLERR,"Incompatible KIM Simulator Model"); if (comm->me == 0) { @@ -288,7 +286,7 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units) mesg += model_name; mesg += "\n"; mesg += "# For Simulator : "; - mesg += *sim_name + " " + *sim_version + "\n"; + mesg += std::string(sim_name) + " " + sim_version + "\n"; mesg += "# Running on : LAMMPS "; mesg += universe->version; mesg += "\n"; @@ -302,7 +300,7 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units) // need to call this to have access to (some) simulator model init data. - simulatorModel->CloseTemplateMap(); + KIM_SimulatorModel_CloseTemplateMap(simulatorModel); } // Define unit conversion factor variables and print to log @@ -316,24 +314,26 @@ void KimInit::do_init(char *model_name, char *user_units, char *model_units) if (model_type == SM) { int sim_fields, sim_lines; - const std::string *sim_field, *sim_value; - simulatorModel->GetNumberOfSimulatorFields(&sim_fields); + char const *sim_field, *sim_value; + KIM_SimulatorModel_GetNumberOfSimulatorFields(simulatorModel, &sim_fields); // init model for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "model-init") { + KIM_SimulatorModel_GetSimulatorFieldMetadata( + simulatorModel,i,&sim_lines,&sim_field); + if (0 == strcmp(sim_field,"model-init")) { for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(i,j,&sim_value); - input->one(sim_value->c_str()); + KIM_SimulatorModel_GetSimulatorFieldLine( + simulatorModel,i,j,&sim_value); + input->one(sim_value); } break; } } // reset template map. - simulatorModel->OpenAndInitializeTemplateMap(); + KIM_SimulatorModel_OpenAndInitializeTemplateMap(simulatorModel); } // End output to log file diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp index 4771272ff8..355df9c3be 100644 --- a/src/KIM/kim_interactions.cpp +++ b/src/KIM/kim_interactions.cpp @@ -73,9 +73,6 @@ extern "C" { #include "KIM_SimulatorHeaders.h" } -//@@@@@ Need to switch to c-bindings when they are available. -#include "KIM_SimulatorModel.hpp" -//@@@@@ #define SNUM(x) \ static_cast(std::ostringstream() \ @@ -122,7 +119,7 @@ void KimInteractions::do_setup(int narg, char **arg) error->all(FLERR,"Illegal kim_interactions command"); char *model_name = NULL; - KIM::SimulatorModel *simulatorModel(NULL); + KIM_SimulatorModel *simulatorModel(NULL); // check if we had a kim_init command by finding fix STORE/KIM // retrieve model name and pointer to simulator model class instance. @@ -132,7 +129,7 @@ void KimInteractions::do_setup(int narg, char **arg) if (ifix >= 0) { FixStoreKIM *fix_store = (FixStoreKIM *) modify->fix[ifix]; model_name = (char *)fix_store->getptr("model_name"); - simulatorModel = (KIM::SimulatorModel *)fix_store->getptr("simulator_model"); + simulatorModel = (KIM_SimulatorModel *)fix_store->getptr("simulator_model"); } else error->all(FLERR,"Must use 'kim_init' before 'kim_interactions'"); // Begin output to log file @@ -151,9 +148,11 @@ void KimInteractions::do_setup(int narg, char **arg) delimiter = " "; } - simulatorModel->AddTemplateMap("atom-type-sym-list",atom_type_sym_list); - simulatorModel->AddTemplateMap("atom-type-num-list",atom_type_num_list); - simulatorModel->CloseTemplateMap(); + KIM_SimulatorModel_AddTemplateMap( + simulatorModel,"atom-type-sym-list",atom_type_sym_list.c_str()); + KIM_SimulatorModel_AddTemplateMap( + simulatorModel,"atom-type-num-list",atom_type_num_list.c_str()); + KIM_SimulatorModel_CloseTemplateMap(simulatorModel); int len = strlen(atom_type_sym_list.c_str())+1; char *strbuf = new char[len]; @@ -163,16 +162,17 @@ void KimInteractions::do_setup(int narg, char **arg) int sim_num_species; bool species_is_supported; - const std::string *sim_species; - simulatorModel->GetNumberOfSupportedSpecies(&sim_num_species); + char const *sim_species; + KIM_SimulatorModel_GetNumberOfSupportedSpecies( + simulatorModel,&sim_num_species); strcpy(strbuf,atom_type_sym_list.c_str()); strword = strtok(strbuf," \t"); while (strword) { species_is_supported = false; if (strcmp(strword,"NULL") == 0) continue; for (int i=0; i < sim_num_species; ++i) { - simulatorModel->GetSupportedSpecies(i, &sim_species); - if (strcmp(sim_species->c_str(),strword) == 0) + KIM_SimulatorModel_GetSupportedSpecies(simulatorModel,i,&sim_species); + if (strcmp(sim_species,strword) == 0) species_is_supported = true; } if (!species_is_supported) { @@ -188,26 +188,29 @@ void KimInteractions::do_setup(int narg, char **arg) // check if units are unchanged int sim_fields, sim_lines; - const std::string *sim_field, *sim_value; - simulatorModel->GetNumberOfSimulatorFields(&sim_fields); + const char *sim_field, *sim_value; + KIM_SimulatorModel_GetNumberOfSimulatorFields(simulatorModel, &sim_fields); for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); + KIM_SimulatorModel_GetSimulatorFieldMetadata( + simulatorModel,i,&sim_lines,&sim_field); - if (*sim_field == "units") { - simulatorModel->GetSimulatorFieldLine(i,0,&sim_value); - if (*sim_value != update->unit_style) + if (0 == strcmp(sim_field,"units")) { + KIM_SimulatorModel_GetSimulatorFieldLine(simulatorModel,i,0,&sim_value); + if (0 != strcmp(sim_value,update->unit_style)) error->all(FLERR,"Incompatible units for KIM Simulator Model"); } } int sim_model_idx=-1; for (int i=0; i < sim_fields; ++i) { - simulatorModel->GetSimulatorFieldMetadata(i,&sim_lines,&sim_field); - if (*sim_field == "model-defn") { + KIM_SimulatorModel_GetSimulatorFieldMetadata( + simulatorModel,i,&sim_lines,&sim_field); + if (0 == strcmp(sim_field,"model-defn")) { sim_model_idx = i; for (int j=0; j < sim_lines; ++j) { - simulatorModel->GetSimulatorFieldLine(sim_model_idx,j,&sim_value); - input->one(sim_value->c_str()); + KIM_SimulatorModel_GetSimulatorFieldLine( + simulatorModel,sim_model_idx,j,&sim_value); + input->one(sim_value); } } } @@ -215,7 +218,7 @@ void KimInteractions::do_setup(int narg, char **arg) if (sim_model_idx < 0) error->all(FLERR,"KIM Simulator Model has no Model definition"); - simulatorModel->OpenAndInitializeTemplateMap(); + KIM_SimulatorModel_OpenAndInitializeTemplateMap(simulatorModel); } else { -- GitLab From 00d820dcf98864fdac0e30a0dbeaafbf57271192 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 3 Jul 2019 13:20:55 -0500 Subject: [PATCH 117/236] Added support for log.cite to kim_init --- src/KIM/kim_init.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++ src/KIM/kim_init.h | 1 + 2 files changed, 53 insertions(+) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 052e63263f..40e0cbaaed 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -69,6 +69,7 @@ #include "universe.h" #include "input.h" #include "variable.h" +#include "citeme.h" #include "fix_store_kim.h" #include "kim_units.h" @@ -99,6 +100,8 @@ void KimInit::command(int narg, char **arg) char *model_units; determine_model_type_and_units(model_name, user_units, &model_units); + write_log_cite(model_name); + do_init(model_name, user_units, model_units); } @@ -441,3 +444,52 @@ void KimInit::do_variables(char *user_units, char *model_units) if ((logfile) && (input->echo_log)) fputs("#\n",logfile); } } + +/* ---------------------------------------------------------------------- */ + +void KimInit::write_log_cite(char * model_name) +{ + KIM_Collections * coll; + int err = KIM_Collections_Create(&coll); + if (err) return; + + int extent; + if (model_type == MO) + { + err = KIM_Collections_CacheListOfItemMetadataFiles( + coll,KIM_COLLECTION_ITEM_TYPE_portableModel,model_name,&extent); + } + else if (model_type == SM) + { + err = KIM_Collections_CacheListOfItemMetadataFiles( + coll,KIM_COLLECTION_ITEM_TYPE_simulatorModel,model_name,&extent); + } + else + { + error->all(FLERR,"Unknown model type."); + } + + if (err) + { + KIM_Collections_Destroy(&coll); + return; + } + + for (int i = 0; i < extent;++i) + { + char const * fileName; + int availableAsString; + char const * fileString; + err = KIM_Collections_GetItemMetadataFile( + coll,i,&fileName,NULL,NULL,&availableAsString,&fileString); + if (err) continue; + + if (0 == strncmp("kimcite-",fileName,8)) + { + if (lmp->citeme) lmp->citeme->add(fileString); + break; + } + } + + KIM_Collections_Destroy(&coll); +} diff --git a/src/KIM/kim_init.h b/src/KIM/kim_init.h index c22e2be720..7c7a24615b 100644 --- a/src/KIM/kim_init.h +++ b/src/KIM/kim_init.h @@ -78,6 +78,7 @@ class KimInit : protected Pointers { bool unit_conversion_mode; void determine_model_type_and_units(char *, char *, char **); + void write_log_cite(char *); void do_init(char *, char *, char *); void do_variables(char*, char*); void kim_init_log_delimiter(std::string const begin_end) const; -- GitLab From bb5a1c5205c281d23633339c7d700ae0569b63ca Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 3 Jul 2019 13:38:08 -0500 Subject: [PATCH 118/236] Adjust log.cite behavior --- src/KIM/kim_init.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 40e0cbaaed..5fb6748427 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -484,10 +484,9 @@ void KimInit::write_log_cite(char * model_name) coll,i,&fileName,NULL,NULL,&availableAsString,&fileString); if (err) continue; - if (0 == strncmp("kimcite-",fileName,8)) + if (0 == strncmp("kimcite",fileName,7)) { if (lmp->citeme) lmp->citeme->add(fileString); - break; } } -- GitLab From 256531a29a31d2f80f860504d0653c4013794338 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 Jul 2019 19:34:13 -0400 Subject: [PATCH 119/236] put implementation header first for all remaining main folder source files --- src/imbalance_neigh.cpp | 2 +- src/imbalance_store.cpp | 2 +- src/imbalance_time.cpp | 2 +- src/imbalance_var.cpp | 2 +- src/improper_deprecated.cpp | 2 +- src/improper_hybrid.cpp | 2 +- src/improper_zero.cpp | 2 +- src/info.cpp | 2 +- src/input.cpp | 2 +- src/irregular.cpp | 2 +- src/kspace.cpp | 2 +- src/kspace_deprecated.cpp | 2 +- src/lammps.cpp | 2 +- src/lattice.cpp | 2 +- src/library.cpp | 2 +- src/main.cpp | 2 +- src/math_extra.cpp | 2 +- src/math_special.cpp | 2 +- src/memory.cpp | 2 +- src/min.cpp | 2 +- src/min_cg.cpp | 2 +- src/min_fire.cpp | 2 +- src/min_hftn.cpp | 2 +- src/min_linesearch.cpp | 2 +- src/min_quickmin.cpp | 2 +- src/min_sd.cpp | 2 +- src/modify.cpp | 2 +- src/molecule.cpp | 2 +- src/nbin.cpp | 2 +- src/neighbor.cpp | 2 +- src/npair.cpp | 2 +- src/ntopo.cpp | 2 +- src/ntopo_angle_all.cpp | 2 +- src/ntopo_angle_partial.cpp | 2 +- src/ntopo_angle_template.cpp | 2 +- src/ntopo_bond_all.cpp | 2 +- src/ntopo_bond_partial.cpp | 2 +- src/ntopo_bond_template.cpp | 2 +- src/ntopo_dihedral_all.cpp | 2 +- src/ntopo_dihedral_partial.cpp | 2 +- src/ntopo_dihedral_template.cpp | 2 +- src/ntopo_improper_all.cpp | 2 +- src/ntopo_improper_partial.cpp | 2 +- src/ntopo_improper_template.cpp | 2 +- src/output.cpp | 2 +- src/pair.cpp | 2 +- src/pair_beck.cpp | 2 +- src/pair_born.cpp | 2 +- src/pair_born_coul_dsf.cpp | 2 +- src/pair_born_coul_wolf.cpp | 2 +- src/pair_buck.cpp | 2 +- src/pair_buck_coul_cut.cpp | 2 +- src/pair_coul_cut.cpp | 2 +- src/pair_coul_debye.cpp | 2 +- src/pair_coul_dsf.cpp | 2 +- src/pair_coul_streitz.cpp | 2 +- src/pair_coul_wolf.cpp | 2 +- src/pair_deprecated.cpp | 2 +- src/pair_dpd.cpp | 2 +- src/pair_dpd_tstat.cpp | 2 +- src/pair_gauss.cpp | 2 +- src/pair_hybrid.cpp | 2 +- src/pair_hybrid_overlay.cpp | 2 +- src/pair_lj96_cut.cpp | 2 +- src/pair_lj_cubic.cpp | 2 +- src/pair_lj_cut.cpp | 2 +- src/pair_lj_cut_coul_cut.cpp | 2 +- src/pair_lj_cut_coul_debye.cpp | 2 +- src/pair_lj_cut_coul_wolf.cpp | 2 +- src/pair_lj_expand.cpp | 2 +- src/pair_lj_gromacs.cpp | 2 +- src/pair_lj_gromacs_coul_gromacs.cpp | 2 +- src/pair_lj_smooth.cpp | 2 +- src/pair_lj_smooth_linear.cpp | 2 +- src/pair_mie_cut.cpp | 2 +- src/pair_morse.cpp | 2 +- src/pair_soft.cpp | 2 +- src/pair_table.cpp | 2 +- src/pair_ufm.cpp | 2 +- src/pair_yukawa.cpp | 2 +- src/pair_zbl.cpp | 2 +- src/pair_zero.cpp | 2 +- src/procmap.cpp | 2 +- src/random_mars.cpp | 2 +- src/random_park.cpp | 2 +- src/rcb.cpp | 2 +- src/read_data.cpp | 2 +- src/read_dump.cpp | 2 +- src/read_restart.cpp | 2 +- src/reader.cpp | 2 +- src/reader_native.cpp | 2 +- src/reader_xyz.cpp | 2 +- src/region.cpp | 2 +- src/region_block.cpp | 2 +- src/region_cone.cpp | 2 +- src/region_cylinder.cpp | 2 +- src/region_deprecated.cpp | 2 +- src/region_intersect.cpp | 2 +- src/region_plane.cpp | 2 +- src/region_prism.cpp | 2 +- src/region_sphere.cpp | 2 +- src/region_union.cpp | 2 +- src/replicate.cpp | 2 +- src/rerun.cpp | 2 +- src/reset_ids.cpp | 2 +- src/respa.cpp | 2 +- src/run.cpp | 2 +- src/set.cpp | 2 +- src/special.cpp | 2 +- src/thermo.cpp | 2 +- src/timer.cpp | 2 +- src/universe.cpp | 2 +- src/update.cpp | 2 +- src/utils.cpp | 2 +- src/variable.cpp | 2 +- src/velocity.cpp | 2 +- src/verlet.cpp | 2 +- src/write_coeff.cpp | 2 +- src/write_data.cpp | 2 +- src/write_dump.cpp | 2 +- src/write_restart.cpp | 2 +- 121 files changed, 121 insertions(+), 121 deletions(-) diff --git a/src/imbalance_neigh.cpp b/src/imbalance_neigh.cpp index 2a55754da8..19f3915a11 100644 --- a/src/imbalance_neigh.cpp +++ b/src/imbalance_neigh.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "imbalance_neigh.h" +#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/imbalance_store.cpp b/src/imbalance_store.cpp index c117b60860..343d47b189 100644 --- a/src/imbalance_store.cpp +++ b/src/imbalance_store.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "imbalance_store.h" +#include #include "atom.h" #include "error.h" diff --git a/src/imbalance_time.cpp b/src/imbalance_time.cpp index ceb3c08220..0831713204 100644 --- a/src/imbalance_time.cpp +++ b/src/imbalance_time.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "imbalance_time.h" +#include #include "atom.h" #include "force.h" #include "timer.h" diff --git a/src/imbalance_var.cpp b/src/imbalance_var.cpp index ba17c06866..ba84ef01ef 100644 --- a/src/imbalance_var.cpp +++ b/src/imbalance_var.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "imbalance_var.h" #include #include -#include "imbalance_var.h" #include "atom.h" #include "group.h" #include "input.h" diff --git a/src/improper_deprecated.cpp b/src/improper_deprecated.cpp index 6f4d08764f..62a688527a 100644 --- a/src/improper_deprecated.cpp +++ b/src/improper_deprecated.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "improper_deprecated.h" +#include #include "improper_hybrid.h" #include "comm.h" #include "force.h" diff --git a/src/improper_hybrid.cpp b/src/improper_hybrid.cpp index af1382d3eb..f078a73ec0 100644 --- a/src/improper_hybrid.cpp +++ b/src/improper_hybrid.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "improper_hybrid.h" #include #include #include -#include "improper_hybrid.h" #include "atom.h" #include "neighbor.h" #include "comm.h" diff --git a/src/improper_zero.cpp b/src/improper_zero.cpp index 3f36954a0a..efa70c8ff5 100644 --- a/src/improper_zero.cpp +++ b/src/improper_zero.cpp @@ -15,8 +15,8 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ -#include #include "improper_zero.h" +#include #include "atom.h" #include "force.h" #include "memory.h" diff --git a/src/info.cpp b/src/info.cpp index bb2d3c4b45..8f55fab367 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -16,6 +16,7 @@ Richard Berger (Temple U) ------------------------------------------------------------------------- */ +#include "info.h" #include #include #include @@ -23,7 +24,6 @@ #include #include #include -#include "info.h" #include "accelerator_kokkos.h" #include "atom.h" #include "comm.h" diff --git a/src/input.cpp b/src/input.cpp index cbad1d78bf..f887bc0245 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "input.h" #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include "input.h" #include "style_command.h" #include "universe.h" #include "atom.h" diff --git a/src/irregular.cpp b/src/irregular.cpp index 2040d12d0b..b67214df25 100644 --- a/src/irregular.cpp +++ b/src/irregular.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "irregular.h" #include #include -#include "irregular.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/kspace.cpp b/src/kspace.cpp index b51191857d..f9020416bf 100644 --- a/src/kspace.cpp +++ b/src/kspace.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "kspace.h" #include #include #include #include -#include "kspace.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/kspace_deprecated.cpp b/src/kspace_deprecated.cpp index 1d62de2692..0b6490b4cf 100644 --- a/src/kspace_deprecated.cpp +++ b/src/kspace_deprecated.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "kspace_deprecated.h" +#include #include "comm.h" #include "force.h" #include "error.h" diff --git a/src/lammps.cpp b/src/lammps.cpp index f8e7dceb89..5ddc1600a4 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "lammps.h" #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include "lammps.h" #include "style_angle.h" // IWYU pragma: keep #include "style_atom.h" // IWYU pragma: keep #include "style_bond.h" // IWYU pragma: keep diff --git a/src/lattice.cpp b/src/lattice.cpp index ee2fea2a75..98faf680e8 100644 --- a/src/lattice.cpp +++ b/src/lattice.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "lattice.h" #include #include #include -#include "lattice.h" #include "update.h" #include "domain.h" #include "comm.h" diff --git a/src/library.cpp b/src/library.cpp index 033b814865..eabe5fd179 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -14,11 +14,11 @@ // C or Fortran style library interface to LAMMPS // customize by adding new LAMMPS-specific functions +#include "library.h" #include #include #include #include -#include "library.h" #include "universe.h" #include "atom_vec.h" #include "atom.h" diff --git a/src/main.cpp b/src/main.cpp index 1be9c253eb..b7f6adbdda 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "lammps.h" +#include #include "input.h" #if defined(LAMMPS_TRAP_FPE) && defined(_GNU_SOURCE) diff --git a/src/math_extra.cpp b/src/math_extra.cpp index f7e5bb646b..797d210d0e 100644 --- a/src/math_extra.cpp +++ b/src/math_extra.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "math_extra.h" #include #include -#include "math_extra.h" #define MAXJACOBI 50 diff --git a/src/math_special.cpp b/src/math_special.cpp index b2f545ddc6..bf11a1ad45 100644 --- a/src/math_special.cpp +++ b/src/math_special.cpp @@ -1,6 +1,6 @@ +#include "math_special.h" #include #include // IWYU pragma: keep -#include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/memory.cpp b/src/memory.cpp index ca7fd3ea7f..a513dde6c2 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "memory.h" +#include #include "error.h" #if defined(LMP_USER_INTEL) && defined(__INTEL_COMPILER) diff --git a/src/min.cpp b/src/min.cpp index f2e1c982be..408954edb8 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -19,10 +19,10 @@ JR Shewchuk, http://www-2.cs.cmu.edu/~jrs/jrspapers.html#cg ------------------------------------------------------------------------- */ +#include "min.h" #include #include #include -#include "min.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/min_cg.cpp b/src/min_cg.cpp index eb8831c8f5..ff318d23da 100644 --- a/src/min_cg.cpp +++ b/src/min_cg.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "min_cg.h" #include #include -#include "min_cg.h" #include "update.h" #include "output.h" #include "timer.h" diff --git a/src/min_fire.cpp b/src/min_fire.cpp index 79346341bb..b7f853afd2 100644 --- a/src/min_fire.cpp +++ b/src/min_fire.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "min_fire.h" #include #include -#include "min_fire.h" #include "universe.h" #include "atom.h" #include "force.h" diff --git a/src/min_hftn.cpp b/src/min_hftn.cpp index c2c251c386..dcfed10fef 100644 --- a/src/min_hftn.cpp +++ b/src/min_hftn.cpp @@ -17,12 +17,12 @@ "Parallel Unconstrained Min", Plantenga, SAND98-8201 ------------------------------------------------------------------------- */ +#include "min_hftn.h" #include #include #include #include "atom.h" #include "fix_minimize.h" -#include "min_hftn.h" #include "modify.h" #include "output.h" #include "pair.h" diff --git a/src/min_linesearch.cpp b/src/min_linesearch.cpp index 3c0621c602..a7a10dcd51 100644 --- a/src/min_linesearch.cpp +++ b/src/min_linesearch.cpp @@ -21,9 +21,9 @@ JR Shewchuk, http://www-2.cs.cmu.edu/~jrs/jrspapers.html#cg ------------------------------------------------------------------------- */ +#include "min_linesearch.h" #include #include -#include "min_linesearch.h" #include "atom.h" #include "modify.h" #include "fix_minimize.h" diff --git a/src/min_quickmin.cpp b/src/min_quickmin.cpp index 784da82686..04e72b046d 100644 --- a/src/min_quickmin.cpp +++ b/src/min_quickmin.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "min_quickmin.h" #include #include -#include "min_quickmin.h" #include "universe.h" #include "atom.h" #include "force.h" diff --git a/src/min_sd.cpp b/src/min_sd.cpp index d66601119b..e4e159003f 100644 --- a/src/min_sd.cpp +++ b/src/min_sd.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "min_sd.h" +#include #include "update.h" #include "output.h" #include "timer.h" diff --git a/src/modify.cpp b/src/modify.cpp index 61497d86db..a9b8817aed 100644 --- a/src/modify.cpp +++ b/src/modify.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "modify.h" +#include #include "style_compute.h" #include "style_fix.h" #include "atom.h" diff --git a/src/molecule.cpp b/src/molecule.cpp index 4a3790296f..38887ebb0c 100644 --- a/src/molecule.cpp +++ b/src/molecule.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "molecule.h" #include #include #include #include -#include "molecule.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_body.h" diff --git a/src/nbin.cpp b/src/nbin.cpp index 0480c9730d..99d41db140 100644 --- a/src/nbin.cpp +++ b/src/nbin.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "nbin.h" +#include #include "neighbor.h" #include "neigh_request.h" #include "domain.h" diff --git a/src/neighbor.cpp b/src/neighbor.cpp index a2efc5919b..d38aed08c0 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -15,10 +15,10 @@ Contributing author (triclinic and multi-neigh) : Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "neighbor.h" #include #include #include -#include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "nbin.h" diff --git a/src/npair.cpp b/src/npair.cpp index 24cdc7750a..b63135fad6 100644 --- a/src/npair.cpp +++ b/src/npair.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair.h" +#include #include "neighbor.h" #include "neigh_request.h" #include "nbin.h" diff --git a/src/ntopo.cpp b/src/ntopo.cpp index 05e287e192..ca63b85328 100644 --- a/src/ntopo.cpp +++ b/src/ntopo.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo.h" +#include #include "atom.h" #include "neighbor.h" #include "comm.h" diff --git a/src/ntopo_angle_all.cpp b/src/ntopo_angle_all.cpp index 2a358c8ce5..e0c20609a1 100644 --- a/src/ntopo_angle_all.cpp +++ b/src/ntopo_angle_all.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_angle_all.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_angle_partial.cpp b/src/ntopo_angle_partial.cpp index c82110cda5..a6fd900825 100644 --- a/src/ntopo_angle_partial.cpp +++ b/src/ntopo_angle_partial.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_angle_partial.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_angle_template.cpp b/src/ntopo_angle_template.cpp index 15a8b658f3..8cbcf8bcbd 100644 --- a/src/ntopo_angle_template.cpp +++ b/src/ntopo_angle_template.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_angle_template.h" +#include #include "atom.h" #include "atom_vec.h" #include "force.h" diff --git a/src/ntopo_bond_all.cpp b/src/ntopo_bond_all.cpp index 42e9e2303d..5309754554 100644 --- a/src/ntopo_bond_all.cpp +++ b/src/ntopo_bond_all.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_bond_all.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_bond_partial.cpp b/src/ntopo_bond_partial.cpp index 5a1acd9191..1cbf5eed11 100644 --- a/src/ntopo_bond_partial.cpp +++ b/src/ntopo_bond_partial.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_bond_partial.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_bond_template.cpp b/src/ntopo_bond_template.cpp index fa98658ad0..cd7b85aa19 100644 --- a/src/ntopo_bond_template.cpp +++ b/src/ntopo_bond_template.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_bond_template.h" +#include #include "atom.h" #include "atom_vec.h" #include "force.h" diff --git a/src/ntopo_dihedral_all.cpp b/src/ntopo_dihedral_all.cpp index 9c94fb10f9..5af2d526e0 100644 --- a/src/ntopo_dihedral_all.cpp +++ b/src/ntopo_dihedral_all.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_dihedral_all.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_dihedral_partial.cpp b/src/ntopo_dihedral_partial.cpp index 14749e6511..faac57aa51 100644 --- a/src/ntopo_dihedral_partial.cpp +++ b/src/ntopo_dihedral_partial.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_dihedral_partial.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_dihedral_template.cpp b/src/ntopo_dihedral_template.cpp index 8ea860c2e2..bce8ecf4bc 100644 --- a/src/ntopo_dihedral_template.cpp +++ b/src/ntopo_dihedral_template.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_dihedral_template.h" +#include #include "atom.h" #include "atom_vec.h" #include "force.h" diff --git a/src/ntopo_improper_all.cpp b/src/ntopo_improper_all.cpp index 6c478dec52..0cbecbf962 100644 --- a/src/ntopo_improper_all.cpp +++ b/src/ntopo_improper_all.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_improper_all.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_improper_partial.cpp b/src/ntopo_improper_partial.cpp index 2c37668ca8..17e5d4cf62 100644 --- a/src/ntopo_improper_partial.cpp +++ b/src/ntopo_improper_partial.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_improper_partial.h" +#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/ntopo_improper_template.cpp b/src/ntopo_improper_template.cpp index 953e010d89..a80fe60e1d 100644 --- a/src/ntopo_improper_template.cpp +++ b/src/ntopo_improper_template.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "ntopo_improper_template.h" +#include #include "atom.h" #include "atom_vec.h" #include "force.h" diff --git a/src/output.cpp b/src/output.cpp index be6f66b7aa..193db9ae2a 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "output.h" #include #include -#include "output.h" #include "style_dump.h" #include "atom.h" #include "neighbor.h" diff --git a/src/pair.cpp b/src/pair.cpp index 3d7bdaa62c..36194aec9b 100644 --- a/src/pair.cpp +++ b/src/pair.cpp @@ -15,12 +15,12 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair.h" #include #include // IWYU pragma: keep #include // IWYU pragma: keep #include #include -#include "pair.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/pair_beck.cpp b/src/pair_beck.cpp index 8ba3ef80f2..b94436b696 100644 --- a/src/pair_beck.cpp +++ b/src/pair_beck.cpp @@ -15,9 +15,9 @@ Contributing author: Jonathan Zimmerman (Sandia) ------------------------------------------------------------------------- */ +#include "pair_beck.h" #include #include -#include "pair_beck.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_born.cpp b/src/pair_born.cpp index ae7456ddbb..bd993acb56 100644 --- a/src/pair_born.cpp +++ b/src/pair_born.cpp @@ -15,10 +15,10 @@ Contributing Author: Sai Jayaraman (Sandia) ------------------------------------------------------------------------- */ +#include "pair_born.h" #include #include #include -#include "pair_born.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_born_coul_dsf.cpp b/src/pair_born_coul_dsf.cpp index 51b9a2677d..f7e139c750 100644 --- a/src/pair_born_coul_dsf.cpp +++ b/src/pair_born_coul_dsf.cpp @@ -16,9 +16,9 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ +#include "pair_born_coul_dsf.h" #include #include -#include "pair_born_coul_dsf.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_born_coul_wolf.cpp b/src/pair_born_coul_wolf.cpp index f4ccac80a1..f4d533bdb0 100644 --- a/src/pair_born_coul_wolf.cpp +++ b/src/pair_born_coul_wolf.cpp @@ -15,9 +15,9 @@ Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov ------------------------------------------------------------------------- */ +#include "pair_born_coul_wolf.h" #include #include -#include "pair_born_coul_wolf.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_buck.cpp b/src/pair_buck.cpp index b9795fb0ed..a94ce87891 100644 --- a/src/pair_buck.cpp +++ b/src/pair_buck.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_buck.h" #include #include #include -#include "pair_buck.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_buck_coul_cut.cpp b/src/pair_buck_coul_cut.cpp index 64475166e3..d05c139f71 100644 --- a/src/pair_buck_coul_cut.cpp +++ b/src/pair_buck_coul_cut.cpp @@ -15,9 +15,9 @@ Contributing author: Eduardo Bringa (LLNL) ------------------------------------------------------------------------- */ +#include "pair_buck_coul_cut.h" #include #include -#include "pair_buck_coul_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_coul_cut.cpp b/src/pair_coul_cut.cpp index 28973026cd..9e6f238eba 100644 --- a/src/pair_coul_cut.cpp +++ b/src/pair_coul_cut.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_coul_cut.h" #include #include #include -#include "pair_coul_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_coul_debye.cpp b/src/pair_coul_debye.cpp index cd23ef1919..1b87a93701 100644 --- a/src/pair_coul_debye.cpp +++ b/src/pair_coul_debye.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_coul_debye.h" #include #include -#include "pair_coul_debye.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_coul_dsf.cpp b/src/pair_coul_dsf.cpp index 4c15b5d330..22230182b0 100644 --- a/src/pair_coul_dsf.cpp +++ b/src/pair_coul_dsf.cpp @@ -16,10 +16,10 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ +#include "pair_coul_dsf.h" #include #include #include -#include "pair_coul_dsf.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_coul_streitz.cpp b/src/pair_coul_streitz.cpp index f577564ac1..628f6a6b36 100644 --- a/src/pair_coul_streitz.cpp +++ b/src/pair_coul_streitz.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include "pair_coul_streitz.h" #include #include #include #include -#include "pair_coul_streitz.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_coul_wolf.cpp b/src/pair_coul_wolf.cpp index 8c15378de8..15c7839fc6 100644 --- a/src/pair_coul_wolf.cpp +++ b/src/pair_coul_wolf.cpp @@ -15,9 +15,9 @@ Contributing author: Yongfeng Zhang (INL), yongfeng.zhang@inl.gov ------------------------------------------------------------------------- */ +#include "pair_coul_wolf.h" #include #include -#include "pair_coul_wolf.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_deprecated.cpp b/src/pair_deprecated.cpp index 0b1342fb2d..058809eb80 100644 --- a/src/pair_deprecated.cpp +++ b/src/pair_deprecated.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_deprecated.h" +#include #include "pair_hybrid.h" #include "comm.h" #include "force.h" diff --git a/src/pair_dpd.cpp b/src/pair_dpd.cpp index e5e6cf7dae..ec65eaafd6 100644 --- a/src/pair_dpd.cpp +++ b/src/pair_dpd.cpp @@ -15,9 +15,9 @@ Contributing author: Kurt Smith (U Pittsburgh) ------------------------------------------------------------------------- */ +#include "pair_dpd.h" #include #include -#include "pair_dpd.h" #include "atom.h" #include "comm.h" #include "update.h" diff --git a/src/pair_dpd_tstat.cpp b/src/pair_dpd_tstat.cpp index 66c8d91ab1..15d7c90b27 100644 --- a/src/pair_dpd_tstat.cpp +++ b/src/pair_dpd_tstat.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_dpd_tstat.h" #include #include -#include "pair_dpd_tstat.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/pair_gauss.cpp b/src/pair_gauss.cpp index 7df9a417c3..7fd3233f4c 100644 --- a/src/pair_gauss.cpp +++ b/src/pair_gauss.cpp @@ -15,10 +15,10 @@ Contributing author: Sai Jayaraman (Sandia) ------------------------------------------------------------------------- */ +#include "pair_gauss.h" #include #include #include -#include "pair_gauss.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index daeee3d2b3..762b9fe8fc 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -12,10 +12,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_hybrid.h" #include #include #include -#include "pair_hybrid.h" #include "atom.h" #include "force.h" #include "pair.h" diff --git a/src/pair_hybrid_overlay.cpp b/src/pair_hybrid_overlay.cpp index 496e3d0406..e67cb677af 100644 --- a/src/pair_hybrid_overlay.cpp +++ b/src/pair_hybrid_overlay.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_hybrid_overlay.h" #include #include -#include "pair_hybrid_overlay.h" #include "atom.h" #include "force.h" #include "error.h" diff --git a/src/pair_lj96_cut.cpp b/src/pair_lj96_cut.cpp index 62e645ef2c..c27038900d 100644 --- a/src/pair_lj96_cut.cpp +++ b/src/pair_lj96_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Chuanfu Luo (luochuanfu@gmail.com) ------------------------------------------------------------------------- */ +#include "pair_lj96_cut.h" #include #include #include -#include "pair_lj96_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_cubic.cpp b/src/pair_lj_cubic.cpp index 8b1b4b7627..7990952494 100644 --- a/src/pair_lj_cubic.cpp +++ b/src/pair_lj_cubic.cpp @@ -16,9 +16,9 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cubic.h" #include #include -#include "pair_lj_cubic.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_cut.cpp b/src/pair_lj_cut.cpp index 9284923218..0302858adb 100644 --- a/src/pair_lj_cut.cpp +++ b/src/pair_lj_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut.h" #include #include #include -#include "pair_lj_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_cut_coul_cut.cpp b/src/pair_lj_cut_coul_cut.cpp index 9ffa02156e..d4640bee3a 100644 --- a/src/pair_lj_cut_coul_cut.cpp +++ b/src/pair_lj_cut_coul_cut.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_cut.h" #include #include #include -#include "pair_lj_cut_coul_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_cut_coul_debye.cpp b/src/pair_lj_cut_coul_debye.cpp index ab6220bd24..4ef533a743 100644 --- a/src/pair_lj_cut_coul_debye.cpp +++ b/src/pair_lj_cut_coul_debye.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_debye.h" #include #include -#include "pair_lj_cut_coul_debye.h" #include "atom.h" #include "neigh_list.h" #include "force.h" diff --git a/src/pair_lj_cut_coul_wolf.cpp b/src/pair_lj_cut_coul_wolf.cpp index 55aff0d7c5..fb641f7d24 100644 --- a/src/pair_lj_cut_coul_wolf.cpp +++ b/src/pair_lj_cut_coul_wolf.cpp @@ -15,11 +15,11 @@ Contributing author: Vishal Boddu (FAU) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_wolf.h" #include #include #include #include -#include "pair_lj_cut_coul_wolf.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_expand.cpp b/src/pair_lj_expand.cpp index d5c0a40f2d..60593fd01d 100644 --- a/src/pair_lj_expand.cpp +++ b/src/pair_lj_expand.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_expand.h" #include #include #include #include -#include "pair_lj_expand.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_gromacs.cpp b/src/pair_lj_gromacs.cpp index 1fdaefebe9..4796c288d7 100644 --- a/src/pair_lj_gromacs.cpp +++ b/src/pair_lj_gromacs.cpp @@ -15,11 +15,11 @@ Contributing author: Mark Stevens (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_gromacs.h" #include #include #include #include -#include "pair_lj_gromacs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_gromacs_coul_gromacs.cpp b/src/pair_lj_gromacs_coul_gromacs.cpp index 28dc8ec79b..45beeb1daf 100644 --- a/src/pair_lj_gromacs_coul_gromacs.cpp +++ b/src/pair_lj_gromacs_coul_gromacs.cpp @@ -15,11 +15,11 @@ Contributing author: Mark Stevens (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_gromacs_coul_gromacs.h" #include #include #include #include -#include "pair_lj_gromacs_coul_gromacs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_smooth.cpp b/src/pair_lj_smooth.cpp index ecacadbffa..d89fee1148 100644 --- a/src/pair_lj_smooth.cpp +++ b/src/pair_lj_smooth.cpp @@ -15,10 +15,10 @@ Contributing author: Craig Maloney (UCSB) ------------------------------------------------------------------------- */ +#include "pair_lj_smooth.h" #include #include #include -#include "pair_lj_smooth.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_smooth_linear.cpp b/src/pair_lj_smooth_linear.cpp index 265828c4cf..6ed19a452f 100644 --- a/src/pair_lj_smooth_linear.cpp +++ b/src/pair_lj_smooth_linear.cpp @@ -15,10 +15,10 @@ Contributing author: Jonathan Zimmerman (Sandia) ------------------------------------------------------------------------- */ +#include "pair_lj_smooth_linear.h" #include #include #include -#include "pair_lj_smooth_linear.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_mie_cut.cpp b/src/pair_mie_cut.cpp index 231832dc48..d2b0c20cd5 100644 --- a/src/pair_mie_cut.cpp +++ b/src/pair_mie_cut.cpp @@ -15,11 +15,11 @@ Contributing author: Cassiano Aimoli (aimoli@gmail.com) ------------------------------------------------------------------------- */ +#include "pair_mie_cut.h" #include #include #include #include -#include "pair_mie_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_morse.cpp b/src/pair_morse.cpp index dca1834c14..47102932db 100644 --- a/src/pair_morse.cpp +++ b/src/pair_morse.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_morse.h" #include #include #include #include -#include "pair_morse.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_soft.cpp b/src/pair_soft.cpp index 7602f7b925..f3d7423b04 100644 --- a/src/pair_soft.cpp +++ b/src/pair_soft.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_soft.h" #include #include #include #include -#include "pair_soft.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_table.cpp b/src/pair_table.cpp index b1b6f45eda..63cda78c67 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -15,11 +15,11 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_table.h" #include #include #include #include -#include "pair_table.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/pair_ufm.cpp b/src/pair_ufm.cpp index 226fb6e7d9..40b72136ff 100644 --- a/src/pair_ufm.cpp +++ b/src/pair_ufm.cpp @@ -17,11 +17,11 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ +#include "pair_ufm.h" #include #include #include #include -#include "pair_ufm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_yukawa.cpp b/src/pair_yukawa.cpp index 913afbd5a1..4a2cf23952 100644 --- a/src/pair_yukawa.cpp +++ b/src/pair_yukawa.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_yukawa.h" #include #include -#include "pair_yukawa.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/pair_zbl.cpp b/src/pair_zbl.cpp index 254a82ea64..b01c301785 100644 --- a/src/pair_zbl.cpp +++ b/src/pair_zbl.cpp @@ -15,11 +15,11 @@ Contributing authors: Stephen Foiles, Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "pair_zbl.h" #include #include #include #include -#include "pair_zbl.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_zero.cpp b/src/pair_zero.cpp index 143808f598..2692710e20 100644 --- a/src/pair_zero.cpp +++ b/src/pair_zero.cpp @@ -15,11 +15,11 @@ Contributing author: Carsten Svaneborg (SDU) ------------------------------------------------------------------------- */ +#include "pair_zero.h" #include #include #include #include -#include "pair_zero.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/procmap.cpp b/src/procmap.cpp index 08b60a26af..47afb76da9 100644 --- a/src/procmap.cpp +++ b/src/procmap.cpp @@ -15,8 +15,8 @@ Contributing author (NUMA option) : Mike Brown (ORNL) ------------------------------------------------------------------------- */ -#include #include "procmap.h" +#include #include "universe.h" #include "comm.h" #include "domain.h" diff --git a/src/random_mars.cpp b/src/random_mars.cpp index 464e640eab..9de5290d29 100644 --- a/src/random_mars.cpp +++ b/src/random_mars.cpp @@ -14,8 +14,8 @@ // Marsaglia random number generator // see RANMAR in F James, Comp Phys Comm, 60, 329 (1990) -#include #include "random_mars.h" +#include #include "error.h" using namespace LAMMPS_NS; diff --git a/src/random_park.cpp b/src/random_park.cpp index fc00939bd4..e12e8a3a10 100644 --- a/src/random_park.cpp +++ b/src/random_park.cpp @@ -13,8 +13,8 @@ // Park/Miller RNG -#include #include "random_park.h" +#include #include "error.h" using namespace LAMMPS_NS; diff --git a/src/rcb.cpp b/src/rcb.cpp index 83cdccdf80..b19beae3c5 100644 --- a/src/rcb.cpp +++ b/src/rcb.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "rcb.h" #include #include -#include "rcb.h" #include "irregular.h" #include "memory.h" #include "error.h" diff --git a/src/read_data.cpp b/src/read_data.cpp index e70a526c38..a50d41b498 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -15,13 +15,13 @@ // due to OpenMPI bug which sets INT64_MAX via its mpi.h // before lmptype.h can set flags to insure it is done correctly +#include "read_data.h" #include "lmptype.h" #include #include #include #include #include -#include "read_data.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 395f4c8edd..49f96db680 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -19,11 +19,11 @@ // due to OpenMPI bug which sets INT64_MAX via its mpi.h // before lmptype.h can set flags to insure it is done correctly +#include "read_dump.h" #include "lmptype.h" #include #include #include -#include "read_dump.h" #include "reader.h" #include "style_reader.h" #include "atom.h" diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 6e156da837..17b313bfa2 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "read_restart.h" #include #include #include #include -#include "read_restart.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/reader.cpp b/src/reader.cpp index cf344b37b3..a1fe51f662 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "reader.h" #include #include -#include "reader.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/reader_native.cpp b/src/reader_native.cpp index 2c60ffdfd4..9e98a95759 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "reader_native.h" #include #include -#include "reader_native.h" #include "atom.h" #include "memory.h" #include "error.h" diff --git a/src/reader_xyz.cpp b/src/reader_xyz.cpp index 37d30bd740..fa553dc30f 100644 --- a/src/reader_xyz.cpp +++ b/src/reader_xyz.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "reader_xyz.h" #include #include -#include "reader_xyz.h" #include "atom.h" #include "memory.h" #include "error.h" diff --git a/src/region.cpp b/src/region.cpp index 6b49a2819b..0c4bec16e0 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region.h" #include #include #include -#include "region.h" #include "update.h" #include "domain.h" #include "lattice.h" diff --git a/src/region_block.cpp b/src/region_block.cpp index e55c481189..bc52fcd7cf 100644 --- a/src/region_block.cpp +++ b/src/region_block.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region_block.h" #include #include -#include "region_block.h" #include "force.h" #include "domain.h" #include "math_extra.h" diff --git a/src/region_cone.cpp b/src/region_cone.cpp index 72f56a268f..345c9fa8e2 100644 --- a/src/region_cone.cpp +++ b/src/region_cone.cpp @@ -15,10 +15,10 @@ Contributing author: Pim Schravendijk ------------------------------------------------------------------------- */ +#include "region_cone.h" #include #include #include -#include "region_cone.h" #include "domain.h" #include "error.h" #include "force.h" diff --git a/src/region_cylinder.cpp b/src/region_cylinder.cpp index 7709c57aab..968453cf37 100644 --- a/src/region_cylinder.cpp +++ b/src/region_cylinder.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region_cylinder.h" #include #include #include -#include "region_cylinder.h" #include "update.h" #include "domain.h" #include "input.h" diff --git a/src/region_deprecated.cpp b/src/region_deprecated.cpp index 87225959fa..a2e4e88393 100644 --- a/src/region_deprecated.cpp +++ b/src/region_deprecated.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "region_deprecated.h" +#include #include "comm.h" #include "error.h" diff --git a/src/region_intersect.cpp b/src/region_intersect.cpp index 96d3bed16c..c6c11cf35c 100644 --- a/src/region_intersect.cpp +++ b/src/region_intersect.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region_intersect.h" #include #include -#include "region_intersect.h" #include "domain.h" #include "error.h" #include "force.h" diff --git a/src/region_plane.cpp b/src/region_plane.cpp index e67a2c85bd..950c0a4b53 100644 --- a/src/region_plane.cpp +++ b/src/region_plane.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region_plane.h" #include #include #include -#include "region_plane.h" #include "error.h" #include "force.h" diff --git a/src/region_prism.cpp b/src/region_prism.cpp index 22fc504c37..38fc23da21 100644 --- a/src/region_prism.cpp +++ b/src/region_prism.cpp @@ -15,10 +15,10 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "region_prism.h" #include #include #include -#include "region_prism.h" #include "domain.h" #include "force.h" #include "math_extra.h" diff --git a/src/region_sphere.cpp b/src/region_sphere.cpp index 8080ef5882..9c478960e3 100644 --- a/src/region_sphere.cpp +++ b/src/region_sphere.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region_sphere.h" #include #include #include -#include "region_sphere.h" #include "update.h" #include "input.h" #include "variable.h" diff --git a/src/region_union.cpp b/src/region_union.cpp index 33ac6fedd7..f4e30f5b94 100644 --- a/src/region_union.cpp +++ b/src/region_union.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region_union.h" #include #include -#include "region_union.h" #include "domain.h" #include "error.h" #include "force.h" diff --git a/src/replicate.cpp b/src/replicate.cpp index 3c8f4a8aee..6f8c94238a 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "replicate.h" #include #include -#include "replicate.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_hybrid.h" diff --git a/src/rerun.cpp b/src/rerun.cpp index 063ea882c2..e75779ccc0 100644 --- a/src/rerun.cpp +++ b/src/rerun.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "rerun.h" #include #include -#include "rerun.h" #include "read_dump.h" #include "domain.h" #include "update.h" diff --git a/src/reset_ids.cpp b/src/reset_ids.cpp index b2cf7a9bbc..b68b7ca797 100644 --- a/src/reset_ids.cpp +++ b/src/reset_ids.cpp @@ -28,7 +28,7 @@ ResetIDs::ResetIDs(LAMMPS *lmp) : Pointers(lmp) {} /* ---------------------------------------------------------------------- */ -void ResetIDs::command(int narg, char **/*arg*/) +void ResetIDs::command(int narg, char ** /* arg */) { if (domain->box_exist == 0) error->all(FLERR,"Reset_ids command before simulation box is defined"); diff --git a/src/respa.cpp b/src/respa.cpp index 6fa9959d78..867662b3c2 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -15,9 +15,9 @@ Contributing authors: Mark Stevens (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "respa.h" #include #include -#include "respa.h" #include "neighbor.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/run.cpp b/src/run.cpp index beb71be52c..60861ad3b9 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "run.h" #include #include -#include "run.h" #include "domain.h" #include "update.h" #include "force.h" diff --git a/src/set.cpp b/src/set.cpp index 00b2d8a9b0..d34aa7753a 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "set.h" #include #include #include #include -#include "set.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" diff --git a/src/special.cpp b/src/special.cpp index 903794c0f6..f8661e238c 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "special.h" #include #include -#include "special.h" #include "atom.h" #include "atom_vec.h" #include "force.h" diff --git a/src/thermo.cpp b/src/thermo.cpp index f4ab7b0779..d267ea260c 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -15,12 +15,12 @@ // due to OpenMPI bug which sets INT64_MAX via its mpi.h // before lmptype.h can set flags to insure it is done correctly +#include "thermo.h" #include "lmptype.h" #include #include #include #include -#include "thermo.h" #include "atom.h" #include "update.h" #include "comm.h" diff --git a/src/timer.cpp b/src/timer.cpp index 65cb6ab5d8..0dad8fb756 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "timer.h" #include #include #include -#include "timer.h" #include "comm.h" #include "error.h" #include "force.h" diff --git a/src/universe.cpp b/src/universe.cpp index f078590103..2a7117da51 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -11,12 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "universe.h" #include #include #include #include #include -#include "universe.h" #include "version.h" #include "error.h" #include "force.h" diff --git a/src/update.cpp b/src/update.cpp index f5e706e354..e83f4d9f72 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "update.h" #include #include -#include "update.h" #include "integrate.h" #include "min.h" #include "style_integrate.h" diff --git a/src/utils.cpp b/src/utils.cpp index 8468b22d8c..ea2ab57f6f 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "utils.h" #include #include -#include "utils.h" #include "lammps.h" #include "error.h" diff --git a/src/variable.cpp b/src/variable.cpp index 111fc75a9a..440fb07f95 100644 --- a/src/variable.cpp +++ b/src/variable.cpp @@ -11,13 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "variable.h" #include #include #include #include #include #include -#include "variable.h" #include "universe.h" #include "atom.h" #include "update.h" diff --git a/src/velocity.cpp b/src/velocity.cpp index 95d820cc22..1a03f71128 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -11,12 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "velocity.h" #include #include #include #include #include -#include "velocity.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/verlet.cpp b/src/verlet.cpp index fcba248d5f..5ccef36259 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "verlet.h" +#include #include "neighbor.h" #include "domain.h" #include "comm.h" diff --git a/src/write_coeff.cpp b/src/write_coeff.cpp index 9bf54b3c08..08ff964e7c 100644 --- a/src/write_coeff.cpp +++ b/src/write_coeff.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "write_coeff.h" #include #include #include -#include "write_coeff.h" #include "pair.h" #include "bond.h" #include "angle.h" diff --git a/src/write_data.cpp b/src/write_data.cpp index decc92ea8c..b78e701d35 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "write_data.h" #include #include -#include "write_data.h" #include "atom.h" #include "atom_vec.h" #include "group.h" diff --git a/src/write_dump.cpp b/src/write_dump.cpp index 072680a8a5..903f0e0cdd 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "write_dump.h" +#include #include "style_dump.h" #include "dump.h" #include "dump_image.h" diff --git a/src/write_restart.cpp b/src/write_restart.cpp index e0e17cd292..5adb39067c 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "write_restart.h" #include #include -#include "write_restart.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_hybrid.h" -- GitLab From 5b3a15bd944b0dc6a3b49c0f8d088e6797cfc6db Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 Jul 2019 19:44:58 -0400 Subject: [PATCH 120/236] putting implementation header first in package folder sources --- src/ASPHERE/compute_erotate_asphere.cpp | 2 +- src/ASPHERE/compute_temp_asphere.cpp | 2 +- src/ASPHERE/fix_nh_asphere.cpp | 2 +- src/ASPHERE/fix_nph_asphere.cpp | 2 +- src/ASPHERE/fix_npt_asphere.cpp | 2 +- src/ASPHERE/fix_nve_asphere.cpp | 2 +- src/ASPHERE/fix_nve_asphere_noforce.cpp | 2 +- src/ASPHERE/fix_nve_line.cpp | 2 +- src/ASPHERE/fix_nve_tri.cpp | 2 +- src/ASPHERE/fix_nvt_asphere.cpp | 2 +- src/ASPHERE/pair_gayberne.cpp | 2 +- src/ASPHERE/pair_line_lj.cpp | 2 +- src/ASPHERE/pair_resquared.cpp | 2 +- src/ASPHERE/pair_tri_lj.cpp | 2 +- src/BODY/body_nparticle.cpp | 2 +- src/BODY/body_rounded_polygon.cpp | 2 +- src/BODY/body_rounded_polyhedron.cpp | 2 +- src/BODY/compute_body_local.cpp | 2 +- src/BODY/compute_temp_body.cpp | 2 +- src/BODY/fix_nh_body.cpp | 2 +- src/BODY/fix_nph_body.cpp | 2 +- src/BODY/fix_npt_body.cpp | 2 +- src/BODY/fix_nve_body.cpp | 2 +- src/BODY/fix_nvt_body.cpp | 2 +- src/BODY/fix_wall_body_polygon.cpp | 2 +- src/BODY/fix_wall_body_polyhedron.cpp | 2 +- src/BODY/pair_body_nparticle.cpp | 2 +- src/BODY/pair_body_rounded_polygon.cpp | 2 +- src/BODY/pair_body_rounded_polyhedron.cpp | 2 +- src/CLASS2/angle_class2.cpp | 2 +- src/CLASS2/bond_class2.cpp | 2 +- src/CLASS2/dihedral_class2.cpp | 2 +- src/CLASS2/improper_class2.cpp | 2 +- src/CLASS2/pair_lj_class2.cpp | 2 +- src/CLASS2/pair_lj_class2_coul_cut.cpp | 2 +- src/CLASS2/pair_lj_class2_coul_long.cpp | 2 +- src/COLLOID/fix_wall_colloid.cpp | 2 +- src/COLLOID/pair_brownian.cpp | 2 +- src/COLLOID/pair_brownian_poly.cpp | 2 +- src/COLLOID/pair_colloid.cpp | 2 +- src/COLLOID/pair_lubricate.cpp | 2 +- src/COLLOID/pair_lubricateU.cpp | 2 +- src/COLLOID/pair_lubricateU_poly.cpp | 2 +- src/COLLOID/pair_lubricate_poly.cpp | 2 +- src/COLLOID/pair_yukawa_colloid.cpp | 2 +- src/CORESHELL/compute_temp_cs.cpp | 2 +- src/CORESHELL/pair_born_coul_dsf_cs.cpp | 2 +- src/CORESHELL/pair_born_coul_long_cs.cpp | 2 +- src/CORESHELL/pair_born_coul_wolf_cs.cpp | 2 +- src/CORESHELL/pair_buck_coul_long_cs.cpp | 2 +- src/CORESHELL/pair_coul_long_cs.cpp | 2 +- src/CORESHELL/pair_coul_wolf_cs.cpp | 3 +-- src/CORESHELL/pair_lj_cut_coul_long_cs.cpp | 2 +- src/DIPOLE/atom_vec_dipole.cpp | 2 +- src/DIPOLE/pair_lj_cut_dipole_cut.cpp | 2 +- src/DIPOLE/pair_lj_cut_dipole_long.cpp | 2 +- src/DIPOLE/pair_lj_long_dipole_long.cpp | 2 +- src/GPU/fix_gpu.cpp | 2 +- src/GPU/pair_beck_gpu.cpp | 2 +- src/GPU/pair_born_coul_long_cs_gpu.cpp | 2 +- src/GPU/pair_born_coul_long_gpu.cpp | 2 +- src/GPU/pair_born_coul_wolf_cs_gpu.cpp | 2 +- src/GPU/pair_born_coul_wolf_gpu.cpp | 2 +- src/GPU/pair_born_gpu.cpp | 2 +- src/GPU/pair_buck_coul_cut_gpu.cpp | 2 +- src/GPU/pair_buck_coul_long_gpu.cpp | 2 +- src/GPU/pair_buck_gpu.cpp | 2 +- src/GPU/pair_colloid_gpu.cpp | 2 +- src/GPU/pair_coul_cut_gpu.cpp | 2 +- src/GPU/pair_coul_debye_gpu.cpp | 2 +- src/GPU/pair_coul_dsf_gpu.cpp | 2 +- src/GPU/pair_coul_long_cs_gpu.cpp | 2 +- src/GPU/pair_coul_long_gpu.cpp | 2 +- src/GPU/pair_dpd_gpu.cpp | 2 +- src/GPU/pair_dpd_tstat_gpu.cpp | 2 +- src/GPU/pair_eam_alloy_gpu.cpp | 2 +- src/GPU/pair_eam_fs_gpu.cpp | 2 +- src/GPU/pair_eam_gpu.cpp | 2 +- src/GPU/pair_gauss_gpu.cpp | 2 +- src/GPU/pair_gayberne_gpu.cpp | 2 +- src/GPU/pair_lj96_cut_gpu.cpp | 2 +- src/GPU/pair_lj_charmm_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_class2_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_class2_gpu.cpp | 2 +- src/GPU/pair_lj_cubic_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_cut_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_debye_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_dsf_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_cut_coul_msm_gpu.cpp | 2 +- src/GPU/pair_lj_cut_dipole_cut_gpu.cpp | 2 +- src/GPU/pair_lj_cut_dipole_long_gpu.cpp | 2 +- src/GPU/pair_lj_cut_gpu.cpp | 2 +- src/GPU/pair_lj_expand_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_expand_gpu.cpp | 2 +- src/GPU/pair_lj_gromacs_gpu.cpp | 2 +- src/GPU/pair_lj_sdk_coul_long_gpu.cpp | 2 +- src/GPU/pair_lj_sdk_gpu.cpp | 2 +- src/GPU/pair_lj_sf_dipole_sf_gpu.cpp | 2 +- src/GPU/pair_mie_cut_gpu.cpp | 2 +- src/GPU/pair_morse_gpu.cpp | 2 +- src/GPU/pair_resquared_gpu.cpp | 2 +- src/GPU/pair_soft_gpu.cpp | 2 +- src/GPU/pair_sw_gpu.cpp | 2 +- src/GPU/pair_table_gpu.cpp | 2 +- src/GPU/pair_tersoff_gpu.cpp | 2 +- src/GPU/pair_tersoff_mod_gpu.cpp | 2 +- src/GPU/pair_tersoff_zbl_gpu.cpp | 2 +- src/GPU/pair_ufm_gpu.cpp | 2 +- src/GPU/pair_vashishta_gpu.cpp | 3 ++- src/GPU/pair_yukawa_colloid_gpu.cpp | 2 +- src/GPU/pair_yukawa_gpu.cpp | 2 +- src/GPU/pair_zbl_gpu.cpp | 2 +- src/GPU/pppm_gpu.cpp | 2 +- src/GRANULAR/fix_freeze.cpp | 2 +- src/GRANULAR/fix_pour.cpp | 2 +- src/GRANULAR/fix_wall_gran.cpp | 2 +- src/GRANULAR/fix_wall_gran_region.cpp | 2 +- src/GRANULAR/pair_gran_hertz_history.cpp | 2 +- src/GRANULAR/pair_gran_hooke.cpp | 2 +- src/GRANULAR/pair_gran_hooke_history.cpp | 2 +- src/GRANULAR/pair_granular.cpp | 2 +- src/KIM/kim_query.cpp | 2 +- src/KIM/pair_kim.cpp | 4 +--- src/KOKKOS/angle_charmm_kokkos.cpp | 2 +- src/KOKKOS/angle_class2_kokkos.cpp | 2 +- src/KOKKOS/angle_cosine_kokkos.cpp | 2 +- src/KOKKOS/angle_harmonic_kokkos.cpp | 2 +- src/KOKKOS/atom_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_angle_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_atomic_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_bond_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_charge_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_dpd_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_full_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_hybrid_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_molecular_kokkos.cpp | 2 +- src/KOKKOS/atom_vec_sphere_kokkos.cpp | 2 +- src/KOKKOS/bond_class2_kokkos.cpp | 2 +- src/KOKKOS/bond_fene_kokkos.cpp | 2 +- src/KOKKOS/bond_harmonic_kokkos.cpp | 2 +- src/KOKKOS/comm_tiled_kokkos.cpp | 2 +- src/KOKKOS/compute_temp_kokkos.cpp | 2 +- src/KOKKOS/dihedral_charmm_kokkos.cpp | 2 +- src/KOKKOS/dihedral_class2_kokkos.cpp | 2 +- src/KOKKOS/dihedral_opls_kokkos.cpp | 2 +- src/KOKKOS/fix_deform_kokkos.cpp | 2 +- src/KOKKOS/fix_dpd_energy_kokkos.cpp | 2 +- src/KOKKOS/fix_enforce2d_kokkos.cpp | 2 +- src/KOKKOS/fix_eos_table_rx_kokkos.cpp | 2 +- src/KOKKOS/fix_langevin_kokkos.cpp | 2 +- src/KOKKOS/fix_momentum_kokkos.cpp | 2 +- src/KOKKOS/fix_nh_kokkos.cpp | 2 +- src/KOKKOS/fix_nph_kokkos.cpp | 2 +- src/KOKKOS/fix_npt_kokkos.cpp | 2 +- src/KOKKOS/fix_nve_kokkos.cpp | 2 +- src/KOKKOS/fix_nvt_kokkos.cpp | 2 +- src/KOKKOS/fix_property_atom_kokkos.cpp | 2 +- src/KOKKOS/fix_qeq_reax_kokkos.cpp | 2 +- src/KOKKOS/fix_reaxc_bonds_kokkos.cpp | 2 +- src/KOKKOS/fix_reaxc_species_kokkos.cpp | 2 +- src/KOKKOS/fix_rx_kokkos.cpp | 2 +- src/KOKKOS/fix_setforce_kokkos.cpp | 2 +- src/KOKKOS/fix_shardlow_kokkos.cpp | 2 +- src/KOKKOS/fix_wall_lj93_kokkos.cpp | 2 +- src/KOKKOS/fix_wall_reflect_kokkos.cpp | 2 +- src/KOKKOS/gridcomm_kokkos.cpp | 2 +- src/KOKKOS/improper_class2_kokkos.cpp | 2 +- src/KOKKOS/improper_harmonic_kokkos.cpp | 2 +- src/KOKKOS/kokkos.cpp | 2 +- src/KOKKOS/math_special_kokkos.cpp | 2 +- src/KOKKOS/pair_buck_coul_cut_kokkos.cpp | 2 +- src/KOKKOS/pair_buck_coul_long_kokkos.cpp | 2 +- src/KOKKOS/pair_buck_kokkos.cpp | 2 +- src/KOKKOS/pair_coul_cut_kokkos.cpp | 2 +- src/KOKKOS/pair_coul_debye_kokkos.cpp | 2 +- src/KOKKOS/pair_coul_dsf_kokkos.cpp | 2 +- src/KOKKOS/pair_coul_long_kokkos.cpp | 2 +- src/KOKKOS/pair_coul_wolf_kokkos.cpp | 2 +- src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 3 +-- src/KOKKOS/pair_eam_alloy_kokkos.cpp | 2 +- src/KOKKOS/pair_eam_fs_kokkos.cpp | 2 +- src/KOKKOS/pair_eam_kokkos.cpp | 2 +- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 2 +- src/KOKKOS/pair_hybrid_kokkos.cpp | 2 +- src/KOKKOS/pair_hybrid_overlay_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_class2_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_cut_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_expand_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_gromacs_kokkos.cpp | 2 +- src/KOKKOS/pair_lj_sdk_kokkos.cpp | 2 +- src/KOKKOS/pair_morse_kokkos.cpp | 2 +- src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp | 4 ++-- src/KOKKOS/pair_reaxc_kokkos.cpp | 2 +- src/KOKKOS/pair_sw_kokkos.cpp | 2 +- src/KOKKOS/pair_table_kokkos.cpp | 2 +- src/KOKKOS/pair_table_rx_kokkos.cpp | 2 +- src/KOKKOS/pair_tersoff_kokkos.cpp | 2 +- src/KOKKOS/pair_tersoff_mod_kokkos.cpp | 2 +- src/KOKKOS/pair_tersoff_zbl_kokkos.cpp | 2 +- src/KOKKOS/pair_vashishta_kokkos.cpp | 2 +- src/KOKKOS/pair_yukawa_kokkos.cpp | 3 ++- src/KOKKOS/pair_zbl_kokkos.cpp | 2 +- src/KOKKOS/pppm_kokkos.cpp | 2 +- src/KOKKOS/rand_pool_wrap_kokkos.cpp | 2 +- src/KOKKOS/region_block_kokkos.cpp | 2 +- src/KOKKOS/verlet_kokkos.cpp | 2 +- src/KSPACE/ewald.cpp | 2 +- src/KSPACE/ewald_dipole.cpp | 2 +- src/KSPACE/ewald_dipole_spin.cpp | 2 +- src/KSPACE/ewald_disp.cpp | 2 +- src/KSPACE/fft3d.cpp | 2 +- src/KSPACE/fft3d_wrap.cpp | 2 +- src/KSPACE/fix_tune_kspace.cpp | 2 +- src/KSPACE/gridcomm.cpp | 2 +- src/KSPACE/msm.cpp | 2 +- src/KSPACE/msm_cg.cpp | 2 +- src/KSPACE/pair_born_coul_long.cpp | 2 +- src/KSPACE/pair_born_coul_msm.cpp | 2 +- src/KSPACE/pair_buck_coul_long.cpp | 2 +- src/KSPACE/pair_buck_coul_msm.cpp | 2 +- src/KSPACE/pair_buck_long_coul_long.cpp | 2 +- src/KSPACE/pair_coul_long.cpp | 2 +- src/KSPACE/pair_coul_msm.cpp | 2 +- src/KSPACE/pair_lj_charmm_coul_long.cpp | 2 +- src/KSPACE/pair_lj_charmm_coul_msm.cpp | 2 +- src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 2 +- src/KSPACE/pair_lj_cut_coul_long.cpp | 2 +- src/KSPACE/pair_lj_cut_coul_msm.cpp | 2 +- src/KSPACE/pair_lj_cut_tip4p_long.cpp | 2 +- src/KSPACE/pair_lj_long_coul_long.cpp | 2 +- src/KSPACE/pair_lj_long_tip4p_long.cpp | 2 +- src/KSPACE/pair_tip4p_long.cpp | 2 +- src/KSPACE/pppm.cpp | 2 +- src/KSPACE/pppm_cg.cpp | 4 +--- src/KSPACE/pppm_dipole.cpp | 2 +- src/KSPACE/pppm_dipole_spin.cpp | 2 +- src/KSPACE/pppm_disp.cpp | 2 +- src/KSPACE/pppm_disp_tip4p.cpp | 2 +- src/KSPACE/pppm_stagger.cpp | 2 +- src/KSPACE/pppm_tip4p.cpp | 2 +- src/KSPACE/remap.cpp | 2 +- src/KSPACE/remap_wrap.cpp | 2 +- 253 files changed, 256 insertions(+), 260 deletions(-) diff --git a/src/ASPHERE/compute_erotate_asphere.cpp b/src/ASPHERE/compute_erotate_asphere.cpp index afec2a9b28..665506acdf 100644 --- a/src/ASPHERE/compute_erotate_asphere.cpp +++ b/src/ASPHERE/compute_erotate_asphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_erotate_asphere.h" +#include #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index 011d8cae80..32773b2925 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "compute_temp_asphere.h" #include #include -#include "compute_temp_asphere.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/ASPHERE/fix_nh_asphere.cpp b/src/ASPHERE/fix_nh_asphere.cpp index 828c064a52..9e8e9d73d9 100644 --- a/src/ASPHERE/fix_nh_asphere.cpp +++ b/src/ASPHERE/fix_nh_asphere.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "fix_nh_asphere.h" #include #include #include #include "math_extra.h" -#include "fix_nh_asphere.h" #include "atom.h" #include "atom_vec_ellipsoid.h" #include "group.h" diff --git a/src/ASPHERE/fix_nph_asphere.cpp b/src/ASPHERE/fix_nph_asphere.cpp index 5f201a8463..70880701ca 100644 --- a/src/ASPHERE/fix_nph_asphere.cpp +++ b/src/ASPHERE/fix_nph_asphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nph_asphere.h" +#include #include "modify.h" #include "error.h" diff --git a/src/ASPHERE/fix_npt_asphere.cpp b/src/ASPHERE/fix_npt_asphere.cpp index 5d52891169..26d4fff81d 100644 --- a/src/ASPHERE/fix_npt_asphere.cpp +++ b/src/ASPHERE/fix_npt_asphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_npt_asphere.h" +#include #include "modify.h" #include "error.h" diff --git a/src/ASPHERE/fix_nve_asphere.cpp b/src/ASPHERE/fix_nve_asphere.cpp index 61e3c35293..05219e442f 100644 --- a/src/ASPHERE/fix_nve_asphere.cpp +++ b/src/ASPHERE/fix_nve_asphere.cpp @@ -15,10 +15,10 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "fix_nve_asphere.h" #include #include #include -#include "fix_nve_asphere.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/ASPHERE/fix_nve_asphere_noforce.cpp b/src/ASPHERE/fix_nve_asphere_noforce.cpp index 9cc430592a..015cc8cfb6 100644 --- a/src/ASPHERE/fix_nve_asphere_noforce.cpp +++ b/src/ASPHERE/fix_nve_asphere_noforce.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nve_asphere_noforce.h" #include #include #include -#include "fix_nve_asphere_noforce.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/ASPHERE/fix_nve_line.cpp b/src/ASPHERE/fix_nve_line.cpp index 51a502df89..57335f22e0 100644 --- a/src/ASPHERE/fix_nve_line.cpp +++ b/src/ASPHERE/fix_nve_line.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nve_line.h" #include #include #include -#include "fix_nve_line.h" #include "atom.h" #include "atom_vec_line.h" #include "domain.h" diff --git a/src/ASPHERE/fix_nve_tri.cpp b/src/ASPHERE/fix_nve_tri.cpp index fb9bf64c58..b1f7667d06 100644 --- a/src/ASPHERE/fix_nve_tri.cpp +++ b/src/ASPHERE/fix_nve_tri.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nve_tri.h" #include #include #include -#include "fix_nve_tri.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_tri.h" diff --git a/src/ASPHERE/fix_nvt_asphere.cpp b/src/ASPHERE/fix_nvt_asphere.cpp index 5ef91923eb..597fb03514 100644 --- a/src/ASPHERE/fix_nvt_asphere.cpp +++ b/src/ASPHERE/fix_nvt_asphere.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nvt_asphere.h" +#include #include "group.h" #include "modify.h" #include "error.h" diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index 3d4ed3f183..7dbf11c5ea 100644 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_gayberne.h" #include #include #include #include -#include "pair_gayberne.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index 4873b44dc4..0cb603c4fa 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_line_lj.h" #include #include #include #include -#include "pair_line_lj.h" #include "atom.h" #include "atom_vec_line.h" #include "force.h" diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index b100a5f184..ba73c5ba0c 100644 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_resquared.h" #include #include #include #include -#include "pair_resquared.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/ASPHERE/pair_tri_lj.cpp b/src/ASPHERE/pair_tri_lj.cpp index cefd73f976..3dde2a4f44 100644 --- a/src/ASPHERE/pair_tri_lj.cpp +++ b/src/ASPHERE/pair_tri_lj.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_tri_lj.h" #include #include #include #include -#include "pair_tri_lj.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_tri.h" diff --git a/src/BODY/body_nparticle.cpp b/src/BODY/body_nparticle.cpp index b2d9dbaca3..353ce5550c 100644 --- a/src/BODY/body_nparticle.cpp +++ b/src/BODY/body_nparticle.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "body_nparticle.h" #include #include -#include "body_nparticle.h" #include "my_pool_chunk.h" #include "math_extra.h" #include "atom_vec_body.h" diff --git a/src/BODY/body_rounded_polygon.cpp b/src/BODY/body_rounded_polygon.cpp index 6e1e49319e..21f1d7e221 100644 --- a/src/BODY/body_rounded_polygon.cpp +++ b/src/BODY/body_rounded_polygon.cpp @@ -15,9 +15,9 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "body_rounded_polygon.h" #include #include -#include "body_rounded_polygon.h" #include "my_pool_chunk.h" #include "atom_vec_body.h" #include "atom.h" diff --git a/src/BODY/body_rounded_polyhedron.cpp b/src/BODY/body_rounded_polyhedron.cpp index 4b5208c397..15e1871e02 100644 --- a/src/BODY/body_rounded_polyhedron.cpp +++ b/src/BODY/body_rounded_polyhedron.cpp @@ -15,9 +15,9 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "body_rounded_polyhedron.h" #include #include -#include "body_rounded_polyhedron.h" #include "my_pool_chunk.h" #include "atom_vec_body.h" #include "atom.h" diff --git a/src/BODY/compute_body_local.cpp b/src/BODY/compute_body_local.cpp index 20f7d76708..f58b66c2ca 100644 --- a/src/BODY/compute_body_local.cpp +++ b/src/BODY/compute_body_local.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_body_local.h" #include #include -#include "compute_body_local.h" #include "atom.h" #include "atom_vec_body.h" #include "body.h" diff --git a/src/BODY/compute_temp_body.cpp b/src/BODY/compute_temp_body.cpp index 5446fb6d64..7beca36df8 100644 --- a/src/BODY/compute_temp_body.cpp +++ b/src/BODY/compute_temp_body.cpp @@ -16,9 +16,9 @@ based on ComputeTempAsphere ------------------------------------------------------------------------- */ +#include "compute_temp_body.h" #include #include -#include "compute_temp_body.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" diff --git a/src/BODY/fix_nh_body.cpp b/src/BODY/fix_nh_body.cpp index 9739842419..6064f1f9de 100644 --- a/src/BODY/fix_nh_body.cpp +++ b/src/BODY/fix_nh_body.cpp @@ -16,11 +16,11 @@ based on FixNHAsphere ------------------------------------------------------------------------- */ +#include "fix_nh_body.h" #include #include #include #include "math_extra.h" -#include "fix_nh_body.h" #include "atom.h" #include "atom_vec_body.h" #include "group.h" diff --git a/src/BODY/fix_nph_body.cpp b/src/BODY/fix_nph_body.cpp index e647488bce..a65c951c96 100644 --- a/src/BODY/fix_nph_body.cpp +++ b/src/BODY/fix_nph_body.cpp @@ -15,8 +15,8 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include #include "fix_nph_body.h" +#include #include "modify.h" #include "error.h" diff --git a/src/BODY/fix_npt_body.cpp b/src/BODY/fix_npt_body.cpp index 3c30e9e4e9..7e8097486e 100644 --- a/src/BODY/fix_npt_body.cpp +++ b/src/BODY/fix_npt_body.cpp @@ -15,8 +15,8 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include #include "fix_npt_body.h" +#include #include "modify.h" #include "error.h" diff --git a/src/BODY/fix_nve_body.cpp b/src/BODY/fix_nve_body.cpp index 0c74facf34..3f3bd41cbc 100644 --- a/src/BODY/fix_nve_body.cpp +++ b/src/BODY/fix_nve_body.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nve_body.h" #include #include #include -#include "fix_nve_body.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" diff --git a/src/BODY/fix_nvt_body.cpp b/src/BODY/fix_nvt_body.cpp index 273b5e7fff..efb05143a1 100644 --- a/src/BODY/fix_nvt_body.cpp +++ b/src/BODY/fix_nvt_body.cpp @@ -15,8 +15,8 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ -#include #include "fix_nvt_body.h" +#include #include "group.h" #include "modify.h" #include "error.h" diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp index 221937461b..8f27a094cb 100644 --- a/src/BODY/fix_wall_body_polygon.cpp +++ b/src/BODY/fix_wall_body_polygon.cpp @@ -15,10 +15,10 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "fix_wall_body_polygon.h" #include #include #include -#include "fix_wall_body_polygon.h" #include "atom.h" #include "atom_vec_body.h" #include "body_rounded_polygon.h" diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index 24a9e51dad..37b542803f 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -15,10 +15,10 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "fix_wall_body_polyhedron.h" #include #include #include -#include "fix_wall_body_polyhedron.h" #include "atom.h" #include "atom_vec_body.h" #include "body_rounded_polyhedron.h" diff --git a/src/BODY/pair_body_nparticle.cpp b/src/BODY/pair_body_nparticle.cpp index f2eb2aa520..96a7af6255 100644 --- a/src/BODY/pair_body_nparticle.cpp +++ b/src/BODY/pair_body_nparticle.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_body_nparticle.h" #include #include #include #include -#include "pair_body_nparticle.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" diff --git a/src/BODY/pair_body_rounded_polygon.cpp b/src/BODY/pair_body_rounded_polygon.cpp index 69495ea57f..c818b5a2e6 100644 --- a/src/BODY/pair_body_rounded_polygon.cpp +++ b/src/BODY/pair_body_rounded_polygon.cpp @@ -18,11 +18,11 @@ the contact history for friction forces. ------------------------------------------------------------------------- */ +#include "pair_body_rounded_polygon.h" #include #include #include #include -#include "pair_body_rounded_polygon.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" diff --git a/src/BODY/pair_body_rounded_polyhedron.cpp b/src/BODY/pair_body_rounded_polyhedron.cpp index 60f6df3582..75caab88bd 100644 --- a/src/BODY/pair_body_rounded_polyhedron.cpp +++ b/src/BODY/pair_body_rounded_polyhedron.cpp @@ -20,11 +20,11 @@ the contact history for friction forces. ------------------------------------------------------------------------- */ +#include "pair_body_rounded_polyhedron.h" #include #include #include #include -#include "pair_body_rounded_polyhedron.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" diff --git a/src/CLASS2/angle_class2.cpp b/src/CLASS2/angle_class2.cpp index d550767e5e..340152abd4 100644 --- a/src/CLASS2/angle_class2.cpp +++ b/src/CLASS2/angle_class2.cpp @@ -15,10 +15,10 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ +#include "angle_class2.h" #include #include #include -#include "angle_class2.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index 26c4e63a4d..945555f772 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -15,9 +15,9 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ +#include "bond_class2.h" #include #include -#include "bond_class2.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/CLASS2/dihedral_class2.cpp b/src/CLASS2/dihedral_class2.cpp index c471b1f353..c36d976525 100644 --- a/src/CLASS2/dihedral_class2.cpp +++ b/src/CLASS2/dihedral_class2.cpp @@ -15,10 +15,10 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ +#include "dihedral_class2.h" #include #include #include -#include "dihedral_class2.h" #include "atom.h" #include "neighbor.h" #include "update.h" diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp index ccb81aebd9..aff37df318 100644 --- a/src/CLASS2/improper_class2.cpp +++ b/src/CLASS2/improper_class2.cpp @@ -15,10 +15,10 @@ Contributing author: Eric Simon (Cray) ------------------------------------------------------------------------- */ +#include "improper_class2.h" #include #include #include -#include "improper_class2.h" #include "atom.h" #include "neighbor.h" #include "update.h" diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index 60b988926a..9a67fafecb 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -9,11 +9,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2.h" #include #include #include #include -#include "pair_lj_class2.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index 8dc038b8fc..24620611c6 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2_coul_cut.h" #include #include #include #include -#include "pair_lj_class2_coul_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index c92c7b78f1..cd11294327 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2_coul_long.h" #include #include #include #include -#include "pair_lj_class2_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/COLLOID/fix_wall_colloid.cpp b/src/COLLOID/fix_wall_colloid.cpp index 095d01eef3..f2e895c4f3 100644 --- a/src/COLLOID/fix_wall_colloid.cpp +++ b/src/COLLOID/fix_wall_colloid.cpp @@ -15,9 +15,9 @@ Contributing authors: Jeremy Lechman (SNL) ------------------------------------------------------------------------- */ +#include "fix_wall_colloid.h" #include #include -#include "fix_wall_colloid.h" #include "atom.h" #include "atom_vec.h" #include "update.h" diff --git a/src/COLLOID/pair_brownian.cpp b/src/COLLOID/pair_brownian.cpp index aefa96b1fb..f9185264e0 100644 --- a/src/COLLOID/pair_brownian.cpp +++ b/src/COLLOID/pair_brownian.cpp @@ -15,11 +15,11 @@ Contributing authors: Amit Kumar and Michael Bybee (UIUC) ------------------------------------------------------------------------- */ +#include "pair_brownian.h" #include #include #include #include -#include "pair_brownian.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/COLLOID/pair_brownian_poly.cpp b/src/COLLOID/pair_brownian_poly.cpp index 389ae084b7..250dcef1fd 100644 --- a/src/COLLOID/pair_brownian_poly.cpp +++ b/src/COLLOID/pair_brownian_poly.cpp @@ -16,11 +16,11 @@ Dave Heine (Corning), polydispersity ------------------------------------------------------------------------- */ +#include "pair_brownian_poly.h" #include #include #include #include -#include "pair_brownian_poly.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/COLLOID/pair_colloid.cpp b/src/COLLOID/pair_colloid.cpp index 04c35a7c00..306cdfebdf 100644 --- a/src/COLLOID/pair_colloid.cpp +++ b/src/COLLOID/pair_colloid.cpp @@ -15,11 +15,11 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "pair_colloid.h" #include #include #include #include -#include "pair_colloid.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index 4e629bd442..ee55c6cbf5 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -16,11 +16,11 @@ Amit Kumar and Michael Bybee (UIUC) ------------------------------------------------------------------------- */ +#include "pair_lubricate.h" #include #include #include #include -#include "pair_lubricate.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/COLLOID/pair_lubricateU.cpp b/src/COLLOID/pair_lubricateU.cpp index 3ea3d4fe4a..be589167c9 100644 --- a/src/COLLOID/pair_lubricateU.cpp +++ b/src/COLLOID/pair_lubricateU.cpp @@ -15,12 +15,12 @@ Contributing authors: Amit Kumar and Michael Bybee (UIUC) ------------------------------------------------------------------------- */ +#include "pair_lubricateU.h" #include #include #include #include #include -#include "pair_lubricateU.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/COLLOID/pair_lubricateU_poly.cpp b/src/COLLOID/pair_lubricateU_poly.cpp index 4fec95dcd8..ebcf939cff 100644 --- a/src/COLLOID/pair_lubricateU_poly.cpp +++ b/src/COLLOID/pair_lubricateU_poly.cpp @@ -17,12 +17,12 @@ Dave Heine (Corning), polydispersity ------------------------------------------------------------------------- */ +#include "pair_lubricateU_poly.h" #include #include #include #include #include -#include "pair_lubricateU_poly.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/COLLOID/pair_lubricate_poly.cpp b/src/COLLOID/pair_lubricate_poly.cpp index ffbe7fce3c..f1bfa0c695 100644 --- a/src/COLLOID/pair_lubricate_poly.cpp +++ b/src/COLLOID/pair_lubricate_poly.cpp @@ -17,11 +17,11 @@ Dave Heine (Corning), polydispersity ------------------------------------------------------------------------- */ +#include "pair_lubricate_poly.h" #include #include #include #include -#include "pair_lubricate_poly.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/COLLOID/pair_yukawa_colloid.cpp b/src/COLLOID/pair_yukawa_colloid.cpp index ab7d088508..98d0586925 100644 --- a/src/COLLOID/pair_yukawa_colloid.cpp +++ b/src/COLLOID/pair_yukawa_colloid.cpp @@ -15,9 +15,9 @@ Contributing authors: Randy Schunk (Sandia) ------------------------------------------------------------------------- */ +#include "pair_yukawa_colloid.h" #include #include -#include "pair_yukawa_colloid.h" #include "atom.h" #include "atom_vec.h" #include "force.h" diff --git a/src/CORESHELL/compute_temp_cs.cpp b/src/CORESHELL/compute_temp_cs.cpp index 03ebfa154d..4217fe3410 100644 --- a/src/CORESHELL/compute_temp_cs.cpp +++ b/src/CORESHELL/compute_temp_cs.cpp @@ -16,11 +16,11 @@ (hendrik.heenen at mytum.com) ------------------------------------------------------------------------- */ +#include "compute_temp_cs.h" #include #include #include #include -#include "compute_temp_cs.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/CORESHELL/pair_born_coul_dsf_cs.cpp b/src/CORESHELL/pair_born_coul_dsf_cs.cpp index f4d7447ade..cd932e560b 100644 --- a/src/CORESHELL/pair_born_coul_dsf_cs.cpp +++ b/src/CORESHELL/pair_born_coul_dsf_cs.cpp @@ -16,11 +16,11 @@ References: Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ +#include "pair_born_coul_dsf_cs.h" #include #include #include #include -#include "pair_born_coul_dsf_cs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CORESHELL/pair_born_coul_long_cs.cpp b/src/CORESHELL/pair_born_coul_long_cs.cpp index a19f8c34a8..2ef7fdb273 100644 --- a/src/CORESHELL/pair_born_coul_long_cs.cpp +++ b/src/CORESHELL/pair_born_coul_long_cs.cpp @@ -15,11 +15,11 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ +#include "pair_born_coul_long_cs.h" #include #include #include #include -#include "pair_born_coul_long_cs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CORESHELL/pair_born_coul_wolf_cs.cpp b/src/CORESHELL/pair_born_coul_wolf_cs.cpp index 7b52c28664..c0374e2ddb 100644 --- a/src/CORESHELL/pair_born_coul_wolf_cs.cpp +++ b/src/CORESHELL/pair_born_coul_wolf_cs.cpp @@ -12,11 +12,11 @@ ------------------------------------------------------------------------- */ +#include "pair_born_coul_wolf_cs.h" #include #include #include #include -#include "pair_born_coul_wolf_cs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CORESHELL/pair_buck_coul_long_cs.cpp b/src/CORESHELL/pair_buck_coul_long_cs.cpp index 8df91f39a3..6c897622fa 100644 --- a/src/CORESHELL/pair_buck_coul_long_cs.cpp +++ b/src/CORESHELL/pair_buck_coul_long_cs.cpp @@ -15,11 +15,11 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ +#include "pair_buck_coul_long_cs.h" #include #include #include #include -#include "pair_buck_coul_long_cs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CORESHELL/pair_coul_long_cs.cpp b/src/CORESHELL/pair_coul_long_cs.cpp index c8c8387d6d..6094ae072a 100644 --- a/src/CORESHELL/pair_coul_long_cs.cpp +++ b/src/CORESHELL/pair_coul_long_cs.cpp @@ -15,11 +15,11 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ +#include "pair_coul_long_cs.h" #include #include #include #include -#include "pair_coul_long_cs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CORESHELL/pair_coul_wolf_cs.cpp b/src/CORESHELL/pair_coul_wolf_cs.cpp index 36e037bfc8..40ade7bfe4 100644 --- a/src/CORESHELL/pair_coul_wolf_cs.cpp +++ b/src/CORESHELL/pair_coul_wolf_cs.cpp @@ -11,12 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ - +#include "pair_coul_wolf_cs.h" #include #include #include #include -#include "pair_coul_wolf_cs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp index 56c75f0f5d..3f20377cf1 100644 --- a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp +++ b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp @@ -15,11 +15,11 @@ Contributing author: Hendrik Heenen (hendrik.heenen@mytum.de) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_long_cs.h" #include #include #include #include -#include "pair_lj_cut_coul_long_cs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index c304ae3bc6..67e5aa9e70 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_dipole.h" #include #include -#include "atom_vec_dipole.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp index 18b78c55e0..44708edec9 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_cut_dipole_cut.h" #include #include #include -#include "pair_lj_cut_dipole_cut.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/DIPOLE/pair_lj_cut_dipole_long.cpp b/src/DIPOLE/pair_lj_cut_dipole_long.cpp index 42446a3777..071dbaeb02 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_long.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_cut_dipole_long.h" #include #include #include #include -#include "pair_lj_cut_dipole_long.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index fbdc47a15b..1391cc1a1a 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -15,13 +15,13 @@ Contributing author: Pieter J. in 't Veld and Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "pair_lj_long_dipole_long.h" #include #include #include #include #include "math_const.h" #include "math_vector.h" -#include "pair_lj_long_dipole_long.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/GPU/fix_gpu.cpp b/src/GPU/fix_gpu.cpp index f0558e6a02..d4397503dc 100644 --- a/src/GPU/fix_gpu.cpp +++ b/src/GPU/fix_gpu.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_gpu.h" #include #include -#include "fix_gpu.h" #include "atom.h" #include "force.h" #include "pair.h" diff --git a/src/GPU/pair_beck_gpu.cpp b/src/GPU/pair_beck_gpu.cpp index 9f76975ef1..d4d36a5837 100644 --- a/src/GPU/pair_beck_gpu.cpp +++ b/src/GPU/pair_beck_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_beck_gpu.h" #include #include #include #include -#include "pair_beck_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_born_coul_long_cs_gpu.cpp b/src/GPU/pair_born_coul_long_cs_gpu.cpp index 291ad8ad1f..7314024d71 100644 --- a/src/GPU/pair_born_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_long_cs_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (Northwestern) ------------------------------------------------------------------------- */ +#include "pair_born_coul_long_cs_gpu.h" #include #include #include #include -#include "pair_born_coul_long_cs_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_born_coul_long_gpu.cpp b/src/GPU/pair_born_coul_long_gpu.cpp index eb204691c7..79c0d5f147 100644 --- a/src/GPU/pair_born_coul_long_gpu.cpp +++ b/src/GPU/pair_born_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_born_coul_long_gpu.h" #include #include #include #include -#include "pair_born_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp index 4877a442b5..5f74d3fc7c 100644 --- a/src/GPU/pair_born_coul_wolf_cs_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_cs_gpu.cpp @@ -15,11 +15,11 @@ Contributing authors: Trung Dac Nguyen (Northwestern) ------------------------------------------------------------------------- */ +#include "pair_born_coul_wolf_cs_gpu.h" #include #include #include #include -#include "pair_born_coul_wolf_cs_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_born_coul_wolf_gpu.cpp b/src/GPU/pair_born_coul_wolf_gpu.cpp index 851174988b..693c2abffb 100644 --- a/src/GPU/pair_born_coul_wolf_gpu.cpp +++ b/src/GPU/pair_born_coul_wolf_gpu.cpp @@ -15,11 +15,11 @@ Contributing authors: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_born_coul_wolf_gpu.h" #include #include #include #include -#include "pair_born_coul_wolf_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_born_gpu.cpp b/src/GPU/pair_born_gpu.cpp index 253d2d7282..e9edc4f1c2 100644 --- a/src/GPU/pair_born_gpu.cpp +++ b/src/GPU/pair_born_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_born_gpu.h" #include #include #include #include -#include "pair_born_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_buck_coul_cut_gpu.cpp b/src/GPU/pair_buck_coul_cut_gpu.cpp index ed602f9cab..182673fb0d 100644 --- a/src/GPU/pair_buck_coul_cut_gpu.cpp +++ b/src/GPU/pair_buck_coul_cut_gpu.cpp @@ -15,11 +15,11 @@ Contributing authors: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_buck_coul_cut_gpu.h" #include #include #include #include -#include "pair_buck_coul_cut_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_buck_coul_long_gpu.cpp b/src/GPU/pair_buck_coul_long_gpu.cpp index d6b9e53282..75e784fafa 100644 --- a/src/GPU/pair_buck_coul_long_gpu.cpp +++ b/src/GPU/pair_buck_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_buck_coul_long_gpu.h" #include #include #include #include -#include "pair_buck_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_buck_gpu.cpp b/src/GPU/pair_buck_gpu.cpp index 8c85407e6e..1559c45b88 100644 --- a/src/GPU/pair_buck_gpu.cpp +++ b/src/GPU/pair_buck_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_buck_gpu.h" #include #include #include #include -#include "pair_buck_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_colloid_gpu.cpp b/src/GPU/pair_colloid_gpu.cpp index 0ee8708b5b..4db18dbc52 100644 --- a/src/GPU/pair_colloid_gpu.cpp +++ b/src/GPU/pair_colloid_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_colloid_gpu.h" #include #include #include #include -#include "pair_colloid_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_coul_cut_gpu.cpp b/src/GPU/pair_coul_cut_gpu.cpp index fb50c446b1..8a3eb12f8d 100644 --- a/src/GPU/pair_coul_cut_gpu.cpp +++ b/src/GPU/pair_coul_cut_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen ------------------------------------------------------------------------- */ +#include "pair_coul_cut_gpu.h" #include #include #include #include -#include "pair_coul_cut_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_coul_debye_gpu.cpp b/src/GPU/pair_coul_debye_gpu.cpp index ec771a9935..1fc07f8dac 100644 --- a/src/GPU/pair_coul_debye_gpu.cpp +++ b/src/GPU/pair_coul_debye_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ndtrung@umich.edu) ------------------------------------------------------------------------- */ +#include "pair_coul_debye_gpu.h" #include #include #include #include -#include "pair_coul_debye_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_coul_dsf_gpu.cpp b/src/GPU/pair_coul_dsf_gpu.cpp index 1753b8a91c..408be036dd 100644 --- a/src/GPU/pair_coul_dsf_gpu.cpp +++ b/src/GPU/pair_coul_dsf_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_coul_dsf_gpu.h" #include #include #include #include -#include "pair_coul_dsf_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_coul_long_cs_gpu.cpp b/src/GPU/pair_coul_long_cs_gpu.cpp index 6ca00d6361..c70424e472 100644 --- a/src/GPU/pair_coul_long_cs_gpu.cpp +++ b/src/GPU/pair_coul_long_cs_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Nguyen (Northwestern) ------------------------------------------------------------------------- */ +#include "pair_coul_long_cs_gpu.h" #include #include #include #include -#include "pair_coul_long_cs_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_coul_long_gpu.cpp b/src/GPU/pair_coul_long_gpu.cpp index f75d10b6dd..9623c25f2f 100644 --- a/src/GPU/pair_coul_long_gpu.cpp +++ b/src/GPU/pair_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Axel Kohlmeyer (Temple) ------------------------------------------------------------------------- */ +#include "pair_coul_long_gpu.h" #include #include #include #include -#include "pair_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_dpd_gpu.cpp b/src/GPU/pair_dpd_gpu.cpp index b1e45fbecd..5fcad6a350 100644 --- a/src/GPU/pair_dpd_gpu.cpp +++ b/src/GPU/pair_dpd_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_dpd_gpu.h" #include #include #include #include -#include "pair_dpd_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_dpd_tstat_gpu.cpp b/src/GPU/pair_dpd_tstat_gpu.cpp index 0693a27344..2d6798a12d 100644 --- a/src/GPU/pair_dpd_tstat_gpu.cpp +++ b/src/GPU/pair_dpd_tstat_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_dpd_tstat_gpu.h" #include #include #include #include -#include "pair_dpd_tstat_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index 9b3412d3d1..bc55c66676 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -15,10 +15,10 @@ Contributing authors: Trung Dac Nguyen (ORNL), W. Michael Brown (ORNL) ------------------------------------------------------------------------- */ +#include "pair_eam_alloy_gpu.h" #include #include #include -#include "pair_eam_alloy_gpu.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index 11ef28af3e..ac379a9ce6 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -15,10 +15,10 @@ Contributing authors: Trung Dac Nguyen (ORNL), W. Michael Brown (ORNL) ------------------------------------------------------------------------- */ +#include "pair_eam_fs_gpu.h" #include #include #include -#include "pair_eam_fs_gpu.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/GPU/pair_eam_gpu.cpp b/src/GPU/pair_eam_gpu.cpp index 4788a72417..57106f48a4 100644 --- a/src/GPU/pair_eam_gpu.cpp +++ b/src/GPU/pair_eam_gpu.cpp @@ -15,11 +15,11 @@ Contributing authors: Trung Dac Nguyen (ORNL), W. Michael Brown (ORNL) ------------------------------------------------------------------------- */ +#include "pair_eam_gpu.h" #include #include #include #include -#include "pair_eam_gpu.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/GPU/pair_gauss_gpu.cpp b/src/GPU/pair_gauss_gpu.cpp index c596a9d644..842b84acf2 100644 --- a/src/GPU/pair_gauss_gpu.cpp +++ b/src/GPU/pair_gauss_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_gauss_gpu.h" #include #include #include #include -#include "pair_gauss_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_gayberne_gpu.cpp b/src/GPU/pair_gayberne_gpu.cpp index 4ed2750e57..f00accda15 100644 --- a/src/GPU/pair_gayberne_gpu.cpp +++ b/src/GPU/pair_gayberne_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_gayberne_gpu.h" #include #include #include #include -#include "pair_gayberne_gpu.h" #include "math_extra.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/GPU/pair_lj96_cut_gpu.cpp b/src/GPU/pair_lj96_cut_gpu.cpp index 5bc30c809d..16b6b835c0 100644 --- a/src/GPU/pair_lj96_cut_gpu.cpp +++ b/src/GPU/pair_lj96_cut_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj96_cut_gpu.h" #include #include #include #include -#include "pair_lj96_cut_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp index 134295c69f..bacbb400b1 100644 --- a/src/GPU/pair_lj_charmm_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_charmm_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_long_gpu.h" #include #include #include #include -#include "pair_lj_charmm_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_class2_coul_long_gpu.cpp b/src/GPU/pair_lj_class2_coul_long_gpu.cpp index fdffb06a8d..e34dbb0f99 100644 --- a/src/GPU/pair_lj_class2_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_class2_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_class2_coul_long_gpu.h" #include #include #include #include -#include "pair_lj_class2_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_class2_gpu.cpp b/src/GPU/pair_lj_class2_gpu.cpp index bbb9168169..68f27598f3 100644 --- a/src/GPU/pair_lj_class2_gpu.cpp +++ b/src/GPU/pair_lj_class2_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_class2_gpu.h" #include #include #include #include -#include "pair_lj_class2_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cubic_gpu.cpp b/src/GPU/pair_lj_cubic_gpu.cpp index 95eee6ae8f..542de37840 100644 --- a/src/GPU/pair_lj_cubic_gpu.cpp +++ b/src/GPU/pair_lj_cubic_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "pair_lj_cubic_gpu.h" #include #include #include #include -#include "pair_lj_cubic_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp index 69fefbcdea..cf3dd711dc 100644 --- a/src/GPU/pair_lj_cut_coul_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_cut_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_cut_gpu.h" #include #include #include #include -#include "pair_lj_cut_coul_cut_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp index de86c58647..20354e732c 100644 --- a/src/GPU/pair_lj_cut_coul_debye_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_debye_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_debye_gpu.h" #include #include #include #include -#include "pair_lj_cut_coul_debye_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp index 87eac52749..ccaf86efa6 100644 --- a/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_dsf_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_dsf_gpu.h" #include #include #include #include -#include "pair_lj_cut_coul_dsf_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_coul_long_gpu.cpp b/src/GPU/pair_lj_cut_coul_long_gpu.cpp index c854dab83d..36c72f1143 100644 --- a/src/GPU/pair_lj_cut_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_long_gpu.h" #include #include #include #include -#include "pair_lj_cut_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp index f87dc0ec91..79ca90698a 100644 --- a/src/GPU/pair_lj_cut_coul_msm_gpu.cpp +++ b/src/GPU/pair_lj_cut_coul_msm_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_msm_gpu.h" #include #include #include #include -#include "pair_lj_cut_coul_msm_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp index d2c925d950..e2c8b8d686 100644 --- a/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_cut_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_dipole_cut_gpu.h" #include #include #include #include -#include "pair_lj_cut_dipole_cut_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp index 774ff2fae4..fb76376d34 100644 --- a/src/GPU/pair_lj_cut_dipole_long_gpu.cpp +++ b/src/GPU/pair_lj_cut_dipole_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (Northwestern) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_dipole_long_gpu.h" #include #include #include #include -#include "pair_lj_cut_dipole_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_cut_gpu.cpp b/src/GPU/pair_lj_cut_gpu.cpp index 6dde9689f7..809e5cf05e 100644 --- a/src/GPU/pair_lj_cut_gpu.cpp +++ b/src/GPU/pair_lj_cut_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_gpu.h" #include #include #include #include -#include "pair_lj_cut_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_expand_coul_long_gpu.cpp b/src/GPU/pair_lj_expand_coul_long_gpu.cpp index 31f4fd651c..a530f7ff9a 100644 --- a/src/GPU/pair_lj_expand_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_expand_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Nguyen (Northwestern) ------------------------------------------------------------------------- */ +#include "pair_lj_expand_coul_long_gpu.h" #include #include #include #include -#include "pair_lj_expand_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_expand_gpu.cpp b/src/GPU/pair_lj_expand_gpu.cpp index a2e1cf54e3..86f8a76b52 100644 --- a/src/GPU/pair_lj_expand_gpu.cpp +++ b/src/GPU/pair_lj_expand_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Inderaj Bains (NVIDIA), ibains@nvidia.com ------------------------------------------------------------------------- */ +#include "pair_lj_expand_gpu.h" #include #include #include #include -#include "pair_lj_expand_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_gromacs_gpu.cpp b/src/GPU/pair_lj_gromacs_gpu.cpp index e03f4b2e50..78f8b8b461 100644 --- a/src/GPU/pair_lj_gromacs_gpu.cpp +++ b/src/GPU/pair_lj_gromacs_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_lj_gromacs_gpu.h" #include #include #include #include -#include "pair_lj_gromacs_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp index f5029df5dc..24ff8a4f28 100644 --- a/src/GPU/pair_lj_sdk_coul_long_gpu.cpp +++ b/src/GPU/pair_lj_sdk_coul_long_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_sdk_coul_long_gpu.h" #include #include #include #include -#include "pair_lj_sdk_coul_long_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_sdk_gpu.cpp b/src/GPU/pair_lj_sdk_gpu.cpp index 4797a34408..2621f49aeb 100644 --- a/src/GPU/pair_lj_sdk_gpu.cpp +++ b/src/GPU/pair_lj_sdk_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_sdk_gpu.h" #include #include #include #include -#include "pair_lj_sdk_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp index dd25a70eee..cf26cdf3b4 100644 --- a/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp +++ b/src/GPU/pair_lj_sf_dipole_sf_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_lj_sf_dipole_sf_gpu.h" #include #include #include #include -#include "pair_lj_sf_dipole_sf_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_mie_cut_gpu.cpp b/src/GPU/pair_mie_cut_gpu.cpp index 838d28033f..f3a384113f 100644 --- a/src/GPU/pair_mie_cut_gpu.cpp +++ b/src/GPU/pair_mie_cut_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_mie_cut_gpu.h" #include #include #include #include -#include "pair_mie_cut_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_morse_gpu.cpp b/src/GPU/pair_morse_gpu.cpp index 1f94643e3a..dcad227045 100644 --- a/src/GPU/pair_morse_gpu.cpp +++ b/src/GPU/pair_morse_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_morse_gpu.h" #include #include #include #include -#include "pair_morse_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_resquared_gpu.cpp b/src/GPU/pair_resquared_gpu.cpp index 5e90f788bf..b12a790c81 100644 --- a/src/GPU/pair_resquared_gpu.cpp +++ b/src/GPU/pair_resquared_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "pair_resquared_gpu.h" #include #include #include #include -#include "pair_resquared_gpu.h" #include "math_extra.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/GPU/pair_soft_gpu.cpp b/src/GPU/pair_soft_gpu.cpp index 42adb02553..0efcb20c8d 100644 --- a/src/GPU/pair_soft_gpu.cpp +++ b/src/GPU/pair_soft_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_soft_gpu.h" #include #include #include #include -#include "pair_soft_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_sw_gpu.cpp b/src/GPU/pair_sw_gpu.cpp index 0cc858e57d..8999cb6c47 100644 --- a/src/GPU/pair_sw_gpu.cpp +++ b/src/GPU/pair_sw_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (ORNL) ------------------------------------------------------------------------- */ +#include "pair_sw_gpu.h" #include #include #include #include -#include "pair_sw_gpu.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/GPU/pair_table_gpu.cpp b/src/GPU/pair_table_gpu.cpp index a0b6562e5e..4432265874 100644 --- a/src/GPU/pair_table_gpu.cpp +++ b/src/GPU/pair_table_gpu.cpp @@ -15,11 +15,11 @@ Contributing authors: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_table_gpu.h" #include #include #include #include -#include "pair_table_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_tersoff_gpu.cpp b/src/GPU/pair_tersoff_gpu.cpp index cd0c5e6693..e0dc021b57 100644 --- a/src/GPU/pair_tersoff_gpu.cpp +++ b/src/GPU/pair_tersoff_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "pair_tersoff_gpu.h" #include #include #include #include -#include "pair_tersoff_gpu.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/GPU/pair_tersoff_mod_gpu.cpp b/src/GPU/pair_tersoff_mod_gpu.cpp index fd55ddc6e6..a17efb55e8 100644 --- a/src/GPU/pair_tersoff_mod_gpu.cpp +++ b/src/GPU/pair_tersoff_mod_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "pair_tersoff_mod_gpu.h" #include #include #include #include -#include "pair_tersoff_mod_gpu.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/GPU/pair_tersoff_zbl_gpu.cpp b/src/GPU/pair_tersoff_zbl_gpu.cpp index d3828962e2..765d25f8e6 100644 --- a/src/GPU/pair_tersoff_zbl_gpu.cpp +++ b/src/GPU/pair_tersoff_zbl_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ndactrung@gmail.com) ------------------------------------------------------------------------- */ +#include "pair_tersoff_zbl_gpu.h" #include #include #include #include -#include "pair_tersoff_zbl_gpu.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/GPU/pair_ufm_gpu.cpp b/src/GPU/pair_ufm_gpu.cpp index 31422b0f4d..97c2eebf24 100644 --- a/src/GPU/pair_ufm_gpu.cpp +++ b/src/GPU/pair_ufm_gpu.cpp @@ -17,11 +17,11 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ +#include "pair_ufm_gpu.h" #include #include #include #include -#include "pair_ufm_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_vashishta_gpu.cpp b/src/GPU/pair_vashishta_gpu.cpp index 5539653756..3b74e5685e 100644 --- a/src/GPU/pair_vashishta_gpu.cpp +++ b/src/GPU/pair_vashishta_gpu.cpp @@ -14,11 +14,12 @@ /* ---------------------------------------------------------------------- Contributing author: Anders Hafreager (UiO) ------------------------------------------------------------------------- */ + +#include "pair_vashishta_gpu.h" #include #include #include #include -#include "pair_vashishta_gpu.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/GPU/pair_yukawa_colloid_gpu.cpp b/src/GPU/pair_yukawa_colloid_gpu.cpp index 3645f392a2..51c7e683db 100644 --- a/src/GPU/pair_yukawa_colloid_gpu.cpp +++ b/src/GPU/pair_yukawa_colloid_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_yukawa_colloid_gpu.h" #include #include #include #include -#include "pair_yukawa_colloid_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_yukawa_gpu.cpp b/src/GPU/pair_yukawa_gpu.cpp index 90317fea34..5dc13c7750 100644 --- a/src/GPU/pair_yukawa_gpu.cpp +++ b/src/GPU/pair_yukawa_gpu.cpp @@ -15,11 +15,11 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_yukawa_gpu.h" #include #include #include #include -#include "pair_yukawa_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pair_zbl_gpu.cpp b/src/GPU/pair_zbl_gpu.cpp index 99471cbe90..5e24281145 100644 --- a/src/GPU/pair_zbl_gpu.cpp +++ b/src/GPU/pair_zbl_gpu.cpp @@ -15,12 +15,12 @@ Contributing author: Trung Dac Nguyen (ORNL) ------------------------------------------------------------------------- */ +#include "pair_zbl_gpu.h" #include "lmptype.h" #include #include #include #include -#include "pair_zbl_gpu.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/GPU/pppm_gpu.cpp b/src/GPU/pppm_gpu.cpp index 1bb1a39703..bbb270ff8e 100644 --- a/src/GPU/pppm_gpu.cpp +++ b/src/GPU/pppm_gpu.cpp @@ -15,12 +15,12 @@ Contributing authors: Mike Brown (ORNL), Axel Kohlmeyer (Temple) ------------------------------------------------------------------------- */ +#include "pppm_gpu.h" #include #include #include #include #include -#include "pppm_gpu.h" #include "atom.h" #include "comm.h" #include "gridcomm.h" diff --git a/src/GRANULAR/fix_freeze.cpp b/src/GRANULAR/fix_freeze.cpp index 73c1c9fc11..e2345bdf19 100644 --- a/src/GRANULAR/fix_freeze.cpp +++ b/src/GRANULAR/fix_freeze.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_freeze.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 3ffca8db9d..0fe7493127 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_pour.h" #include #include #include -#include "fix_pour.h" #include "atom.h" #include "atom_vec.h" #include "force.h" diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index 8513fc702b..b0fbc0c2b8 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -16,10 +16,10 @@ Dan Bolintineanu (SNL) ------------------------------------------------------------------------- */ +#include "fix_wall_gran.h" #include #include #include -#include "fix_wall_gran.h" #include "atom.h" #include "domain.h" #include "update.h" diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 72798bf7b7..97e889ddcc 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -15,10 +15,10 @@ Contributing authors: Dan Bolintineanu (SNL) ------------------------------------------------------------------------- */ +#include "fix_wall_gran_region.h" #include #include #include -#include "fix_wall_gran_region.h" #include "region.h" #include "atom.h" #include "domain.h" diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp index 728491c17a..e303089e56 100644 --- a/src/GRANULAR/pair_gran_hertz_history.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -15,11 +15,11 @@ Contributing authors: Leo Silbert (SNL), Gary Grest (SNL) ------------------------------------------------------------------------- */ +#include "pair_gran_hertz_history.h" #include #include #include #include -#include "pair_gran_hertz_history.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/GRANULAR/pair_gran_hooke.cpp b/src/GRANULAR/pair_gran_hooke.cpp index cfcc2743ba..a30aa0bb6c 100644 --- a/src/GRANULAR/pair_gran_hooke.cpp +++ b/src/GRANULAR/pair_gran_hooke.cpp @@ -15,10 +15,10 @@ Contributing authors: Leo Silbert (SNL), Gary Grest (SNL) ------------------------------------------------------------------------- */ +#include "pair_gran_hooke.h" #include #include #include -#include "pair_gran_hooke.h" #include "atom.h" #include "force.h" #include "fix.h" diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index 5a78b9d79a..f832fdfac3 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -15,11 +15,11 @@ Contributing authors: Leo Silbert (SNL), Gary Grest (SNL) ------------------------------------------------------------------------- */ +#include "pair_gran_hooke_history.h" #include #include #include #include -#include "pair_gran_hooke_history.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 903ed303b0..942587a676 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -16,11 +16,11 @@ See the README file in the top-level LAMMPS directory. Leo Silbert (SNL), Gary Grest (SNL) ----------------------------------------------------------------------- */ +#include "pair_granular.h" #include #include #include #include -#include "pair_granular.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index fedc976110..dce9c8761a 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -55,10 +55,10 @@ Designed for use with the kim-api-2.0.2 (and newer) package ------------------------------------------------------------------------- */ +#include "kim_query.h" #include #include #include -#include "kim_query.h" #include "comm.h" #include "error.h" #include "input.h" diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index a1c13ae81f..e107e4276f 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -53,11 +53,9 @@ Designed for use with the kim-api-2.0.2 (and newer) package ------------------------------------------------------------------------- */ +#include "pair_kim.h" #include #include - -// includes from LAMMPS -#include "pair_kim.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KOKKOS/angle_charmm_kokkos.cpp b/src/KOKKOS/angle_charmm_kokkos.cpp index 0f46c958d6..fd9757aab3 100644 --- a/src/KOKKOS/angle_charmm_kokkos.cpp +++ b/src/KOKKOS/angle_charmm_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "angle_charmm_kokkos.h" #include #include -#include "angle_charmm_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/angle_class2_kokkos.cpp b/src/KOKKOS/angle_class2_kokkos.cpp index 836714764d..809ce7e7dd 100644 --- a/src/KOKKOS/angle_class2_kokkos.cpp +++ b/src/KOKKOS/angle_class2_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ +#include "angle_class2_kokkos.h" #include #include -#include "angle_class2_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/angle_cosine_kokkos.cpp b/src/KOKKOS/angle_cosine_kokkos.cpp index 4a4866948f..da0ff398f1 100644 --- a/src/KOKKOS/angle_cosine_kokkos.cpp +++ b/src/KOKKOS/angle_cosine_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "angle_cosine_kokkos.h" #include #include -#include "angle_cosine_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/angle_harmonic_kokkos.cpp b/src/KOKKOS/angle_harmonic_kokkos.cpp index dbe705800c..fc274bb894 100644 --- a/src/KOKKOS/angle_harmonic_kokkos.cpp +++ b/src/KOKKOS/angle_harmonic_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "angle_harmonic_kokkos.h" #include #include -#include "angle_harmonic_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_kokkos.cpp b/src/KOKKOS/atom_kokkos.cpp index 813c5ddbf2..4637a9a21c 100644 --- a/src/KOKKOS/atom_kokkos.cpp +++ b/src/KOKKOS/atom_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_kokkos.h" +#include #include "atom_vec.h" #include "atom_vec_kokkos.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/atom_vec_angle_kokkos.cpp b/src/KOKKOS/atom_vec_angle_kokkos.cpp index e4f27e733a..3e66d813cf 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.cpp +++ b/src/KOKKOS/atom_vec_angle_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_angle_kokkos.h" +#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.cpp b/src/KOKKOS/atom_vec_atomic_kokkos.cpp index 95e4ddd72b..27aaa96b6d 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.cpp +++ b/src/KOKKOS/atom_vec_atomic_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_atomic_kokkos.h" +#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_bond_kokkos.cpp b/src/KOKKOS/atom_vec_bond_kokkos.cpp index 92311d5d09..ad6d5bd486 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.cpp +++ b/src/KOKKOS/atom_vec_bond_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_bond_kokkos.h" +#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index 31a690f521..507e8170c5 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_charge_kokkos.h" +#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_dpd_kokkos.cpp b/src/KOKKOS/atom_vec_dpd_kokkos.cpp index 4034efee9e..db857909bf 100644 --- a/src/KOKKOS/atom_vec_dpd_kokkos.cpp +++ b/src/KOKKOS/atom_vec_dpd_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_dpd_kokkos.h" +#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_full_kokkos.cpp b/src/KOKKOS/atom_vec_full_kokkos.cpp index 034da88f73..486c4e4c4e 100644 --- a/src/KOKKOS/atom_vec_full_kokkos.cpp +++ b/src/KOKKOS/atom_vec_full_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_full_kokkos.h" +#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp index 03cbe1ee5e..39d88a0f38 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_hybrid_kokkos.h" #include #include -#include "atom_vec_hybrid_kokkos.h" #include "atom_kokkos.h" #include "domain.h" #include "modify.h" diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.cpp b/src/KOKKOS/atom_vec_molecular_kokkos.cpp index 9ac8ecd264..49bc7bf3c0 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.cpp +++ b/src/KOKKOS/atom_vec_molecular_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_molecular_kokkos.h" +#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/atom_vec_sphere_kokkos.cpp b/src/KOKKOS/atom_vec_sphere_kokkos.cpp index 9e8388488f..b2abbfe8c4 100644 --- a/src/KOKKOS/atom_vec_sphere_kokkos.cpp +++ b/src/KOKKOS/atom_vec_sphere_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_sphere_kokkos.h" #include #include #include -#include "atom_vec_sphere_kokkos.h" #include "atom_kokkos.h" #include "atom_masks.h" #include "comm_kokkos.h" diff --git a/src/KOKKOS/bond_class2_kokkos.cpp b/src/KOKKOS/bond_class2_kokkos.cpp index 798fb41c92..04281bfdd2 100644 --- a/src/KOKKOS/bond_class2_kokkos.cpp +++ b/src/KOKKOS/bond_class2_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ +#include "bond_class2_kokkos.h" #include #include -#include "bond_class2_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/bond_fene_kokkos.cpp b/src/KOKKOS/bond_fene_kokkos.cpp index b5cdc1a05a..361bb61f7e 100644 --- a/src/KOKKOS/bond_fene_kokkos.cpp +++ b/src/KOKKOS/bond_fene_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "bond_fene_kokkos.h" #include #include -#include "bond_fene_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/bond_harmonic_kokkos.cpp b/src/KOKKOS/bond_harmonic_kokkos.cpp index 51a9fa4389..792d98fe88 100644 --- a/src/KOKKOS/bond_harmonic_kokkos.cpp +++ b/src/KOKKOS/bond_harmonic_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "bond_harmonic_kokkos.h" #include #include -#include "bond_harmonic_kokkos.h" #include "atom_kokkos.h" #include "neighbor_kokkos.h" #include "domain.h" diff --git a/src/KOKKOS/comm_tiled_kokkos.cpp b/src/KOKKOS/comm_tiled_kokkos.cpp index 81cf1f0563..fc6de0a0d7 100644 --- a/src/KOKKOS/comm_tiled_kokkos.cpp +++ b/src/KOKKOS/comm_tiled_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "comm_tiled_kokkos.h" +#include #include "comm_brick.h" #include "atom_kokkos.h" #include "atom_vec.h" diff --git a/src/KOKKOS/compute_temp_kokkos.cpp b/src/KOKKOS/compute_temp_kokkos.cpp index 7b76f54f57..a2fcf63125 100644 --- a/src/KOKKOS/compute_temp_kokkos.cpp +++ b/src/KOKKOS/compute_temp_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_temp_kokkos.h" #include #include -#include "compute_temp_kokkos.h" #include "atom_kokkos.h" #include "update.h" #include "force.h" diff --git a/src/KOKKOS/dihedral_charmm_kokkos.cpp b/src/KOKKOS/dihedral_charmm_kokkos.cpp index 61ddcc425a..94fd0b9bb7 100644 --- a/src/KOKKOS/dihedral_charmm_kokkos.cpp +++ b/src/KOKKOS/dihedral_charmm_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "dihedral_charmm_kokkos.h" #include #include -#include "dihedral_charmm_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/dihedral_class2_kokkos.cpp b/src/KOKKOS/dihedral_class2_kokkos.cpp index 98436bc696..4b8d171f61 100644 --- a/src/KOKKOS/dihedral_class2_kokkos.cpp +++ b/src/KOKKOS/dihedral_class2_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ +#include "dihedral_class2_kokkos.h" #include #include -#include "dihedral_class2_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/dihedral_opls_kokkos.cpp b/src/KOKKOS/dihedral_opls_kokkos.cpp index f50dea2c36..825d106e04 100644 --- a/src/KOKKOS/dihedral_opls_kokkos.cpp +++ b/src/KOKKOS/dihedral_opls_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "dihedral_opls_kokkos.h" #include #include -#include "dihedral_opls_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/fix_deform_kokkos.cpp b/src/KOKKOS/fix_deform_kokkos.cpp index 7b9336ed3b..05eb1c22f6 100644 --- a/src/KOKKOS/fix_deform_kokkos.cpp +++ b/src/KOKKOS/fix_deform_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Pieter in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "fix_deform_kokkos.h" #include #include #include -#include "fix_deform_kokkos.h" #include "atom_kokkos.h" #include "update.h" #include "comm.h" diff --git a/src/KOKKOS/fix_dpd_energy_kokkos.cpp b/src/KOKKOS/fix_dpd_energy_kokkos.cpp index d092cb4802..debad0407a 100644 --- a/src/KOKKOS/fix_dpd_energy_kokkos.cpp +++ b/src/KOKKOS/fix_dpd_energy_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_dpd_energy_kokkos.h" #include #include -#include "fix_dpd_energy_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" #include "force.h" diff --git a/src/KOKKOS/fix_enforce2d_kokkos.cpp b/src/KOKKOS/fix_enforce2d_kokkos.cpp index 346e440f55..bf2a882539 100644 --- a/src/KOKKOS/fix_enforce2d_kokkos.cpp +++ b/src/KOKKOS/fix_enforce2d_kokkos.cpp @@ -15,11 +15,11 @@ Contributing authors: Stefan Paquay & Matthew Peterson (Brandeis University) ------------------------------------------------------------------------- */ +#include "fix_enforce2d_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" #include "comm.h" #include "error.h" -#include "fix_enforce2d_kokkos.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp index 2f730d1193..d0280eeef0 100644 --- a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp +++ b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "fix_eos_table_rx_kokkos.h" #include #include -#include "fix_eos_table_rx_kokkos.h" #include "atom_kokkos.h" #include "error.h" #include "force.h" diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp index 0947fee693..23a43b38ef 100644 --- a/src/KOKKOS/fix_langevin_kokkos.cpp +++ b/src/KOKKOS/fix_langevin_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_langevin_kokkos.h" #include #include #include -#include "fix_langevin_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" #include "force.h" diff --git a/src/KOKKOS/fix_momentum_kokkos.cpp b/src/KOKKOS/fix_momentum_kokkos.cpp index 38500531ca..2d4911bfda 100644 --- a/src/KOKKOS/fix_momentum_kokkos.cpp +++ b/src/KOKKOS/fix_momentum_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_momentum_kokkos.h" #include #include -#include "fix_momentum_kokkos.h" #include "atom_kokkos.h" #include "atom_masks.h" #include "domain.h" diff --git a/src/KOKKOS/fix_nh_kokkos.cpp b/src/KOKKOS/fix_nh_kokkos.cpp index fae9ef8f30..578f2f5c70 100644 --- a/src/KOKKOS/fix_nh_kokkos.cpp +++ b/src/KOKKOS/fix_nh_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "fix_nh_kokkos.h" #include #include #include -#include "fix_nh_kokkos.h" #include "math_extra.h" #include "atom.h" #include "force.h" diff --git a/src/KOKKOS/fix_nph_kokkos.cpp b/src/KOKKOS/fix_nph_kokkos.cpp index c5072e6ae9..3830860fd7 100644 --- a/src/KOKKOS/fix_nph_kokkos.cpp +++ b/src/KOKKOS/fix_nph_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nph_kokkos.h" +#include #include "modify.h" #include "error.h" diff --git a/src/KOKKOS/fix_npt_kokkos.cpp b/src/KOKKOS/fix_npt_kokkos.cpp index c488c8e4f3..5b751c9e4d 100644 --- a/src/KOKKOS/fix_npt_kokkos.cpp +++ b/src/KOKKOS/fix_npt_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_npt_kokkos.h" +#include #include "modify.h" #include "error.h" diff --git a/src/KOKKOS/fix_nve_kokkos.cpp b/src/KOKKOS/fix_nve_kokkos.cpp index 6db8ff8c0f..0ca01c589a 100644 --- a/src/KOKKOS/fix_nve_kokkos.cpp +++ b/src/KOKKOS/fix_nve_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nve_kokkos.h" #include #include -#include "fix_nve_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" #include "force.h" diff --git a/src/KOKKOS/fix_nvt_kokkos.cpp b/src/KOKKOS/fix_nvt_kokkos.cpp index 4db42a62fb..66165dd7bc 100644 --- a/src/KOKKOS/fix_nvt_kokkos.cpp +++ b/src/KOKKOS/fix_nvt_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_nvt_kokkos.h" +#include #include "group.h" #include "modify.h" #include "error.h" diff --git a/src/KOKKOS/fix_property_atom_kokkos.cpp b/src/KOKKOS/fix_property_atom_kokkos.cpp index 6860676911..ff374b885f 100644 --- a/src/KOKKOS/fix_property_atom_kokkos.cpp +++ b/src/KOKKOS/fix_property_atom_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_property_atom_kokkos.h" #include #include -#include "fix_property_atom_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "memory_kokkos.h" diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.cpp b/src/KOKKOS/fix_qeq_reax_kokkos.cpp index 12369261b3..6f8392ab16 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reax_kokkos.cpp @@ -16,11 +16,11 @@ Kamesh Arumugam (NVIDIA) ------------------------------------------------------------------------- */ +#include "fix_qeq_reax_kokkos.h" #include #include #include #include -#include "fix_qeq_reax_kokkos.h" #include "kokkos.h" #include "atom.h" #include "atom_masks.h" diff --git a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp index 9aed0b9ae4..347c477476 100644 --- a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp @@ -15,9 +15,9 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "fix_ave_atom.h" #include #include -#include "fix_ave_atom.h" #include "fix_reaxc_bonds_kokkos.h" #include "atom.h" #include "update.h" diff --git a/src/KOKKOS/fix_reaxc_species_kokkos.cpp b/src/KOKKOS/fix_reaxc_species_kokkos.cpp index bd92251960..71aacba68d 100644 --- a/src/KOKKOS/fix_reaxc_species_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_species_kokkos.cpp @@ -15,12 +15,12 @@ Contributing authors: Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "fix_reaxc_species_kokkos.h" #include #include #include "atom.h" #include #include "fix_ave_atom.h" -#include "fix_reaxc_species_kokkos.h" #include "domain.h" #include "update.h" #include "pair_reaxc_kokkos.h" diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index 80333e1e9b..050dda2400 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_rx_kokkos.h" #include #include -#include "fix_rx_kokkos.h" #include "atom_masks.h" #include "atom_kokkos.h" #include "force.h" diff --git a/src/KOKKOS/fix_setforce_kokkos.cpp b/src/KOKKOS/fix_setforce_kokkos.cpp index 5d15b88d76..03cfd3afb2 100644 --- a/src/KOKKOS/fix_setforce_kokkos.cpp +++ b/src/KOKKOS/fix_setforce_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_setforce_kokkos.h" #include #include -#include "fix_setforce_kokkos.h" #include "atom_kokkos.h" #include "update.h" #include "modify.h" diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index 968f877abd..96f67ccb5e 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -33,10 +33,10 @@ 135, 204105. ------------------------------------------------------------------------- */ +#include "fix_shardlow_kokkos.h" #include #include #include -#include "fix_shardlow_kokkos.h" #include "atom.h" #include "atom_masks.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/fix_wall_lj93_kokkos.cpp b/src/KOKKOS/fix_wall_lj93_kokkos.cpp index 5dbb054175..61346144c8 100644 --- a/src/KOKKOS/fix_wall_lj93_kokkos.cpp +++ b/src/KOKKOS/fix_wall_lj93_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_wall_lj93_kokkos.h" +#include #include "atom_kokkos.h" #include "error.h" #include "atom_masks.h" diff --git a/src/KOKKOS/fix_wall_reflect_kokkos.cpp b/src/KOKKOS/fix_wall_reflect_kokkos.cpp index 75a5c1a81e..ba104d19a9 100644 --- a/src/KOKKOS/fix_wall_reflect_kokkos.cpp +++ b/src/KOKKOS/fix_wall_reflect_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_wall_reflect_kokkos.h" #include #include -#include "fix_wall_reflect_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "update.h" diff --git a/src/KOKKOS/gridcomm_kokkos.cpp b/src/KOKKOS/gridcomm_kokkos.cpp index 14b84a5733..1d0371c147 100644 --- a/src/KOKKOS/gridcomm_kokkos.cpp +++ b/src/KOKKOS/gridcomm_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "gridcomm_kokkos.h" +#include #include "comm.h" #include "kspace.h" #include "memory_kokkos.h" diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index ad32e6da4e..84b721bd2a 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Ray Shan (Materials Design) ------------------------------------------------------------------------- */ +#include "improper_class2_kokkos.h" #include #include #include -#include "improper_class2_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index bb397a2c2f..262ffe7700 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -15,10 +15,10 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "improper_harmonic_kokkos.h" #include #include #include -#include "improper_harmonic_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index 3fa84d98b2..c269f69cdd 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -11,6 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "kokkos.h" #include #include #include @@ -18,7 +19,6 @@ #include #include #include -#include "kokkos.h" #include "lammps.h" #include "force.h" #include "neighbor_kokkos.h" diff --git a/src/KOKKOS/math_special_kokkos.cpp b/src/KOKKOS/math_special_kokkos.cpp index 127168ef8b..f5fc725347 100644 --- a/src/KOKKOS/math_special_kokkos.cpp +++ b/src/KOKKOS/math_special_kokkos.cpp @@ -1,7 +1,7 @@ +#include "math_special_kokkos.h" #include #include -#include "math_special_kokkos.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index 57ac3a9c57..e3843262a5 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_buck_coul_cut_kokkos.h" #include #include #include #include -#include "pair_buck_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index 349c4c0601..7457a0988f 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_buck_coul_long_kokkos.h" #include #include #include #include -#include "pair_buck_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index 02c02c986e..131622cac5 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_buck_kokkos.h" #include #include #include #include -#include "pair_buck_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_coul_cut_kokkos.cpp b/src/KOKKOS/pair_coul_cut_kokkos.cpp index 54ba0b63ce..e79f103363 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_coul_cut_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_coul_cut_kokkos.h" #include #include #include #include -#include "pair_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index 8966e30394..0fe03af043 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_coul_debye_kokkos.h" #include #include #include #include -#include "pair_coul_debye_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index 748fed71a7..e94aae4754 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_coul_dsf_kokkos.h" #include #include #include #include -#include "pair_coul_dsf_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index a21cb050ff..67132e11f6 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_coul_long_kokkos.h" #include #include #include #include -#include "pair_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index 20391d9530..dbbb865961 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_coul_wolf_kokkos.h" #include #include #include #include -#include "pair_coul_wolf_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index a44ef1790e..7a2fca47a0 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "pair_dpd_fdt_energy_kokkos.h" #include #include #include #include -#include "atom_kokkos.h" #include "atom_vec.h" #include "comm.h" #include "update.h" @@ -30,7 +30,6 @@ #include "neigh_request.h" #include "memory_kokkos.h" #include "modify.h" -#include "pair_dpd_fdt_energy_kokkos.h" #include "error.h" #include "atom_masks.h" #include "kokkos.h" diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index b5442c0d29..aa33d44eee 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -15,13 +15,13 @@ Contributing authors: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_eam_alloy_kokkos.h" #include #include #include #include #include "kokkos.h" #include "pair_kokkos.h" -#include "pair_eam_alloy_kokkos.h" #include "atom_kokkos.h" #include "force.h" #include "comm.h" diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 16701febd6..9832a16a73 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -15,13 +15,13 @@ Contributing authors: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_eam_fs_kokkos.h" #include #include #include #include #include "kokkos.h" #include "pair_kokkos.h" -#include "pair_eam_fs_kokkos.h" #include "atom_kokkos.h" #include "force.h" #include "comm.h" diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index d423f2c927..4c6fadfe92 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -15,13 +15,13 @@ Contributing authors: Stan Moore (SNL), Christian Trott (SNL) ------------------------------------------------------------------------- */ +#include "pair_eam_kokkos.h" #include #include #include #include #include "kokkos.h" #include "pair_kokkos.h" -#include "pair_eam_kokkos.h" #include "atom_kokkos.h" #include "force.h" #include "comm.h" diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 3a857a6485..31a48fe154 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "pair_exp6_rx_kokkos.h" #include #include #include #include -#include "pair_exp6_rx_kokkos.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KOKKOS/pair_hybrid_kokkos.cpp b/src/KOKKOS/pair_hybrid_kokkos.cpp index 00df4a8f3c..c767d9f470 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_hybrid_kokkos.h" #include #include #include #include -#include "pair_hybrid_kokkos.h" #include "atom_kokkos.h" #include "force.h" #include "pair.h" diff --git a/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp b/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp index a2c3edab65..cb1389d38e 100644 --- a/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_hybrid_overlay_kokkos.h" #include #include #include -#include "pair_hybrid_overlay_kokkos.h" #include "atom.h" #include "force.h" #include "neighbor.h" diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index 510740112a..b7c3766d5f 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_charmm_implicit_kokkos.h" #include #include #include #include -#include "pair_lj_charmm_coul_charmm_implicit_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index 51c96354f9..c6a1e3211d 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_charmm_kokkos.h" #include #include #include #include -#include "pair_lj_charmm_coul_charmm_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 22faa98935..4ba0651601 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_long_kokkos.h" #include #include #include #include -#include "pair_lj_charmm_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index 60d480188b..ef8fe7a128 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2_coul_cut_kokkos.h" #include #include #include #include -#include "pair_lj_class2_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index 4c8aea8e92..5a25d0250b 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2_coul_long_kokkos.h" #include #include #include #include -#include "pair_lj_class2_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index dd42baa4e0..6d673b2d01 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_class2_kokkos.h" #include #include #include #include -#include "pair_lj_class2_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index cb5ab96871..9201a116b5 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_cut_kokkos.h" #include #include #include #include -#include "pair_lj_cut_coul_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index 800092a09b..8935333c74 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_debye_kokkos.h" #include #include #include #include -#include "pair_lj_cut_coul_debye_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index f793485b47..aea70faec4 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_dsf_kokkos.h" #include #include #include #include -#include "pair_lj_cut_coul_dsf_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index 02150586f4..53d27f2447 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_long_kokkos.h" #include #include #include #include -#include "pair_lj_cut_coul_long_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index 4ba8c00f88..ee29e12322 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_cut_kokkos.h" #include #include #include #include -#include "pair_lj_cut_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index 5ea6c9e438..061fc205fb 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_expand_kokkos.h" #include #include #include #include -#include "pair_lj_expand_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp index 2421d059da..4df9fdea9e 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_gromacs_coul_gromacs_kokkos.h" #include #include #include #include -#include "pair_lj_gromacs_coul_gromacs_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp index 09a0261ae1..2d395c39d5 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_gromacs_kokkos.h" #include #include #include #include -#include "pair_lj_gromacs_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_lj_sdk_kokkos.cpp b/src/KOKKOS/pair_lj_sdk_kokkos.cpp index c2375fa7a8..14c53c38bf 100644 --- a/src/KOKKOS/pair_lj_sdk_kokkos.cpp +++ b/src/KOKKOS/pair_lj_sdk_kokkos.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_sdk_kokkos.h" #include #include #include #include -#include "pair_lj_sdk_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index b308330ead..d679477321 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -15,11 +15,11 @@ Contributing authors: Stefan Paquay (Eindhoven University of Technology) ------------------------------------------------------------------------- */ +#include "pair_morse_kokkos.h" #include #include #include #include -#include "pair_morse_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 7d17ac3f43..81a4aa7a82 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -21,12 +21,12 @@ The Journal of Chemical Physics, 2016, 144, 104501. ------------------------------------------------------------------------------------------- */ +#include "pair_multi_lucy_rx_kokkos.h" #include #include -#include "math_const.h" #include #include -#include "pair_multi_lucy_rx_kokkos.h" +#include "math_const.h" #include "atom_kokkos.h" #include "force.h" #include "comm.h" diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index 64651be270..ca897a377c 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_reaxc_kokkos.h" #include #include #include #include -#include "pair_reaxc_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index da4737a2c1..dbd45747f0 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_sw_kokkos.h" #include #include #include #include -#include "pair_sw_kokkos.h" #include "kokkos.h" #include "pair_kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index 737d600d1e..01966d708a 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Christian Trott (SNL) ------------------------------------------------------------------------- */ +#include "pair_table_kokkos.h" #include #include #include #include -#include "pair_table_kokkos.h" #include "kokkos.h" #include "atom.h" #include "force.h" diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index ec7a2ffb94..7c2d20c68d 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Dan Ibanez (SNL) ------------------------------------------------------------------------- */ +#include "pair_table_rx_kokkos.h" #include #include #include #include -#include "pair_table_rx_kokkos.h" #include "kokkos.h" #include "atom.h" #include "force.h" diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index 9252e3de52..b68af84425 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) and Christian Trott (SNL) ------------------------------------------------------------------------- */ +#include "pair_tersoff_kokkos.h" #include #include #include #include -#include "pair_tersoff_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index 585074b128..b6921179c0 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_tersoff_mod_kokkos.h" #include #include #include #include -#include "pair_tersoff_mod_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index e1e2211ab5..60ff0a7269 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (SNL) ------------------------------------------------------------------------- */ +#include "pair_tersoff_zbl_kokkos.h" #include #include #include #include -#include "pair_tersoff_zbl_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index 4a1f291b17..febb171c83 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -15,11 +15,11 @@ Contributing author: Anders Hafreager (UiO), andershaf@gmail.com ------------------------------------------------------------------------- */ +#include "pair_vashishta_kokkos.h" #include #include #include #include -#include "pair_vashishta_kokkos.h" #include "kokkos.h" #include "pair_kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_yukawa_kokkos.cpp b/src/KOKKOS/pair_yukawa_kokkos.cpp index 27e18533a2..acfeb2fbdc 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.cpp +++ b/src/KOKKOS/pair_yukawa_kokkos.cpp @@ -14,9 +14,10 @@ /* ---------------------------------------------------------------------- Contributing authors: Stefan Paquay (Brandeis University) ------------------------------------------------------------------------- */ + +#include "pair_yukawa_kokkos.h" #include #include -#include "pair_yukawa_kokkos.h" #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" diff --git a/src/KOKKOS/pair_zbl_kokkos.cpp b/src/KOKKOS/pair_zbl_kokkos.cpp index 06c84e5189..0f21331266 100644 --- a/src/KOKKOS/pair_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_zbl_kokkos.cpp @@ -15,11 +15,11 @@ Contributing authors: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_zbl_kokkos.h" #include #include #include #include -#include "pair_zbl_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "force.h" diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 7c01adc510..1842524e23 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -15,12 +15,12 @@ Contributing author: Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pppm_kokkos.h" #include #include #include #include #include -#include "pppm_kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "gridcomm_kokkos.h" diff --git a/src/KOKKOS/rand_pool_wrap_kokkos.cpp b/src/KOKKOS/rand_pool_wrap_kokkos.cpp index 51ebcb154e..2d8865feb0 100644 --- a/src/KOKKOS/rand_pool_wrap_kokkos.cpp +++ b/src/KOKKOS/rand_pool_wrap_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "comm.h" #include "rand_pool_wrap_kokkos.h" +#include "comm.h" #include "lammps.h" #include "kokkos.h" #include "random_mars.h" diff --git a/src/KOKKOS/region_block_kokkos.cpp b/src/KOKKOS/region_block_kokkos.cpp index 730ef81466..a5734f6ba7 100644 --- a/src/KOKKOS/region_block_kokkos.cpp +++ b/src/KOKKOS/region_block_kokkos.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "region_block_kokkos.h" #include #include -#include "region_block_kokkos.h" #include "domain.h" #include "force.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index b80d5e0646..d555b74d23 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "verlet_kokkos.h" +#include #include "neighbor.h" #include "domain.h" #include "comm.h" diff --git a/src/KSPACE/ewald.cpp b/src/KSPACE/ewald.cpp index ccbb3ed708..aad0e364d0 100644 --- a/src/KSPACE/ewald.cpp +++ b/src/KSPACE/ewald.cpp @@ -18,12 +18,12 @@ triclinic added by Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "ewald.h" #include #include #include #include #include -#include "ewald.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/ewald_dipole.cpp b/src/KSPACE/ewald_dipole.cpp index 89ef7e39a8..53bac0637f 100644 --- a/src/KSPACE/ewald_dipole.cpp +++ b/src/KSPACE/ewald_dipole.cpp @@ -15,12 +15,12 @@ Contributing authors: Julien Tranchida (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "ewald_dipole.h" #include #include #include #include #include -#include "ewald_dipole.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/ewald_dipole_spin.cpp b/src/KSPACE/ewald_dipole_spin.cpp index 698203c85c..2b6c95f174 100644 --- a/src/KSPACE/ewald_dipole_spin.cpp +++ b/src/KSPACE/ewald_dipole_spin.cpp @@ -15,12 +15,12 @@ Contributing authors: Julien Tranchida (SNL) ------------------------------------------------------------------------- */ +#include "ewald_dipole_spin.h" #include #include #include #include #include -#include "ewald_dipole_spin.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index 0603d68eb2..c775056dd8 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -15,12 +15,12 @@ Contributing authors: Pieter in 't Veld (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "ewald_disp.h" #include #include #include #include #include -#include "ewald_disp.h" #include "math_vector.h" #include "math_const.h" #include "math_special.h" diff --git a/src/KSPACE/fft3d.cpp b/src/KSPACE/fft3d.cpp index 7d3c8c83f2..e4c38a57f5 100644 --- a/src/KSPACE/fft3d.cpp +++ b/src/KSPACE/fft3d.cpp @@ -19,11 +19,11 @@ Paul Coffman (IBM) added MPI collectives remap ------------------------------------------------------------------------- */ +#include "fft3d.h" #include #include #include #include -#include "fft3d.h" #include "remap.h" #ifdef FFT_KISS diff --git a/src/KSPACE/fft3d_wrap.cpp b/src/KSPACE/fft3d_wrap.cpp index b9a6f0ae46..507b23d27d 100644 --- a/src/KSPACE/fft3d_wrap.cpp +++ b/src/KSPACE/fft3d_wrap.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fft3d_wrap.h" +#include #include "error.h" using namespace LAMMPS_NS; diff --git a/src/KSPACE/fix_tune_kspace.cpp b/src/KSPACE/fix_tune_kspace.cpp index 2b22b44340..cfd88609b3 100644 --- a/src/KSPACE/fix_tune_kspace.cpp +++ b/src/KSPACE/fix_tune_kspace.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "fix_tune_kspace.h" #include #include #include -#include "fix_tune_kspace.h" #include "update.h" #include "force.h" #include "kspace.h" diff --git a/src/KSPACE/gridcomm.cpp b/src/KSPACE/gridcomm.cpp index ba08c9be26..552d80daab 100644 --- a/src/KSPACE/gridcomm.cpp +++ b/src/KSPACE/gridcomm.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "gridcomm.h" +#include #include "comm.h" #include "kspace.h" #include "memory.h" diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index d7cc3f6876..bc5360dcd2 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -15,12 +15,12 @@ Contributing authors: Paul Crozier, Stan Moore, Stephen Bond, (all SNL) ------------------------------------------------------------------------- */ +#include "msm.h" #include #include #include #include #include -#include "msm.h" #include "atom.h" #include "comm.h" #include "gridcomm.h" diff --git a/src/KSPACE/msm_cg.cpp b/src/KSPACE/msm_cg.cpp index c7896db50c..22976b8442 100644 --- a/src/KSPACE/msm_cg.cpp +++ b/src/KSPACE/msm_cg.cpp @@ -15,6 +15,7 @@ Contributing authors: Paul Crozier, Stan Moore, Stephen Bond, (all SNL) ------------------------------------------------------------------------- */ +#include "msm_cg.h" #include #include #include @@ -27,7 +28,6 @@ #include "force.h" #include "neighbor.h" #include "memory.h" -#include "msm_cg.h" #include "math_const.h" diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index f12f5779d9..cb8360e401 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -15,11 +15,11 @@ Contributing author: Ahmed Ismail (SNL) ------------------------------------------------------------------------- */ +#include "pair_born_coul_long.h" #include #include #include #include -#include "pair_born_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_born_coul_msm.cpp b/src/KSPACE/pair_born_coul_msm.cpp index eaa1c116c1..deaf224334 100644 --- a/src/KSPACE/pair_born_coul_msm.cpp +++ b/src/KSPACE/pair_born_coul_msm.cpp @@ -15,11 +15,11 @@ Contributing author: Stan Moore (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_born_coul_msm.h" #include #include #include #include -#include "pair_born_coul_msm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_buck_coul_long.cpp b/src/KSPACE/pair_buck_coul_long.cpp index a5427965dc..c97856fa3c 100644 --- a/src/KSPACE/pair_buck_coul_long.cpp +++ b/src/KSPACE/pair_buck_coul_long.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_buck_coul_long.h" #include #include #include -#include "pair_buck_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_buck_coul_msm.cpp b/src/KSPACE/pair_buck_coul_msm.cpp index 257d1b661f..3d7687df90 100644 --- a/src/KSPACE/pair_buck_coul_msm.cpp +++ b/src/KSPACE/pair_buck_coul_msm.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_buck_coul_msm.h" #include #include #include #include -#include "pair_buck_coul_msm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index bcd290891e..8127cbc127 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -15,11 +15,11 @@ Contributing author: Pieter J. in 't Veld (SNL) ------------------------------------------------------------------------- */ +#include "pair_buck_long_coul_long.h" #include #include #include #include "math_vector.h" -#include "pair_buck_long_coul_long.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index ae268b9857..cb45b7a906 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -15,11 +15,11 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_coul_long.h" #include #include #include #include -#include "pair_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_coul_msm.cpp b/src/KSPACE/pair_coul_msm.cpp index 960505142c..2173171e79 100644 --- a/src/KSPACE/pair_coul_msm.cpp +++ b/src/KSPACE/pair_coul_msm.cpp @@ -15,11 +15,11 @@ Contributing authors: Stan Moore (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_coul_msm.h" #include #include #include #include -#include "pair_coul_msm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index b40eab244b..3ad14c8ea7 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -15,11 +15,11 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_long.h" #include #include #include #include -#include "pair_lj_charmm_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_lj_charmm_coul_msm.cpp b/src/KSPACE/pair_lj_charmm_coul_msm.cpp index 72a8e340bc..2d1775802f 100644 --- a/src/KSPACE/pair_lj_charmm_coul_msm.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_msm.cpp @@ -15,11 +15,11 @@ Contributing authors: Paul Crozier (SNL), Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_msm.h" #include #include #include #include -#include "pair_lj_charmm_coul_msm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index cdde211157..7f32613cba 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -19,11 +19,11 @@ additional assistance from Robert A. Latour, Clemson University ------------------------------------------------------------------------- */ +#include "pair_lj_charmmfsw_coul_long.h" #include #include #include #include -#include "pair_lj_charmmfsw_coul_long.h" #include "atom.h" #include "update.h" #include "comm.h" diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index fde7fa8e35..59f4766fa3 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -15,11 +15,11 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_long.h" #include #include #include #include -#include "pair_lj_cut_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_lj_cut_coul_msm.cpp b/src/KSPACE/pair_lj_cut_coul_msm.cpp index c2e566a117..1305d485da 100644 --- a/src/KSPACE/pair_lj_cut_coul_msm.cpp +++ b/src/KSPACE/pair_lj_cut_coul_msm.cpp @@ -15,11 +15,11 @@ Contributing authors: Stan Moore (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_msm.h" #include #include #include #include -#include "pair_lj_cut_coul_msm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index f5889fd520..cd9b3c032d 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -16,11 +16,11 @@ simpler force assignment added by Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_tip4p_long.h" #include #include #include #include -#include "pair_lj_cut_tip4p_long.h" #include "angle.h" #include "atom.h" #include "bond.h" diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 493866a895..46dbb60a96 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -17,12 +17,12 @@ University New Orleans) ------------------------------------------------------------------------- */ +#include "pair_lj_long_coul_long.h" #include #include #include #include #include "math_vector.h" -#include "pair_lj_long_coul_long.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index 3137b9d79a..5a1e347c78 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -16,11 +16,11 @@ Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ +#include "pair_lj_long_tip4p_long.h" #include #include #include #include -#include "pair_lj_long_tip4p_long.h" #include "angle.h" #include "atom.h" #include "bond.h" diff --git a/src/KSPACE/pair_tip4p_long.cpp b/src/KSPACE/pair_tip4p_long.cpp index 9419fdf196..deb8662a8b 100644 --- a/src/KSPACE/pair_tip4p_long.cpp +++ b/src/KSPACE/pair_tip4p_long.cpp @@ -16,11 +16,11 @@ simpler force assignment added by Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ +#include "pair_tip4p_long.h" #include #include #include #include -#include "pair_tip4p_long.h" #include "angle.h" #include "atom.h" #include "bond.h" diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index 53c18804a5..ae545c5c27 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -18,12 +18,12 @@ triclinic added by Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pppm.h" #include #include #include #include #include -#include "pppm.h" #include "atom.h" #include "comm.h" #include "gridcomm.h" diff --git a/src/KSPACE/pppm_cg.cpp b/src/KSPACE/pppm_cg.cpp index 3285dba21c..f9bd7b0cb4 100644 --- a/src/KSPACE/pppm_cg.cpp +++ b/src/KSPACE/pppm_cg.cpp @@ -15,11 +15,11 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_cg.h" #include #include #include #include - #include "atom.h" #include "gridcomm.h" #include "domain.h" @@ -27,8 +27,6 @@ #include "force.h" #include "neighbor.h" #include "memory.h" -#include "pppm_cg.h" - #include "math_const.h" using namespace LAMMPS_NS; diff --git a/src/KSPACE/pppm_dipole.cpp b/src/KSPACE/pppm_dipole.cpp index 21a777dd75..ad03b8205a 100644 --- a/src/KSPACE/pppm_dipole.cpp +++ b/src/KSPACE/pppm_dipole.cpp @@ -15,12 +15,12 @@ Contributing authors: Stan Moore (SNL), Julien Tranchida (SNL) ------------------------------------------------------------------------- */ +#include "pppm_dipole.h" #include #include #include #include #include -#include "pppm_dipole.h" #include "atom.h" #include "comm.h" #include "gridcomm.h" diff --git a/src/KSPACE/pppm_dipole_spin.cpp b/src/KSPACE/pppm_dipole_spin.cpp index 878d40c82e..2c96eadde1 100644 --- a/src/KSPACE/pppm_dipole_spin.cpp +++ b/src/KSPACE/pppm_dipole_spin.cpp @@ -15,12 +15,12 @@ Contributing author: Julien Tranchida (SNL) ------------------------------------------------------------------------- */ +#include "pppm_dipole_spin.h" #include #include #include #include #include -#include "pppm_dipole_spin.h" #include "atom.h" #include "comm.h" #include "gridcomm.h" diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 45dce0895b..22e570049c 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -16,12 +16,12 @@ Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pppm_disp.h" #include #include #include #include #include -#include "pppm_disp.h" #include "math_const.h" #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pppm_disp_tip4p.cpp b/src/KSPACE/pppm_disp_tip4p.cpp index 2bc63a84bb..36e6159131 100644 --- a/src/KSPACE/pppm_disp_tip4p.cpp +++ b/src/KSPACE/pppm_disp_tip4p.cpp @@ -16,8 +16,8 @@ Rolf Isele-Holder (Aachen University) ------------------------------------------------------------------------- */ -#include #include "pppm_disp_tip4p.h" +#include #include "pppm_disp.h" #include "atom.h" #include "domain.h" diff --git a/src/KSPACE/pppm_stagger.cpp b/src/KSPACE/pppm_stagger.cpp index a5ed6de626..5c2e2a6098 100644 --- a/src/KSPACE/pppm_stagger.cpp +++ b/src/KSPACE/pppm_stagger.cpp @@ -15,12 +15,12 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ +#include "pppm_stagger.h" #include #include #include #include #include -#include "pppm_stagger.h" #include "atom.h" #include "gridcomm.h" #include "force.h" diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index b9fe3e6488..52a1fb3787 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -15,8 +15,8 @@ Contributing authors: Amalie Frischknecht and Ahmed Ismail (SNL) ------------------------------------------------------------------------- */ -#include #include "pppm_tip4p.h" +#include #include "atom.h" #include "domain.h" #include "force.h" diff --git a/src/KSPACE/remap.cpp b/src/KSPACE/remap.cpp index 26541f121e..85fe78c9d7 100644 --- a/src/KSPACE/remap.cpp +++ b/src/KSPACE/remap.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "remap.h" #include #include -#include "remap.h" #define PACK_DATA FFT_SCALAR diff --git a/src/KSPACE/remap_wrap.cpp b/src/KSPACE/remap_wrap.cpp index 8ea2918d7f..7929cd053c 100644 --- a/src/KSPACE/remap_wrap.cpp +++ b/src/KSPACE/remap_wrap.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "remap_wrap.h" +#include #include "error.h" using namespace LAMMPS_NS; -- GitLab From 6cf3bb3e4e5e5176b985fe820876e0d240e1159e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 Jul 2019 21:56:29 -0400 Subject: [PATCH 121/236] recover compilation of KSPACE package --- src/KSPACE/fft3d.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/KSPACE/fft3d.h b/src/KSPACE/fft3d.h index a51818d986..8c3d2f27ad 100644 --- a/src/KSPACE/fft3d.h +++ b/src/KSPACE/fft3d.h @@ -11,6 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include + // User-settable FFT precision // FFT_PRECISION = 1 is single-precision complex (4-byte real, 4-byte imag) -- GitLab From 416911aa7e05a94328bfb9f1d7a580f40a450603 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 Jul 2019 21:57:39 -0400 Subject: [PATCH 122/236] more rearranging of include file order to put implementation headers first --- src/LATTE/fix_latte.cpp | 2 +- src/MANYBODY/fix_qeq_comb.cpp | 2 +- src/MANYBODY/pair_adp.cpp | 2 +- src/MANYBODY/pair_airebo.cpp | 2 +- src/MANYBODY/pair_atm.cpp | 2 +- src/MANYBODY/pair_bop.cpp | 2 +- src/MANYBODY/pair_comb.cpp | 2 +- src/MANYBODY/pair_comb3.cpp | 2 +- src/MANYBODY/pair_eam.cpp | 2 +- src/MANYBODY/pair_eam_alloy.cpp | 2 +- src/MANYBODY/pair_eam_cd.cpp | 2 +- src/MANYBODY/pair_eam_fs.cpp | 2 +- src/MANYBODY/pair_eim.cpp | 2 +- src/MANYBODY/pair_gw.cpp | 2 +- src/MANYBODY/pair_gw_zbl.cpp | 2 +- src/MANYBODY/pair_lcbop.cpp | 2 +- src/MANYBODY/pair_nb3b_harmonic.cpp | 2 +- src/MANYBODY/pair_polymorphic.cpp | 2 +- src/MANYBODY/pair_sw.cpp | 2 +- src/MANYBODY/pair_tersoff.cpp | 2 +- src/MANYBODY/pair_tersoff_mod.cpp | 2 +- src/MANYBODY/pair_tersoff_mod_c.cpp | 2 +- src/MANYBODY/pair_tersoff_zbl.cpp | 2 +- src/MANYBODY/pair_vashishta.cpp | 2 +- src/MANYBODY/pair_vashishta_table.cpp | 2 +- src/MC/fix_atom_swap.cpp | 2 +- src/MC/fix_bond_break.cpp | 2 +- src/MC/fix_bond_create.cpp | 2 +- src/MC/fix_bond_swap.cpp | 2 +- src/MC/fix_gcmc.cpp | 2 +- src/MC/pair_dsmc.cpp | 2 +- src/MESSAGE/fix_client_md.cpp | 2 +- src/MESSAGE/message.cpp | 2 +- src/MESSAGE/server.cpp | 2 +- src/MESSAGE/server_md.cpp | 2 +- src/MISC/compute_msd_nongauss.cpp | 2 +- src/MISC/compute_ti.cpp | 4 +-- src/MISC/dump_xtc.cpp | 2 +- src/MISC/fix_deposit.cpp | 2 +- src/MISC/fix_efield.cpp | 2 +- src/MISC/fix_evaporate.cpp | 2 +- src/MISC/fix_gld.cpp | 2 +- src/MISC/fix_oneway.cpp | 2 +- src/MISC/fix_orient_bcc.cpp | 2 +- src/MISC/fix_orient_fcc.cpp | 2 +- src/MISC/fix_thermal_conductivity.cpp | 2 +- src/MISC/fix_ttm.cpp | 2 +- src/MISC/fix_viscosity.cpp | 2 +- src/MISC/pair_nm_cut.cpp | 2 +- src/MISC/pair_nm_cut_coul_cut.cpp | 2 +- src/MISC/pair_nm_cut_coul_long.cpp | 2 +- src/MISC/xdr_compat.cpp | 2 +- src/MOLECULE/angle_charmm.cpp | 2 +- src/MOLECULE/angle_cosine.cpp | 2 +- src/MOLECULE/angle_cosine_delta.cpp | 2 +- src/MOLECULE/angle_cosine_periodic.cpp | 2 +- src/MOLECULE/angle_cosine_squared.cpp | 2 +- src/MOLECULE/angle_harmonic.cpp | 2 +- src/MOLECULE/angle_table.cpp | 2 +- src/MOLECULE/atom_vec_angle.cpp | 2 +- src/MOLECULE/atom_vec_bond.cpp | 2 +- src/MOLECULE/atom_vec_full.cpp | 2 +- src/MOLECULE/atom_vec_molecular.cpp | 2 +- src/MOLECULE/atom_vec_template.cpp | 2 +- src/MOLECULE/bond_fene.cpp | 2 +- src/MOLECULE/bond_fene_expand.cpp | 2 +- src/MOLECULE/bond_gromos.cpp | 2 +- src/MOLECULE/bond_harmonic.cpp | 2 +- src/MOLECULE/bond_morse.cpp | 2 +- src/MOLECULE/bond_nonlinear.cpp | 2 +- src/MOLECULE/bond_quartic.cpp | 2 +- src/MOLECULE/bond_table.cpp | 2 +- src/MOLECULE/dihedral_charmm.cpp | 2 +- src/MOLECULE/dihedral_charmmfsw.cpp | 2 +- src/MOLECULE/dihedral_harmonic.cpp | 2 +- src/MOLECULE/dihedral_helix.cpp | 2 +- src/MOLECULE/dihedral_multi_harmonic.cpp | 2 +- src/MOLECULE/dihedral_opls.cpp | 2 +- src/MOLECULE/fix_cmap.cpp | 2 +- src/MOLECULE/improper_cvff.cpp | 2 +- src/MOLECULE/improper_harmonic.cpp | 2 +- src/MOLECULE/improper_umbrella.cpp | 2 +- src/MOLECULE/pair_hbond_dreiding_lj.cpp | 2 +- src/MOLECULE/pair_hbond_dreiding_morse.cpp | 2 +- src/MOLECULE/pair_lj_charmm_coul_charmm.cpp | 2 +- .../pair_lj_charmm_coul_charmm_implicit.cpp | 2 +- .../pair_lj_charmmfsw_coul_charmmfsh.cpp | 2 +- src/MOLECULE/pair_lj_cut_tip4p_cut.cpp | 2 +- src/MOLECULE/pair_tip4p_cut.cpp | 2 +- src/MPIIO/dump_atom_mpiio.cpp | 2 +- src/MPIIO/dump_cfg_mpiio.cpp | 2 +- src/MPIIO/dump_custom_mpiio.cpp | 2 +- src/MPIIO/dump_xyz_mpiio.cpp | 2 +- src/MPIIO/restart_mpiio.cpp | 2 +- src/MSCG/fix_mscg.cpp | 2 +- src/OPT/pair_eam_opt.cpp | 2 +- src/OPT/pair_lj_charmm_coul_long_opt.cpp | 2 +- src/OPT/pair_lj_cut_coul_long_opt.cpp | 2 +- src/OPT/pair_lj_cut_opt.cpp | 2 +- src/OPT/pair_lj_cut_tip4p_long_opt.cpp | 2 +- src/OPT/pair_lj_long_coul_long_opt.cpp | 2 +- src/OPT/pair_morse_opt.cpp | 2 +- src/OPT/pair_ufm_opt.cpp | 2 +- src/PERI/atom_vec_peri.cpp | 2 +- src/PERI/compute_damage_atom.cpp | 2 +- src/PERI/compute_dilatation_atom.cpp | 2 +- src/PERI/compute_plasticity_atom.cpp | 2 +- src/PERI/fix_peri_neigh.cpp | 2 +- src/PERI/pair_peri_eps.cpp | 2 +- src/PERI/pair_peri_lps.cpp | 2 +- src/PERI/pair_peri_pmb.cpp | 2 +- src/PERI/pair_peri_ves.cpp | 2 +- src/POEMS/fix_poems.cpp | 2 +- src/PYTHON/fix_python_invoke.cpp | 2 +- src/PYTHON/fix_python_move.cpp | 2 +- src/PYTHON/pair_python.cpp | 2 +- src/PYTHON/python_impl.cpp | 2 +- src/QEQ/fix_qeq.cpp | 2 +- src/QEQ/fix_qeq_dynamic.cpp | 2 +- src/QEQ/fix_qeq_fire.cpp | 2 +- src/QEQ/fix_qeq_point.cpp | 2 +- src/QEQ/fix_qeq_shielded.cpp | 2 +- src/QEQ/fix_qeq_slater.cpp | 2 +- src/REPLICA/compute_event_displace.cpp | 2 +- src/REPLICA/fix_event.cpp | 2 +- src/REPLICA/fix_event_hyper.cpp | 2 +- src/REPLICA/fix_event_prd.cpp | 2 +- src/REPLICA/fix_event_tad.cpp | 2 +- src/REPLICA/fix_hyper.cpp | 2 +- src/REPLICA/fix_hyper_global.cpp | 2 +- src/REPLICA/fix_hyper_local.cpp | 2 +- src/REPLICA/fix_neb.cpp | 2 +- src/REPLICA/hyper.cpp | 2 +- src/REPLICA/neb.cpp | 2 +- src/REPLICA/prd.cpp | 2 +- src/REPLICA/tad.cpp | 2 +- src/REPLICA/temper.cpp | 2 +- src/REPLICA/verlet_split.cpp | 2 +- src/RIGID/compute_erotate_rigid.cpp | 2 +- src/RIGID/compute_ke_rigid.cpp | 2 +- src/RIGID/compute_rigid_local.cpp | 2 +- src/RIGID/fix_ehex.cpp | 2 +- src/RIGID/fix_rattle.cpp | 2 +- src/RIGID/fix_rigid.cpp | 2 +- src/RIGID/fix_rigid_nh.cpp | 2 +- src/RIGID/fix_rigid_nh_small.cpp | 2 +- src/RIGID/fix_rigid_nph.cpp | 2 +- src/RIGID/fix_rigid_nph_small.cpp | 2 +- src/RIGID/fix_rigid_npt.cpp | 2 +- src/RIGID/fix_rigid_npt_small.cpp | 2 +- src/RIGID/fix_rigid_small.cpp | 2 +- src/RIGID/fix_shake.cpp | 2 +- src/SHOCK/fix_append_atoms.cpp | 2 +- src/SHOCK/fix_msst.cpp | 2 +- src/SHOCK/fix_nphug.cpp | 2 +- src/SHOCK/fix_wall_piston.cpp | 2 +- src/SNAP/compute_sna_atom.cpp | 5 ++-- src/SNAP/compute_snad_atom.cpp | 5 ++-- src/SNAP/compute_snav_atom.cpp | 3 ++- src/SNAP/pair_snap.cpp | 2 +- src/SNAP/sna.cpp | 2 +- src/SPIN/atom_vec_spin.cpp | 2 +- src/SPIN/compute_spin.cpp | 2 +- src/SPIN/fix_langevin_spin.cpp | 2 +- src/SPIN/fix_neb_spin.cpp | 2 +- src/SPIN/fix_nve_spin.cpp | 2 +- src/SPIN/fix_precession_spin.cpp | 2 +- src/SPIN/fix_setforce_spin.cpp | 2 +- src/SPIN/min_spin.cpp | 2 +- src/SPIN/neb_spin.cpp | 2 +- src/SPIN/pair_spin.cpp | 2 +- src/SPIN/pair_spin_dipole_cut.cpp | 2 +- src/SPIN/pair_spin_dipole_long.cpp | 2 +- src/SPIN/pair_spin_dmi.cpp | 2 +- src/SPIN/pair_spin_exchange.cpp | 2 +- src/SPIN/pair_spin_magelec.cpp | 2 +- src/SPIN/pair_spin_neel.cpp | 2 +- src/SRD/fix_srd.cpp | 2 +- src/SRD/fix_wall_srd.cpp | 2 +- src/USER-ADIOS/dump_atom_adios.cpp | 2 +- src/USER-ADIOS/dump_custom_adios.cpp | 4 +-- src/USER-ATC/fix_atc.cpp | 10 +++---- src/USER-AWPMD/atom_vec_wavepacket.cpp | 2 +- src/USER-AWPMD/fix_nve_awpmd.cpp | 2 +- src/USER-AWPMD/pair_awpmd_cut.cpp | 2 +- src/USER-BOCS/compute_pressure_bocs.cpp | 2 +- src/USER-BOCS/fix_bocs.cpp | 2 +- src/USER-CGDNA/bond_oxdna2_fene.cpp | 2 +- src/USER-CGDNA/bond_oxdna_fene.cpp | 2 +- src/USER-CGDNA/fix_nve_dot.cpp | 2 +- src/USER-CGDNA/fix_nve_dotc_langevin.cpp | 2 +- src/USER-CGDNA/pair_oxdna2_coaxstk.cpp | 2 +- src/USER-CGDNA/pair_oxdna2_dh.cpp | 2 +- src/USER-CGDNA/pair_oxdna2_excv.cpp | 2 +- src/USER-CGDNA/pair_oxdna2_stk.cpp | 2 +- src/USER-CGDNA/pair_oxdna_coaxstk.cpp | 2 +- src/USER-CGDNA/pair_oxdna_excv.cpp | 2 +- src/USER-CGDNA/pair_oxdna_hbond.cpp | 2 +- src/USER-CGDNA/pair_oxdna_stk.cpp | 2 +- src/USER-CGDNA/pair_oxdna_xstk.cpp | 2 +- src/USER-CGSDK/angle_sdk.cpp | 2 +- src/USER-CGSDK/pair_lj_sdk.cpp | 2 +- src/USER-CGSDK/pair_lj_sdk_coul_long.cpp | 2 +- src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp | 2 +- src/USER-COLVARS/colvarproxy_lammps.cpp | 26 +++++++++---------- src/USER-COLVARS/fix_colvars.cpp | 2 +- src/USER-COLVARS/group_ndx.cpp | 5 ++-- src/USER-COLVARS/ndx_group.cpp | 7 +++-- 208 files changed, 233 insertions(+), 234 deletions(-) diff --git a/src/LATTE/fix_latte.cpp b/src/LATTE/fix_latte.cpp index 645b298e09..7d4e89272d 100644 --- a/src/LATTE/fix_latte.cpp +++ b/src/LATTE/fix_latte.cpp @@ -15,9 +15,9 @@ Contributing author: Christian Negre (LANL) ------------------------------------------------------------------------- */ +#include "fix_latte.h" #include #include -#include "fix_latte.h" #include "atom.h" #include "comm.h" #include "update.h" diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index 5019e7711a..9e9bbcc9d6 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -15,13 +15,13 @@ Contributing authors: Ray Shan (Sandia, tnshan@sandia.gov) ------------------------------------------------------------------------- */ +#include "fix_qeq_comb.h" #include #include #include #include #include "pair_comb.h" #include "pair_comb3.h" -#include "fix_qeq_comb.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/MANYBODY/pair_adp.cpp b/src/MANYBODY/pair_adp.cpp index 68511b8709..8051f97634 100644 --- a/src/MANYBODY/pair_adp.cpp +++ b/src/MANYBODY/pair_adp.cpp @@ -16,11 +16,11 @@ Chandra Veer Singh (Cornell) ------------------------------------------------------------------------- */ +#include "pair_adp.h" #include #include #include #include -#include "pair_adp.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index e3c5a1627b..fd2016b7a7 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -20,12 +20,12 @@ Thomas C. O'Connor (JHU) 2014 ------------------------------------------------------------------------- */ +#include "pair_airebo.h" #include #include #include #include #include -#include "pair_airebo.h" #include "atom.h" #include "neighbor.h" #include "force.h" diff --git a/src/MANYBODY/pair_atm.cpp b/src/MANYBODY/pair_atm.cpp index c157e0763c..ba68033721 100644 --- a/src/MANYBODY/pair_atm.cpp +++ b/src/MANYBODY/pair_atm.cpp @@ -15,8 +15,8 @@ Contributing author: Sergey Lishchuk ------------------------------------------------------------------------- */ -#include #include "pair_atm.h" +#include #include "atom.h" #include "citeme.h" #include "comm.h" diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index ac157e071c..27c24ce3d7 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -32,12 +32,12 @@ Rules"_http://lammps.sandia.gov/open_source.html ------------------------------------------------------------------------- */ +#include "pair_bop.h" #include #include #include #include #include -#include "pair_bop.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index 980aa84b2a..b9a17eeb35 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -18,11 +18,11 @@ and Aidan Thompson's Tersoff code in LAMMPS ------------------------------------------------------------------------- */ +#include "pair_comb.h" #include #include #include #include -#include "pair_comb.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 097f235ff2..846ef7d4b9 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -17,11 +17,11 @@ Dundar Yilmaz (dundar.yilmaz@zirve.edu.tr) ------------------------------------------------------------------------- */ +#include "pair_comb3.h" #include #include #include #include -#include "pair_comb3.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index b7957349b6..e6476b78c5 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -15,11 +15,11 @@ Contributing authors: Stephen Foiles (SNL), Murray Daw (SNL) ------------------------------------------------------------------------- */ +#include "pair_eam.h" #include #include #include #include -#include "pair_eam.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/MANYBODY/pair_eam_alloy.cpp b/src/MANYBODY/pair_eam_alloy.cpp index c004030240..7aae786720 100644 --- a/src/MANYBODY/pair_eam_alloy.cpp +++ b/src/MANYBODY/pair_eam_alloy.cpp @@ -15,10 +15,10 @@ Contributing authors: Stephen Foiles (SNL), Murray Daw (SNL) ------------------------------------------------------------------------- */ +#include "pair_eam_alloy.h" #include #include #include -#include "pair_eam_alloy.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MANYBODY/pair_eam_cd.cpp b/src/MANYBODY/pair_eam_cd.cpp index c111c6d950..55ad597cce 100644 --- a/src/MANYBODY/pair_eam_cd.cpp +++ b/src/MANYBODY/pair_eam_cd.cpp @@ -17,11 +17,11 @@ Germany Department of Materials Science ------------------------------------------------------------------------- */ +#include "pair_eam_cd.h" #include #include #include #include -#include "pair_eam_cd.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/MANYBODY/pair_eam_fs.cpp b/src/MANYBODY/pair_eam_fs.cpp index bbda84fdf1..7b13988d0c 100644 --- a/src/MANYBODY/pair_eam_fs.cpp +++ b/src/MANYBODY/pair_eam_fs.cpp @@ -15,10 +15,10 @@ Contributing authors: Tim Lau (MIT) ------------------------------------------------------------------------- */ +#include "pair_eam_fs.h" #include #include #include -#include "pair_eam_fs.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MANYBODY/pair_eim.cpp b/src/MANYBODY/pair_eim.cpp index f1c028ef38..58cb1fd2e0 100644 --- a/src/MANYBODY/pair_eim.cpp +++ b/src/MANYBODY/pair_eim.cpp @@ -15,11 +15,11 @@ Contributing author: Xiaowang Zhou (SNL) ------------------------------------------------------------------------- */ +#include "pair_eim.h" #include #include #include #include -#include "pair_eim.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/MANYBODY/pair_gw.cpp b/src/MANYBODY/pair_gw.cpp index e4b74f7a29..07e9201f94 100644 --- a/src/MANYBODY/pair_gw.cpp +++ b/src/MANYBODY/pair_gw.cpp @@ -16,11 +16,11 @@ based on PairTersoff by Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "pair_gw.h" #include #include #include #include -#include "pair_gw.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/MANYBODY/pair_gw_zbl.cpp b/src/MANYBODY/pair_gw_zbl.cpp index f3dd1bc04b..cd83727ed3 100644 --- a/src/MANYBODY/pair_gw_zbl.cpp +++ b/src/MANYBODY/pair_gw_zbl.cpp @@ -16,11 +16,11 @@ Based on PairTersoffZBL by Aidan Thompson (SNL) and David Farrell (NWU) ------------------------------------------------------------------------- */ +#include "pair_gw_zbl.h" #include #include #include #include -#include "pair_gw_zbl.h" #include "atom.h" #include "update.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_lcbop.cpp b/src/MANYBODY/pair_lcbop.cpp index 05cdea8055..b0240978a9 100644 --- a/src/MANYBODY/pair_lcbop.cpp +++ b/src/MANYBODY/pair_lcbop.cpp @@ -16,12 +16,12 @@ based on pair_airebo by Ase Henry (MIT) ------------------------------------------------------------------------- */ +#include "pair_lcbop.h" #include #include #include #include #include -#include "pair_lcbop.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MANYBODY/pair_nb3b_harmonic.cpp b/src/MANYBODY/pair_nb3b_harmonic.cpp index a61b403459..ac20c3e61f 100644 --- a/src/MANYBODY/pair_nb3b_harmonic.cpp +++ b/src/MANYBODY/pair_nb3b_harmonic.cpp @@ -16,11 +16,11 @@ (based on Stillinger-Weber pair style) ------------------------------------------------------------------------- */ +#include "pair_nb3b_harmonic.h" #include #include #include #include -#include "pair_nb3b_harmonic.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index d3aca4e889..0cca50823d 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -16,11 +16,11 @@ This modifies from pair_tersoff.cpp by Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "pair_polymorphic.h" #include #include #include #include -#include "pair_polymorphic.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/MANYBODY/pair_sw.cpp b/src/MANYBODY/pair_sw.cpp index 5a148fb152..ea47fc97c3 100644 --- a/src/MANYBODY/pair_sw.cpp +++ b/src/MANYBODY/pair_sw.cpp @@ -15,11 +15,11 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "pair_sw.h" #include #include #include #include -#include "pair_sw.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MANYBODY/pair_tersoff.cpp b/src/MANYBODY/pair_tersoff.cpp index 213b1037bb..9d7f804f9a 100644 --- a/src/MANYBODY/pair_tersoff.cpp +++ b/src/MANYBODY/pair_tersoff.cpp @@ -15,11 +15,11 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "pair_tersoff.h" #include #include #include #include -#include "pair_tersoff.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/MANYBODY/pair_tersoff_mod.cpp b/src/MANYBODY/pair_tersoff_mod.cpp index e8fdecfe01..df3c41fc33 100644 --- a/src/MANYBODY/pair_tersoff_mod.cpp +++ b/src/MANYBODY/pair_tersoff_mod.cpp @@ -16,11 +16,11 @@ Vitaly Dozhdikov (JIHT of RAS) - MOD addition ------------------------------------------------------------------------- */ +#include "pair_tersoff_mod.h" #include #include #include #include -#include "pair_tersoff_mod.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/MANYBODY/pair_tersoff_mod_c.cpp b/src/MANYBODY/pair_tersoff_mod_c.cpp index 4a5904c106..d34291f6cd 100644 --- a/src/MANYBODY/pair_tersoff_mod_c.cpp +++ b/src/MANYBODY/pair_tersoff_mod_c.cpp @@ -15,11 +15,11 @@ Contributing author: Ganga P Purja Pun (George Mason University, Fairfax) ------------------------------------------------------------------------- */ +#include "pair_tersoff_mod_c.h" #include #include #include #include -#include "pair_tersoff_mod_c.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/MANYBODY/pair_tersoff_zbl.cpp b/src/MANYBODY/pair_tersoff_zbl.cpp index 353e3d2264..6a8aa40782 100644 --- a/src/MANYBODY/pair_tersoff_zbl.cpp +++ b/src/MANYBODY/pair_tersoff_zbl.cpp @@ -16,11 +16,11 @@ David Farrell (NWU) - ZBL addition ------------------------------------------------------------------------- */ +#include "pair_tersoff_zbl.h" #include #include #include #include -#include "pair_tersoff_zbl.h" #include "atom.h" #include "update.h" #include "neighbor.h" diff --git a/src/MANYBODY/pair_vashishta.cpp b/src/MANYBODY/pair_vashishta.cpp index 3d4b1d900e..5055dadfaf 100644 --- a/src/MANYBODY/pair_vashishta.cpp +++ b/src/MANYBODY/pair_vashishta.cpp @@ -16,11 +16,11 @@ Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "pair_vashishta.h" #include #include #include #include -#include "pair_vashishta.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MANYBODY/pair_vashishta_table.cpp b/src/MANYBODY/pair_vashishta_table.cpp index d4eaa59f1a..726e0f83f1 100644 --- a/src/MANYBODY/pair_vashishta_table.cpp +++ b/src/MANYBODY/pair_vashishta_table.cpp @@ -15,11 +15,11 @@ Contributing author: Anders Hafreager (UiO), andershaf@gmail.com ------------------------------------------------------------------------- */ +#include "pair_vashishta_table.h" #include #include #include #include -#include "pair_vashishta_table.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MC/fix_atom_swap.cpp b/src/MC/fix_atom_swap.cpp index 7d817ffbb1..c14efcca46 100644 --- a/src/MC/fix_atom_swap.cpp +++ b/src/MC/fix_atom_swap.cpp @@ -16,11 +16,11 @@ Alexander Stukowski ------------------------------------------------------------------------- */ +#include "fix_atom_swap.h" #include #include #include #include -#include "fix_atom_swap.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_hybrid.h" diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index 05edc0509e..1b07395f1e 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_bond_break.h" #include #include #include #include -#include "fix_bond_break.h" #include "update.h" #include "respa.h" #include "atom.h" diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index e1dd18cb5b..d2d93b67f6 100644 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_bond_create.h" #include #include #include #include -#include "fix_bond_create.h" #include "update.h" #include "respa.h" #include "atom.h" diff --git a/src/MC/fix_bond_swap.cpp b/src/MC/fix_bond_swap.cpp index 5da2b845d6..187c552416 100644 --- a/src/MC/fix_bond_swap.cpp +++ b/src/MC/fix_bond_swap.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_bond_swap.h" #include #include #include -#include "fix_bond_swap.h" #include "atom.h" #include "force.h" #include "pair.h" diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 4e48b71611..8fe6042c2e 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier, Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "fix_gcmc.h" #include #include #include -#include "fix_gcmc.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_hybrid.h" diff --git a/src/MC/pair_dsmc.cpp b/src/MC/pair_dsmc.cpp index c71eaa2295..cf48706133 100644 --- a/src/MC/pair_dsmc.cpp +++ b/src/MC/pair_dsmc.cpp @@ -15,12 +15,12 @@ Contributing authors: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_dsmc.h" #include #include #include #include #include -#include "pair_dsmc.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MESSAGE/fix_client_md.cpp b/src/MESSAGE/fix_client_md.cpp index 727481dcc0..7d4ae13f0f 100644 --- a/src/MESSAGE/fix_client_md.cpp +++ b/src/MESSAGE/fix_client_md.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_client_md.h" #include #include -#include "fix_client_md.h" #include "update.h" #include "atom.h" #include "comm.h" diff --git a/src/MESSAGE/message.cpp b/src/MESSAGE/message.cpp index 61221ca26e..f8fc349746 100644 --- a/src/MESSAGE/message.cpp +++ b/src/MESSAGE/message.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "message.h" +#include #include "error.h" // CSlib interface diff --git a/src/MESSAGE/server.cpp b/src/MESSAGE/server.cpp index f587fb76df..dbcec08488 100644 --- a/src/MESSAGE/server.cpp +++ b/src/MESSAGE/server.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "server.h" +#include #include "error.h" // customize by adding a new server protocol include and enum diff --git a/src/MESSAGE/server_md.cpp b/src/MESSAGE/server_md.cpp index bef327616e..e16095ad4c 100644 --- a/src/MESSAGE/server_md.cpp +++ b/src/MESSAGE/server_md.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "server_md.h" #include #include -#include "server_md.h" #include "atom.h" #include "atom_vec.h" #include "update.h" diff --git a/src/MISC/compute_msd_nongauss.cpp b/src/MISC/compute_msd_nongauss.cpp index f6291f4204..e02dd633cb 100644 --- a/src/MISC/compute_msd_nongauss.cpp +++ b/src/MISC/compute_msd_nongauss.cpp @@ -15,8 +15,8 @@ Contributing authors: Rob Hoy ------------------------------------------------------------------------- */ -#include #include "compute_msd_nongauss.h" +#include #include "atom.h" #include "update.h" #include "group.h" diff --git a/src/MISC/compute_ti.cpp b/src/MISC/compute_ti.cpp index d2e43a9f69..266263785f 100644 --- a/src/MISC/compute_ti.cpp +++ b/src/MISC/compute_ti.cpp @@ -15,10 +15,10 @@ Contributing author: Sai Jayaraman (University of Notre Dame) ------------------------------------------------------------------------- */ +#include "compute_ti.h" #include -#include "atom.h" #include -#include "compute_ti.h" +#include "atom.h" #include "update.h" #include "modify.h" #include "domain.h" diff --git a/src/MISC/dump_xtc.cpp b/src/MISC/dump_xtc.cpp index a82cba20bd..7abe4c4093 100644 --- a/src/MISC/dump_xtc.cpp +++ b/src/MISC/dump_xtc.cpp @@ -22,12 +22,12 @@ support for groups ------------------------------------------------------------------------- */ +#include "dump_xtc.h" #include #include #include #include #include -#include "dump_xtc.h" #include "domain.h" #include "atom.h" #include "update.h" diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index 66aed34846..22a144da60 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_deposit.h" #include #include #include -#include "fix_deposit.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/MISC/fix_efield.cpp b/src/MISC/fix_efield.cpp index 004c8ad7bc..87ece82f57 100644 --- a/src/MISC/fix_efield.cpp +++ b/src/MISC/fix_efield.cpp @@ -16,10 +16,10 @@ Stan Moore (Sandia) for dipole terms ------------------------------------------------------------------------- */ +#include "fix_efield.h" #include #include #include -#include "fix_efield.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/MISC/fix_evaporate.cpp b/src/MISC/fix_evaporate.cpp index 1bf7a15f1f..e2c7844853 100644 --- a/src/MISC/fix_evaporate.cpp +++ b/src/MISC/fix_evaporate.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_evaporate.h" #include #include #include -#include "fix_evaporate.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/MISC/fix_gld.cpp b/src/MISC/fix_gld.cpp index 2bf02889a5..265ee4fb09 100644 --- a/src/MISC/fix_gld.cpp +++ b/src/MISC/fix_gld.cpp @@ -16,10 +16,10 @@ Andrew Baczewski (Michigan State/SNL) ------------------------------------------------------------------------- */ +#include "fix_gld.h" #include #include #include -#include "fix_gld.h" #include "math_extra.h" #include "atom.h" #include "force.h" diff --git a/src/MISC/fix_oneway.cpp b/src/MISC/fix_oneway.cpp index 73853775a3..fcf5a7a0bd 100644 --- a/src/MISC/fix_oneway.cpp +++ b/src/MISC/fix_oneway.cpp @@ -15,8 +15,8 @@ Contributing author: Axel Kohlmeyer (ICTP, Italy) ------------------------------------------------------------------------- */ -#include #include "fix_oneway.h" +#include #include "atom.h" #include "domain.h" #include "error.h" diff --git a/src/MISC/fix_orient_bcc.cpp b/src/MISC/fix_orient_bcc.cpp index 02cce5a014..a300631658 100644 --- a/src/MISC/fix_orient_bcc.cpp +++ b/src/MISC/fix_orient_bcc.cpp @@ -18,11 +18,11 @@ (https://dx.doi.org/10.6084/m9.figshare.1488628.v1 ------------------------------------------------------------------------- */ +#include "fix_orient_bcc.h" #include #include #include #include -#include "fix_orient_bcc.h" #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/MISC/fix_orient_fcc.cpp b/src/MISC/fix_orient_fcc.cpp index fc827ceb8f..d898f95d2c 100644 --- a/src/MISC/fix_orient_fcc.cpp +++ b/src/MISC/fix_orient_fcc.cpp @@ -15,11 +15,11 @@ Contributing authors: Koenraad Janssens and David Olmsted (SNL) ------------------------------------------------------------------------- */ +#include "fix_orient_fcc.h" #include #include #include #include -#include "fix_orient_fcc.h" #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/MISC/fix_thermal_conductivity.cpp b/src/MISC/fix_thermal_conductivity.cpp index f1aec3ff69..8da303c8ab 100644 --- a/src/MISC/fix_thermal_conductivity.cpp +++ b/src/MISC/fix_thermal_conductivity.cpp @@ -16,11 +16,11 @@ for swapping atoms of different masses ------------------------------------------------------------------------- */ +#include "fix_thermal_conductivity.h" #include #include #include #include -#include "fix_thermal_conductivity.h" #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/MISC/fix_ttm.cpp b/src/MISC/fix_ttm.cpp index 170103b0d0..06de732de6 100644 --- a/src/MISC/fix_ttm.cpp +++ b/src/MISC/fix_ttm.cpp @@ -16,11 +16,11 @@ Carolyn Phillips (University of Michigan) ------------------------------------------------------------------------- */ +#include "fix_ttm.h" #include #include #include #include -#include "fix_ttm.h" #include "atom.h" #include "force.h" #include "update.h" diff --git a/src/MISC/fix_viscosity.cpp b/src/MISC/fix_viscosity.cpp index 8e33c1c614..52107954c2 100644 --- a/src/MISC/fix_viscosity.cpp +++ b/src/MISC/fix_viscosity.cpp @@ -16,11 +16,11 @@ for swapping atoms of different masses ------------------------------------------------------------------------- */ +#include "fix_viscosity.h" #include #include #include #include -#include "fix_viscosity.h" #include "atom.h" #include "domain.h" #include "modify.h" diff --git a/src/MISC/pair_nm_cut.cpp b/src/MISC/pair_nm_cut.cpp index 124832b63e..9b8c36da3a 100644 --- a/src/MISC/pair_nm_cut.cpp +++ b/src/MISC/pair_nm_cut.cpp @@ -15,11 +15,11 @@ Contributing Author: Julien Devemy (ICCF) ------------------------------------------------------------------------- */ +#include "pair_nm_cut.h" #include #include #include #include -#include "pair_nm_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MISC/pair_nm_cut_coul_cut.cpp b/src/MISC/pair_nm_cut_coul_cut.cpp index a8428ab980..069c363817 100644 --- a/src/MISC/pair_nm_cut_coul_cut.cpp +++ b/src/MISC/pair_nm_cut_coul_cut.cpp @@ -15,11 +15,11 @@ Contributing Author: Julien Devemy (ICCF) ------------------------------------------------------------------------- */ +#include "pair_nm_cut_coul_cut.h" #include #include #include #include -#include "pair_nm_cut_coul_cut.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MISC/pair_nm_cut_coul_long.cpp b/src/MISC/pair_nm_cut_coul_long.cpp index af21f02881..b3d42b05f8 100644 --- a/src/MISC/pair_nm_cut_coul_long.cpp +++ b/src/MISC/pair_nm_cut_coul_long.cpp @@ -15,11 +15,11 @@ Contributing Author: Julien Devemy (ICCF) ------------------------------------------------------------------------- */ +#include "pair_nm_cut_coul_long.h" #include #include #include #include -#include "pair_nm_cut_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MISC/xdr_compat.cpp b/src/MISC/xdr_compat.cpp index 2d8d0ce7e5..e124d52d7b 100644 --- a/src/MISC/xdr_compat.cpp +++ b/src/MISC/xdr_compat.cpp @@ -1,7 +1,7 @@ +#include "xdr_compat.h" #include #include #include -#include "xdr_compat.h" /* This file is needed for systems, that do not provide XDR support * in their system libraries. It was written for windows, but will diff --git a/src/MOLECULE/angle_charmm.cpp b/src/MOLECULE/angle_charmm.cpp index efd1c682f7..fb0afd78c3 100644 --- a/src/MOLECULE/angle_charmm.cpp +++ b/src/MOLECULE/angle_charmm.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "angle_charmm.h" #include #include -#include "angle_charmm.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_cosine.cpp b/src/MOLECULE/angle_cosine.cpp index 6e1b9fa2fb..aff5130323 100644 --- a/src/MOLECULE/angle_cosine.cpp +++ b/src/MOLECULE/angle_cosine.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "angle_cosine.h" #include #include -#include "angle_cosine.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_cosine_delta.cpp b/src/MOLECULE/angle_cosine_delta.cpp index eca10970f2..13ed00b327 100644 --- a/src/MOLECULE/angle_cosine_delta.cpp +++ b/src/MOLECULE/angle_cosine_delta.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U), akohlmey at gmail.com ------------------------------------------------------------------------- */ +#include "angle_cosine_delta.h" #include #include -#include "angle_cosine_delta.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_cosine_periodic.cpp b/src/MOLECULE/angle_cosine_periodic.cpp index cb0a26871a..9f7c02cabc 100644 --- a/src/MOLECULE/angle_cosine_periodic.cpp +++ b/src/MOLECULE/angle_cosine_periodic.cpp @@ -15,9 +15,9 @@ Contributing author: Tod A Pascal (Caltech) ------------------------------------------------------------------------- */ +#include "angle_cosine_periodic.h" #include #include -#include "angle_cosine_periodic.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_cosine_squared.cpp b/src/MOLECULE/angle_cosine_squared.cpp index 28d63344a4..789a536c98 100644 --- a/src/MOLECULE/angle_cosine_squared.cpp +++ b/src/MOLECULE/angle_cosine_squared.cpp @@ -15,9 +15,9 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins U) ------------------------------------------------------------------------- */ +#include "angle_cosine_squared.h" #include #include -#include "angle_cosine_squared.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_harmonic.cpp b/src/MOLECULE/angle_harmonic.cpp index 48b493d9b2..b626bdfae5 100644 --- a/src/MOLECULE/angle_harmonic.cpp +++ b/src/MOLECULE/angle_harmonic.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "angle_harmonic.h" #include #include -#include "angle_harmonic.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_table.cpp b/src/MOLECULE/angle_table.cpp index c18b4c43b0..ce7fcdcaf2 100644 --- a/src/MOLECULE/angle_table.cpp +++ b/src/MOLECULE/angle_table.cpp @@ -15,10 +15,10 @@ Contributing author: Chuanfu Luo (luochuanfu@gmail.com) ------------------------------------------------------------------------- */ +#include "angle_table.h" #include #include #include -#include "angle_table.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index 6eb5b50fd2..f3c48aa87a 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_angle.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 6a7b3585b4..b0f76adc45 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_bond.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index d682abf799..c9b2402062 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_full.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index cdd3f02505..524f7bcb0d 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "atom_vec_molecular.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index 3172804b95..6a12027b7b 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_template.h" #include #include -#include "atom_vec_template.h" #include "atom.h" #include "molecule.h" #include "comm.h" diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index c023a7e81e..d4f2a4010e 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "bond_fene.h" #include #include -#include "bond_fene.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/bond_fene_expand.cpp b/src/MOLECULE/bond_fene_expand.cpp index b1bfdc6a1b..3e4ceab42c 100644 --- a/src/MOLECULE/bond_fene_expand.cpp +++ b/src/MOLECULE/bond_fene_expand.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "bond_fene_expand.h" #include #include -#include "bond_fene_expand.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/bond_gromos.cpp b/src/MOLECULE/bond_gromos.cpp index f65adeb2cb..44e99d8fe0 100644 --- a/src/MOLECULE/bond_gromos.cpp +++ b/src/MOLECULE/bond_gromos.cpp @@ -15,10 +15,10 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "bond_gromos.h" #include #include #include -#include "bond_gromos.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/bond_harmonic.cpp b/src/MOLECULE/bond_harmonic.cpp index cb8434ce6e..bbbad4102d 100644 --- a/src/MOLECULE/bond_harmonic.cpp +++ b/src/MOLECULE/bond_harmonic.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "bond_harmonic.h" #include #include #include -#include "bond_harmonic.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/bond_morse.cpp b/src/MOLECULE/bond_morse.cpp index 91dd2dbc49..af476d6fe8 100644 --- a/src/MOLECULE/bond_morse.cpp +++ b/src/MOLECULE/bond_morse.cpp @@ -15,9 +15,9 @@ Contributing author: Jeff Greathouse (SNL) ------------------------------------------------------------------------- */ +#include "bond_morse.h" #include #include -#include "bond_morse.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/bond_nonlinear.cpp b/src/MOLECULE/bond_nonlinear.cpp index 9999ead47f..89ddb7b118 100644 --- a/src/MOLECULE/bond_nonlinear.cpp +++ b/src/MOLECULE/bond_nonlinear.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "bond_nonlinear.h" #include #include -#include "bond_nonlinear.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/bond_quartic.cpp b/src/MOLECULE/bond_quartic.cpp index 895202ff00..34b3ad8288 100644 --- a/src/MOLECULE/bond_quartic.cpp +++ b/src/MOLECULE/bond_quartic.cpp @@ -15,9 +15,9 @@ Contributing authors: Chris Lorenz and Mark Stevens (SNL) ------------------------------------------------------------------------- */ +#include "bond_quartic.h" #include #include -#include "bond_quartic.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index 10851774d7..e80baee6e8 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -15,10 +15,10 @@ Contributing author: Chuanfu Luo (luochuanfu@gmail.com) ------------------------------------------------------------------------- */ +#include "bond_table.h" #include #include #include -#include "bond_table.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index 68c62eb4fd..1905c14358 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -15,11 +15,11 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "dihedral_charmm.h" #include #include #include #include -#include "dihedral_charmm.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index f65d01e9ed..9b02b908d6 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -18,11 +18,11 @@ with additional assistance from Robert A. Latour, Clemson University ------------------------------------------------------------------------- */ +#include "dihedral_charmmfsw.h" #include #include #include #include -#include "dihedral_charmmfsw.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/MOLECULE/dihedral_harmonic.cpp b/src/MOLECULE/dihedral_harmonic.cpp index ddb94dc571..159636ecd5 100644 --- a/src/MOLECULE/dihedral_harmonic.cpp +++ b/src/MOLECULE/dihedral_harmonic.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "dihedral_harmonic.h" #include #include #include -#include "dihedral_harmonic.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/MOLECULE/dihedral_helix.cpp b/src/MOLECULE/dihedral_helix.cpp index d19731c097..a7d2aba1d6 100644 --- a/src/MOLECULE/dihedral_helix.cpp +++ b/src/MOLECULE/dihedral_helix.cpp @@ -16,10 +16,10 @@ Mark Stevens (Sandia) ------------------------------------------------------------------------- */ +#include "dihedral_helix.h" #include #include #include -#include "dihedral_helix.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/dihedral_multi_harmonic.cpp b/src/MOLECULE/dihedral_multi_harmonic.cpp index 04e7bbb627..ba98cf6ddf 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.cpp +++ b/src/MOLECULE/dihedral_multi_harmonic.cpp @@ -15,9 +15,9 @@ Contributing author: Mathias Puetz (SNL) and friends ------------------------------------------------------------------------- */ +#include "dihedral_multi_harmonic.h" #include #include -#include "dihedral_multi_harmonic.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/dihedral_opls.cpp b/src/MOLECULE/dihedral_opls.cpp index 293245e411..d68eba0bec 100644 --- a/src/MOLECULE/dihedral_opls.cpp +++ b/src/MOLECULE/dihedral_opls.cpp @@ -15,9 +15,9 @@ Contributing author: Mark Stevens (SNL) ------------------------------------------------------------------------- */ +#include "dihedral_opls.h" #include #include -#include "dihedral_opls.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/MOLECULE/fix_cmap.cpp b/src/MOLECULE/fix_cmap.cpp index 3395c7ef14..3d5bf90bdc 100644 --- a/src/MOLECULE/fix_cmap.cpp +++ b/src/MOLECULE/fix_cmap.cpp @@ -27,12 +27,12 @@ - MacKerell et al., J. Comput. Chem. 25(2004):1400-1415. ------------------------------------------------------------------------- */ +#include "fix_cmap.h" #include #include #include #include #include -#include "fix_cmap.h" #include "atom.h" #include "atom_vec.h" #include "update.h" diff --git a/src/MOLECULE/improper_cvff.cpp b/src/MOLECULE/improper_cvff.cpp index 01e9729e80..fd24ab69c3 100644 --- a/src/MOLECULE/improper_cvff.cpp +++ b/src/MOLECULE/improper_cvff.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "improper_cvff.h" #include #include #include -#include "improper_cvff.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/MOLECULE/improper_harmonic.cpp b/src/MOLECULE/improper_harmonic.cpp index c5421fffdb..936c22e94a 100644 --- a/src/MOLECULE/improper_harmonic.cpp +++ b/src/MOLECULE/improper_harmonic.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "improper_harmonic.h" #include #include #include -#include "improper_harmonic.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/MOLECULE/improper_umbrella.cpp b/src/MOLECULE/improper_umbrella.cpp index 3de46df0f3..2e41ac6493 100644 --- a/src/MOLECULE/improper_umbrella.cpp +++ b/src/MOLECULE/improper_umbrella.cpp @@ -15,10 +15,10 @@ Contributing author: Tod A Pascal (Caltech) ------------------------------------------------------------------------- */ +#include "improper_umbrella.h" #include #include #include -#include "improper_umbrella.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/MOLECULE/pair_hbond_dreiding_lj.cpp b/src/MOLECULE/pair_hbond_dreiding_lj.cpp index ddc1110081..58666f27d1 100644 --- a/src/MOLECULE/pair_hbond_dreiding_lj.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_lj.cpp @@ -15,11 +15,11 @@ Contributing author: Tod A Pascal (Caltech) ------------------------------------------------------------------------- */ +#include "pair_hbond_dreiding_lj.h" #include #include #include #include -#include "pair_hbond_dreiding_lj.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/MOLECULE/pair_hbond_dreiding_morse.cpp b/src/MOLECULE/pair_hbond_dreiding_morse.cpp index 055f0ed46b..120a2d8d55 100644 --- a/src/MOLECULE/pair_hbond_dreiding_morse.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_morse.cpp @@ -15,11 +15,11 @@ Contributing author: Tod A Pascal (Caltech) ------------------------------------------------------------------------- */ +#include "pair_hbond_dreiding_morse.h" #include #include #include #include -#include "pair_hbond_dreiding_morse.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp index af4611e014..c9becb75c3 100644 --- a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp +++ b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp @@ -15,11 +15,11 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_charmm.h" #include #include #include #include -#include "pair_lj_charmm_coul_charmm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp b/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp index d68d5e8f6d..a2be2936b2 100644 --- a/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp +++ b/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_charmm_implicit.h" #include #include -#include "pair_lj_charmm_coul_charmm_implicit.h" #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index 0e1cbd85a5..f2f16c88ce 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -19,11 +19,11 @@ with additional assistance from Robert A. Latour, Clemson University ------------------------------------------------------------------------- */ +#include "pair_lj_charmmfsw_coul_charmmfsh.h" #include #include #include #include -#include "pair_lj_charmmfsw_coul_charmmfsh.h" #include "atom.h" #include "update.h" #include "comm.h" diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index 2b3d2c60f5..5bb82d7635 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -15,10 +15,10 @@ Contributing author: Pavel Elkind (Gothenburg University) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_tip4p_cut.h" #include #include #include -#include "pair_lj_cut_tip4p_cut.h" #include "atom.h" #include "force.h" #include "neighbor.h" diff --git a/src/MOLECULE/pair_tip4p_cut.cpp b/src/MOLECULE/pair_tip4p_cut.cpp index e6fb9aab99..1511c09384 100644 --- a/src/MOLECULE/pair_tip4p_cut.cpp +++ b/src/MOLECULE/pair_tip4p_cut.cpp @@ -15,9 +15,9 @@ Contributing author: Pavel Elkind (Gothenburg University) ------------------------------------------------------------------------- */ +#include "pair_tip4p_cut.h" #include #include -#include "pair_tip4p_cut.h" #include "atom.h" #include "force.h" #include "neighbor.h" diff --git a/src/MPIIO/dump_atom_mpiio.cpp b/src/MPIIO/dump_atom_mpiio.cpp index f2f2991442..cde5b6258b 100644 --- a/src/MPIIO/dump_atom_mpiio.cpp +++ b/src/MPIIO/dump_atom_mpiio.cpp @@ -15,8 +15,8 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ -#include #include "dump_atom_mpiio.h" +#include #include "domain.h" #include "atom.h" #include "update.h" diff --git a/src/MPIIO/dump_cfg_mpiio.cpp b/src/MPIIO/dump_cfg_mpiio.cpp index c580d2e7af..90f92d094d 100644 --- a/src/MPIIO/dump_cfg_mpiio.cpp +++ b/src/MPIIO/dump_cfg_mpiio.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "dump_cfg_mpiio.h" #include #include #include -#include "dump_cfg_mpiio.h" #include "atom.h" #include "domain.h" #include "comm.h" diff --git a/src/MPIIO/dump_custom_mpiio.cpp b/src/MPIIO/dump_custom_mpiio.cpp index 3650ca994e..5838c61124 100644 --- a/src/MPIIO/dump_custom_mpiio.cpp +++ b/src/MPIIO/dump_custom_mpiio.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "dump_custom_mpiio.h" #include #include #include -#include "dump_custom_mpiio.h" #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/MPIIO/dump_xyz_mpiio.cpp b/src/MPIIO/dump_xyz_mpiio.cpp index f15d340cd1..7b647561bf 100644 --- a/src/MPIIO/dump_xyz_mpiio.cpp +++ b/src/MPIIO/dump_xyz_mpiio.cpp @@ -15,10 +15,10 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "dump_xyz_mpiio.h" #include #include #include -#include "dump_xyz_mpiio.h" #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/MPIIO/restart_mpiio.cpp b/src/MPIIO/restart_mpiio.cpp index 804df211dc..e8ef5c6c4e 100644 --- a/src/MPIIO/restart_mpiio.cpp +++ b/src/MPIIO/restart_mpiio.cpp @@ -15,9 +15,9 @@ Contributing author: Paul Coffman (IBM) ------------------------------------------------------------------------- */ +#include "restart_mpiio.h" #include #include -#include "restart_mpiio.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/MSCG/fix_mscg.cpp b/src/MSCG/fix_mscg.cpp index b282595240..caa9a528a7 100644 --- a/src/MSCG/fix_mscg.cpp +++ b/src/MSCG/fix_mscg.cpp @@ -15,10 +15,10 @@ Contributing authors: Lauren Abbott (Sandia) ------------------------------------------------------------------------- */ +#include "fix_mscg.h" #include #include #include -#include "fix_mscg.h" #include "mscg.h" #include "atom.h" #include "comm.h" diff --git a/src/OPT/pair_eam_opt.cpp b/src/OPT/pair_eam_opt.cpp index fc2b6731ee..ad24aaee63 100644 --- a/src/OPT/pair_eam_opt.cpp +++ b/src/OPT/pair_eam_opt.cpp @@ -19,9 +19,9 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ +#include "pair_eam_opt.h" #include #include -#include "pair_eam_opt.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/OPT/pair_lj_charmm_coul_long_opt.cpp b/src/OPT/pair_lj_charmm_coul_long_opt.cpp index d80d3d1ec4..3dc6bdb6b4 100644 --- a/src/OPT/pair_lj_charmm_coul_long_opt.cpp +++ b/src/OPT/pair_lj_charmm_coul_long_opt.cpp @@ -18,9 +18,9 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_long_opt.h" #include #include -#include "pair_lj_charmm_coul_long_opt.h" #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/OPT/pair_lj_cut_coul_long_opt.cpp b/src/OPT/pair_lj_cut_coul_long_opt.cpp index a25010cf1f..a1f97aaae9 100644 --- a/src/OPT/pair_lj_cut_coul_long_opt.cpp +++ b/src/OPT/pair_lj_cut_coul_long_opt.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "pair_lj_cut_coul_long_opt.h" +#include #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/OPT/pair_lj_cut_opt.cpp b/src/OPT/pair_lj_cut_opt.cpp index c6684461be..3b3a19a9e8 100644 --- a/src/OPT/pair_lj_cut_opt.cpp +++ b/src/OPT/pair_lj_cut_opt.cpp @@ -18,8 +18,8 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ -#include #include "pair_lj_cut_opt.h" +#include #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/OPT/pair_lj_cut_tip4p_long_opt.cpp b/src/OPT/pair_lj_cut_tip4p_long_opt.cpp index 92facca43e..f8181d69a6 100644 --- a/src/OPT/pair_lj_cut_tip4p_long_opt.cpp +++ b/src/OPT/pair_lj_cut_tip4p_long_opt.cpp @@ -15,8 +15,8 @@ OPT version: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_lj_cut_tip4p_long_opt.h" +#include #include "atom.h" #include "domain.h" #include "force.h" diff --git a/src/OPT/pair_lj_long_coul_long_opt.cpp b/src/OPT/pair_lj_long_coul_long_opt.cpp index 03853057f4..c323d078c4 100644 --- a/src/OPT/pair_lj_long_coul_long_opt.cpp +++ b/src/OPT/pair_lj_long_coul_long_opt.cpp @@ -15,9 +15,9 @@ OPT version: Wayne Mitchell (Loyola University New Orleans) ------------------------------------------------------------------------- */ +#include "pair_lj_long_coul_long_opt.h" #include #include -#include "pair_lj_long_coul_long_opt.h" #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/OPT/pair_morse_opt.cpp b/src/OPT/pair_morse_opt.cpp index c9c6bba355..1d2e226777 100644 --- a/src/OPT/pair_morse_opt.cpp +++ b/src/OPT/pair_morse_opt.cpp @@ -18,9 +18,9 @@ Vincent Natoli, Stone Ridge Technology ------------------------------------------------------------------------- */ +#include "pair_morse_opt.h" #include #include -#include "pair_morse_opt.h" #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/OPT/pair_ufm_opt.cpp b/src/OPT/pair_ufm_opt.cpp index f463dac3f1..eabb093b18 100644 --- a/src/OPT/pair_ufm_opt.cpp +++ b/src/OPT/pair_ufm_opt.cpp @@ -17,9 +17,9 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ +#include "pair_ufm_opt.h" #include #include -#include "pair_ufm_opt.h" #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index d78fe27c94..f677b24eb2 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -15,10 +15,10 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ +#include "atom_vec_peri.h" #include #include #include -#include "atom_vec_peri.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/PERI/compute_damage_atom.cpp b/src/PERI/compute_damage_atom.cpp index 4bf8fa17a5..f5a532cd0b 100644 --- a/src/PERI/compute_damage_atom.cpp +++ b/src/PERI/compute_damage_atom.cpp @@ -15,8 +15,8 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ -#include #include "compute_damage_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/PERI/compute_dilatation_atom.cpp b/src/PERI/compute_dilatation_atom.cpp index 990731a227..7a6607d65c 100644 --- a/src/PERI/compute_dilatation_atom.cpp +++ b/src/PERI/compute_dilatation_atom.cpp @@ -15,8 +15,8 @@ Contributing author: Rezwanur Rahman, John Foster (UTSA) ------------------------------------------------------------------------- */ -#include #include "compute_dilatation_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/PERI/compute_plasticity_atom.cpp b/src/PERI/compute_plasticity_atom.cpp index d08fb98e07..0b20bc5075 100644 --- a/src/PERI/compute_plasticity_atom.cpp +++ b/src/PERI/compute_plasticity_atom.cpp @@ -15,8 +15,8 @@ Contributing author: Rezwanur Rahman, John Foster (UTSA) ------------------------------------------------------------------------- */ -#include #include "compute_plasticity_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/PERI/fix_peri_neigh.cpp b/src/PERI/fix_peri_neigh.cpp index 66137e6a01..297936577f 100644 --- a/src/PERI/fix_peri_neigh.cpp +++ b/src/PERI/fix_peri_neigh.cpp @@ -15,8 +15,8 @@ Contributing authors: Mike Parks (SNL), Ezwanur Rahman, J.T. Foster (UTSA) ------------------------------------------------------------------------- */ -#include #include "fix_peri_neigh.h" +#include #include "pair_peri_pmb.h" #include "pair_peri_lps.h" #include "pair_peri_ves.h" diff --git a/src/PERI/pair_peri_eps.cpp b/src/PERI/pair_peri_eps.cpp index c00495ba4d..07314081da 100644 --- a/src/PERI/pair_peri_eps.cpp +++ b/src/PERI/pair_peri_eps.cpp @@ -15,10 +15,10 @@ Contributing author: Rezwanur Rahman, John Foster (UTSA) ------------------------------------------------------------------------- */ +#include "pair_peri_eps.h" #include #include #include -#include "pair_peri_eps.h" #include "atom.h" #include "domain.h" #include "lattice.h" diff --git a/src/PERI/pair_peri_lps.cpp b/src/PERI/pair_peri_lps.cpp index f0418c8c8d..660209f3f5 100644 --- a/src/PERI/pair_peri_lps.cpp +++ b/src/PERI/pair_peri_lps.cpp @@ -15,10 +15,10 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ +#include "pair_peri_lps.h" #include #include #include -#include "pair_peri_lps.h" #include "atom.h" #include "domain.h" #include "lattice.h" diff --git a/src/PERI/pair_peri_pmb.cpp b/src/PERI/pair_peri_pmb.cpp index ad2f3fb7c7..fa53efc344 100644 --- a/src/PERI/pair_peri_pmb.cpp +++ b/src/PERI/pair_peri_pmb.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ +#include "pair_peri_pmb.h" #include #include #include #include -#include "pair_peri_pmb.h" #include "atom.h" #include "domain.h" #include "lattice.h" diff --git a/src/PERI/pair_peri_ves.cpp b/src/PERI/pair_peri_ves.cpp index 24a9f92a97..1687bed35d 100644 --- a/src/PERI/pair_peri_ves.cpp +++ b/src/PERI/pair_peri_ves.cpp @@ -15,10 +15,10 @@ Contributing authors: Rezwanur Rahman, J.T. Foster (UTSA) ------------------------------------------------------------------------- */ +#include "pair_peri_ves.h" #include #include #include -#include "pair_peri_ves.h" #include "atom.h" #include "domain.h" #include "lattice.h" diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 41cfcede34..6d943a79db 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -17,13 +17,13 @@ Kurt Anderson (anderk5@rpi.edu) ------------------------------------------------------------------------- */ +#include "fix_poems.h" #include #include #include #include #include #include "workspace.h" -#include "fix_poems.h" #include "atom.h" #include "domain.h" #include "update.h" diff --git a/src/PYTHON/fix_python_invoke.cpp b/src/PYTHON/fix_python_invoke.cpp index 7fa9861c3f..57ea2e9148 100644 --- a/src/PYTHON/fix_python_invoke.cpp +++ b/src/PYTHON/fix_python_invoke.cpp @@ -15,9 +15,9 @@ Contributing author: Richard Berger (Temple U) ------------------------------------------------------------------------- */ +#include "fix_python_invoke.h" #include // IWYU pragma: keep #include -#include "fix_python_invoke.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/PYTHON/fix_python_move.cpp b/src/PYTHON/fix_python_move.cpp index b253df6828..be63b851a2 100644 --- a/src/PYTHON/fix_python_move.cpp +++ b/src/PYTHON/fix_python_move.cpp @@ -15,9 +15,9 @@ Contributing author: Richard Berger (Temple U) ------------------------------------------------------------------------- */ +#include "fix_python_move.h" #include // IWYU pragma: keep #include -#include "fix_python_move.h" #include "lmppython.h" #include "error.h" #include "python_compat.h" diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 5b8f23400b..0d79a31946 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -15,10 +15,10 @@ Contributing authors: Axel Kohlmeyer and Richard Berger (Temple U) ------------------------------------------------------------------------- */ +#include "pair_python.h" #include // IWYU pragma: keep #include #include -#include "pair_python.h" #include "atom.h" #include "force.h" #include "memory.h" diff --git a/src/PYTHON/python_impl.cpp b/src/PYTHON/python_impl.cpp index 7456021675..1188942e75 100644 --- a/src/PYTHON/python_impl.cpp +++ b/src/PYTHON/python_impl.cpp @@ -15,10 +15,10 @@ Contributing author: Richard Berger and Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "python_impl.h" #include #include #include // IWYU pragma: keep -#include "python_impl.h" #include "force.h" #include "input.h" #include "variable.h" diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 0ab010b7bb..2e0b7edbe5 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -16,11 +16,11 @@ Based on fix qeq/reax by H. Metin Aktulga ------------------------------------------------------------------------- */ +#include "fix_qeq.h" #include #include #include #include -#include "fix_qeq.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/QEQ/fix_qeq_dynamic.cpp b/src/QEQ/fix_qeq_dynamic.cpp index ba88f4f1c3..fb5fd2ddac 100644 --- a/src/QEQ/fix_qeq_dynamic.cpp +++ b/src/QEQ/fix_qeq_dynamic.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include "fix_qeq_dynamic.h" #include #include #include #include -#include "fix_qeq_dynamic.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index 1e3686f99c..561a82b714 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include "fix_qeq_fire.h" #include #include #include #include -#include "fix_qeq_fire.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/QEQ/fix_qeq_point.cpp b/src/QEQ/fix_qeq_point.cpp index 9517343974..bb3ce835fc 100644 --- a/src/QEQ/fix_qeq_point.cpp +++ b/src/QEQ/fix_qeq_point.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include "fix_qeq_point.h" #include #include #include #include -#include "fix_qeq_point.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/QEQ/fix_qeq_shielded.cpp b/src/QEQ/fix_qeq_shielded.cpp index a74eee7d29..60ff62ca07 100644 --- a/src/QEQ/fix_qeq_shielded.cpp +++ b/src/QEQ/fix_qeq_shielded.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include "fix_qeq_shielded.h" #include #include #include #include -#include "fix_qeq_shielded.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/QEQ/fix_qeq_slater.cpp b/src/QEQ/fix_qeq_slater.cpp index 3443a519a2..95105b5ef2 100644 --- a/src/QEQ/fix_qeq_slater.cpp +++ b/src/QEQ/fix_qeq_slater.cpp @@ -15,11 +15,11 @@ Contributing author: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include "fix_qeq_slater.h" #include #include #include #include -#include "fix_qeq_slater.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index df14221586..4c8d022d70 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -15,11 +15,11 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "compute_event_displace.h" #include #include #include #include -#include "compute_event_displace.h" #include "atom.h" #include "domain.h" #include "modify.h" diff --git a/src/REPLICA/fix_event.cpp b/src/REPLICA/fix_event.cpp index 8fc5de6b16..8cf1acba94 100644 --- a/src/REPLICA/fix_event.cpp +++ b/src/REPLICA/fix_event.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL), Aidan Thompson (SNL) ------------------------------------------------------------------------- */ +#include "fix_event.h" #include #include -#include "fix_event.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/REPLICA/fix_event_hyper.cpp b/src/REPLICA/fix_event_hyper.cpp index eae1ad021d..3dd1a03eb9 100644 --- a/src/REPLICA/fix_event_hyper.cpp +++ b/src/REPLICA/fix_event_hyper.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_event_hyper.h" #include #include -#include "fix_event_hyper.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/REPLICA/fix_event_prd.cpp b/src/REPLICA/fix_event_prd.cpp index a311a6444a..63c9c2718b 100644 --- a/src/REPLICA/fix_event_prd.cpp +++ b/src/REPLICA/fix_event_prd.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "fix_event_prd.h" #include #include -#include "fix_event_prd.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/REPLICA/fix_event_tad.cpp b/src/REPLICA/fix_event_tad.cpp index 0916fdf493..b92bc1fd73 100644 --- a/src/REPLICA/fix_event_tad.cpp +++ b/src/REPLICA/fix_event_tad.cpp @@ -15,9 +15,9 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ +#include "fix_event_tad.h" #include #include -#include "fix_event_tad.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/REPLICA/fix_hyper.cpp b/src/REPLICA/fix_hyper.cpp index c86c00ad45..21a4fde04d 100644 --- a/src/REPLICA/fix_hyper.cpp +++ b/src/REPLICA/fix_hyper.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "fix_hyper.h" +#include using namespace LAMMPS_NS; diff --git a/src/REPLICA/fix_hyper_global.cpp b/src/REPLICA/fix_hyper_global.cpp index 0c76b29911..a58798a63e 100644 --- a/src/REPLICA/fix_hyper_global.cpp +++ b/src/REPLICA/fix_hyper_global.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_hyper_global.h" #include #include #include #include -#include "fix_hyper_global.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/REPLICA/fix_hyper_local.cpp b/src/REPLICA/fix_hyper_local.cpp index a6db4419f0..555c5234f6 100644 --- a/src/REPLICA/fix_hyper_local.cpp +++ b/src/REPLICA/fix_hyper_local.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_hyper_local.h" #include #include #include #include -#include "fix_hyper_local.h" #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index e1b1e46a53..2803c37b23 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -16,11 +16,11 @@ new options for inter-replica forces, first/last replica treatment ------------------------------------------------------------------------- */ +#include "fix_neb.h" #include #include #include #include -#include "fix_neb.h" #include "universe.h" #include "update.h" #include "atom.h" diff --git a/src/REPLICA/hyper.cpp b/src/REPLICA/hyper.cpp index 00b91684e9..c400ae097d 100644 --- a/src/REPLICA/hyper.cpp +++ b/src/REPLICA/hyper.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "hyper.h" #include #include #include -#include "hyper.h" #include "update.h" #include "atom.h" #include "domain.h" diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index 6b68c52dbb..b670f3d8f1 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -15,12 +15,12 @@ // due to OpenMPI bug which sets INT64_MAX via its mpi.h // before lmptype.h can set flags to insure it is done correctly +#include "neb.h" #include "lmptype.h" #include #include #include #include -#include "neb.h" #include "universe.h" #include "atom.h" #include "update.h" diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp index 6d450f48e3..19a12ddbbb 100644 --- a/src/REPLICA/prd.cpp +++ b/src/REPLICA/prd.cpp @@ -19,12 +19,12 @@ // due to OpenMPI bug which sets INT64_MAX via its mpi.h // before lmptype.h can set flags to insure it is done correctly +#include "prd.h" #include "lmptype.h" #include #include #include #include -#include "prd.h" #include "universe.h" #include "update.h" #include "atom.h" diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index da42ba6fae..90667b8865 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -19,12 +19,12 @@ // due to OpenMPI bug which sets INT64_MAX via its mpi.h // before lmptype.h can set flags to insure it is done correctly +#include "tad.h" #include "lmptype.h" #include #include #include #include -#include "tad.h" #include "universe.h" #include "update.h" #include "atom.h" diff --git a/src/REPLICA/temper.cpp b/src/REPLICA/temper.cpp index fe3e3fb993..6eb50c8d9f 100644 --- a/src/REPLICA/temper.cpp +++ b/src/REPLICA/temper.cpp @@ -15,10 +15,10 @@ Contributing author: Mark Sears (SNL) ------------------------------------------------------------------------- */ +#include "temper.h" #include #include #include -#include "temper.h" #include "universe.h" #include "domain.h" #include "atom.h" diff --git a/src/REPLICA/verlet_split.cpp b/src/REPLICA/verlet_split.cpp index 7042fc6993..f268afe7f8 100644 --- a/src/REPLICA/verlet_split.cpp +++ b/src/REPLICA/verlet_split.cpp @@ -15,8 +15,8 @@ Contributing authors: Yuxing Peng and Chris Knight (U Chicago) ------------------------------------------------------------------------- */ -#include #include "verlet_split.h" +#include #include "universe.h" #include "neighbor.h" #include "domain.h" diff --git a/src/RIGID/compute_erotate_rigid.cpp b/src/RIGID/compute_erotate_rigid.cpp index a3ddffd9ab..1a7236e263 100644 --- a/src/RIGID/compute_erotate_rigid.cpp +++ b/src/RIGID/compute_erotate_rigid.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_erotate_rigid.h" #include #include -#include "compute_erotate_rigid.h" #include "update.h" #include "force.h" #include "modify.h" diff --git a/src/RIGID/compute_ke_rigid.cpp b/src/RIGID/compute_ke_rigid.cpp index 4de13532b2..66b7a92566 100644 --- a/src/RIGID/compute_ke_rigid.cpp +++ b/src/RIGID/compute_ke_rigid.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_ke_rigid.h" #include #include -#include "compute_ke_rigid.h" #include "update.h" #include "force.h" #include "modify.h" diff --git a/src/RIGID/compute_rigid_local.cpp b/src/RIGID/compute_rigid_local.cpp index ec2799b6bc..75334bb759 100644 --- a/src/RIGID/compute_rigid_local.cpp +++ b/src/RIGID/compute_rigid_local.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_rigid_local.h" #include #include -#include "compute_rigid_local.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/RIGID/fix_ehex.cpp b/src/RIGID/fix_ehex.cpp index 0bbdea51c6..a5efc22d11 100644 --- a/src/RIGID/fix_ehex.cpp +++ b/src/RIGID/fix_ehex.cpp @@ -22,10 +22,10 @@ which implements the heat exchange (HEX) algorithm. ------------------------------------------------------------------------- */ +#include "fix_ehex.h" #include #include #include -#include "fix_ehex.h" #include "atom.h" #include "domain.h" #include "region.h" diff --git a/src/RIGID/fix_rattle.cpp b/src/RIGID/fix_rattle.cpp index db43b9e82d..93bf610e94 100644 --- a/src/RIGID/fix_rattle.cpp +++ b/src/RIGID/fix_rattle.cpp @@ -15,10 +15,10 @@ Contributing author: Peter Wirnsberger (University of Cambridge) ------------------------------------------------------------------------- */ +#include "fix_rattle.h" #include #include #include -#include "fix_rattle.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index 19eb22a7fa..912f529403 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_rigid.h" #include #include #include #include -#include "fix_rigid.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 2e1090ec88..4738e253f6 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -17,9 +17,9 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ +#include "fix_rigid_nh.h" #include #include -#include "fix_rigid_nh.h" #include "math_extra.h" #include "atom.h" #include "compute.h" diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index 8de588bd9b..1545e913c0 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -17,10 +17,10 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ +#include "fix_rigid_nh_small.h" #include #include #include -#include "fix_rigid_nh_small.h" #include "math_extra.h" #include "atom.h" #include "compute.h" diff --git a/src/RIGID/fix_rigid_nph.cpp b/src/RIGID/fix_rigid_nph.cpp index 6080fb05af..706e08ec12 100644 --- a/src/RIGID/fix_rigid_nph.cpp +++ b/src/RIGID/fix_rigid_nph.cpp @@ -17,8 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include "fix_rigid_nph.h" +#include #include "modify.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_nph_small.cpp b/src/RIGID/fix_rigid_nph_small.cpp index 9b045eaf13..32ac58220d 100644 --- a/src/RIGID/fix_rigid_nph_small.cpp +++ b/src/RIGID/fix_rigid_nph_small.cpp @@ -17,8 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include "fix_rigid_nph_small.h" +#include #include "modify.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_npt.cpp b/src/RIGID/fix_rigid_npt.cpp index 526fc8f614..1f19fb4ec7 100644 --- a/src/RIGID/fix_rigid_npt.cpp +++ b/src/RIGID/fix_rigid_npt.cpp @@ -17,8 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include "fix_rigid_npt.h" +#include #include "modify.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_npt_small.cpp b/src/RIGID/fix_rigid_npt_small.cpp index fff338d687..e8924be79f 100644 --- a/src/RIGID/fix_rigid_npt_small.cpp +++ b/src/RIGID/fix_rigid_npt_small.cpp @@ -17,8 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include "fix_rigid_npt_small.h" +#include #include "modify.h" #include "error.h" diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 8c2feb6436..14e230ab9c 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -11,12 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_rigid_small.h" #include #include #include #include #include -#include "fix_rigid_small.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 5c202706af..48a08118c5 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_shake.h" #include #include #include #include -#include "fix_shake.h" #include "atom.h" #include "atom_vec.h" #include "molecule.h" diff --git a/src/SHOCK/fix_append_atoms.cpp b/src/SHOCK/fix_append_atoms.cpp index 5e81b75c0d..5e85b39076 100644 --- a/src/SHOCK/fix_append_atoms.cpp +++ b/src/SHOCK/fix_append_atoms.cpp @@ -11,10 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_append_atoms.h" #include #include #include -#include "fix_append_atoms.h" #include "atom.h" #include "atom_vec.h" #include "comm.h" diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 15ee4d370f..2e9f751824 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -17,10 +17,10 @@ see Reed, Fried, Joannopoulos, Phys Rev Lett, 90, 235503 (2003) ------------------------------------------------------------------------- */ +#include "fix_msst.h" #include #include #include -#include "fix_msst.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/SHOCK/fix_nphug.cpp b/src/SHOCK/fix_nphug.cpp index 5d5a1642c0..8ad787d759 100644 --- a/src/SHOCK/fix_nphug.cpp +++ b/src/SHOCK/fix_nphug.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_nphug.h" #include #include -#include "fix_nphug.h" #include "modify.h" #include "error.h" #include "update.h" diff --git a/src/SHOCK/fix_wall_piston.cpp b/src/SHOCK/fix_wall_piston.cpp index 31f70b4174..5a359d9f6f 100644 --- a/src/SHOCK/fix_wall_piston.cpp +++ b/src/SHOCK/fix_wall_piston.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_wall_piston.h" #include #include -#include "fix_wall_piston.h" #include "atom.h" #include "domain.h" #include "lattice.h" diff --git a/src/SNAP/compute_sna_atom.cpp b/src/SNAP/compute_sna_atom.cpp index cc7a84281e..7ca9d52467 100644 --- a/src/SNAP/compute_sna_atom.cpp +++ b/src/SNAP/compute_sna_atom.cpp @@ -10,10 +10,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "sna.h" + +#include "compute_sna_atom.h" #include #include -#include "compute_sna_atom.h" +#include "sna.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/SNAP/compute_snad_atom.cpp b/src/SNAP/compute_snad_atom.cpp index 37587a0aae..7e71e4a556 100644 --- a/src/SNAP/compute_snad_atom.cpp +++ b/src/SNAP/compute_snad_atom.cpp @@ -10,10 +10,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include "sna.h" + +#include "compute_snad_atom.h" #include #include -#include "compute_snad_atom.h" +#include "sna.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/SNAP/compute_snav_atom.cpp b/src/SNAP/compute_snav_atom.cpp index 5faf7a1872..28c018b1cc 100644 --- a/src/SNAP/compute_snav_atom.cpp +++ b/src/SNAP/compute_snav_atom.cpp @@ -10,9 +10,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ + +#include "compute_snav_atom.h" #include #include -#include "compute_snav_atom.h" #include "sna.h" #include "atom.h" #include "update.h" diff --git a/src/SNAP/pair_snap.cpp b/src/SNAP/pair_snap.cpp index f0f3ef72c6..56f59c7fcc 100644 --- a/src/SNAP/pair_snap.cpp +++ b/src/SNAP/pair_snap.cpp @@ -11,11 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_snap.h" #include #include #include #include -#include "pair_snap.h" #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/SNAP/sna.cpp b/src/SNAP/sna.cpp index d7d9b5163d..9194e44c21 100644 --- a/src/SNAP/sna.cpp +++ b/src/SNAP/sna.cpp @@ -15,8 +15,8 @@ Contributing authors: Aidan Thompson, Christian Trott, SNL ------------------------------------------------------------------------- */ -#include #include "sna.h" +#include #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index 37d6fb1e59..5810ecf85b 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -23,11 +23,11 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "atom_vec_spin.h" #include #include #include #include "atom.h" -#include "atom_vec_spin.h" #include "comm.h" #include "domain.h" #include "error.h" diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index ec11bc68f2..8dad128994 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -21,9 +21,9 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "compute_spin.h" #include #include -#include "compute_spin.h" #include "atom.h" #include "error.h" #include "force.h" diff --git a/src/SPIN/fix_langevin_spin.cpp b/src/SPIN/fix_langevin_spin.cpp index 6936c701c6..ec9c98c4f8 100644 --- a/src/SPIN/fix_langevin_spin.cpp +++ b/src/SPIN/fix_langevin_spin.cpp @@ -21,9 +21,9 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "fix_langevin_spin.h" #include #include -#include "fix_langevin_spin.h" #include "comm.h" #include "error.h" #include "force.h" diff --git a/src/SPIN/fix_neb_spin.cpp b/src/SPIN/fix_neb_spin.cpp index 7ed8967a24..5acbbf59e8 100644 --- a/src/SPIN/fix_neb_spin.cpp +++ b/src/SPIN/fix_neb_spin.cpp @@ -21,10 +21,10 @@ Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ +#include "fix_neb_spin.h" #include #include #include -#include "fix_neb_spin.h" #include "universe.h" #include "update.h" #include "atom.h" diff --git a/src/SPIN/fix_nve_spin.cpp b/src/SPIN/fix_nve_spin.cpp index d35585c7a6..1165048723 100644 --- a/src/SPIN/fix_nve_spin.cpp +++ b/src/SPIN/fix_nve_spin.cpp @@ -21,8 +21,8 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include #include "fix_nve_spin.h" +#include #include "atom.h" #include "citeme.h" #include "comm.h" diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 7764bb0438..3296b28228 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -21,10 +21,10 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "fix_precession_spin.h" #include #include #include -#include "fix_precession_spin.h" #include "atom.h" #include "error.h" #include "force.h" diff --git a/src/SPIN/fix_setforce_spin.cpp b/src/SPIN/fix_setforce_spin.cpp index 1ab35c9663..15e5aacfb6 100644 --- a/src/SPIN/fix_setforce_spin.cpp +++ b/src/SPIN/fix_setforce_spin.cpp @@ -21,8 +21,8 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include #include "fix_setforce_spin.h" +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/SPIN/min_spin.cpp b/src/SPIN/min_spin.cpp index 3a330f448a..2514645325 100644 --- a/src/SPIN/min_spin.cpp +++ b/src/SPIN/min_spin.cpp @@ -17,10 +17,10 @@ Please cite the related publication: ------------------------------------------------------------------------- */ +#include "min_spin.h" #include #include #include -#include "min_spin.h" #include "universe.h" #include "atom.h" #include "force.h" diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 400ce3d363..2bcfe6573a 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -21,11 +21,11 @@ Computer Physics Communications, 196, 335-347. ------------------------------------------------------------------------- */ +#include "neb_spin.h" #include #include #include #include -#include "neb_spin.h" #include "citeme.h" #include "force.h" #include "universe.h" diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index 93d9a1e127..fef247c09b 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -21,8 +21,8 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ -#include #include "pair_spin.h" +#include #include "atom.h" #include "error.h" #include "fix.h" diff --git a/src/SPIN/pair_spin_dipole_cut.cpp b/src/SPIN/pair_spin_dipole_cut.cpp index 8d9b5b8f2b..fb0ec8bb20 100644 --- a/src/SPIN/pair_spin_dipole_cut.cpp +++ b/src/SPIN/pair_spin_dipole_cut.cpp @@ -21,10 +21,10 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "pair_spin_dipole_cut.h" #include #include #include -#include "pair_spin_dipole_cut.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/SPIN/pair_spin_dipole_long.cpp b/src/SPIN/pair_spin_dipole_long.cpp index 84c55a8c3c..670fccfce2 100644 --- a/src/SPIN/pair_spin_dipole_long.cpp +++ b/src/SPIN/pair_spin_dipole_long.cpp @@ -16,10 +16,10 @@ Stan Moore (SNL) ------------------------------------------------------------------------- */ +#include "pair_spin_dipole_long.h" #include #include #include -#include "pair_spin_dipole_long.h" #include "atom.h" #include "comm.h" #include "neighbor.h" diff --git a/src/SPIN/pair_spin_dmi.cpp b/src/SPIN/pair_spin_dmi.cpp index 651f4397bd..afd2deaa6a 100644 --- a/src/SPIN/pair_spin_dmi.cpp +++ b/src/SPIN/pair_spin_dmi.cpp @@ -21,10 +21,10 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "pair_spin_dmi.h" #include #include #include -#include "pair_spin_dmi.h" #include "atom.h" #include "comm.h" #include "error.h" diff --git a/src/SPIN/pair_spin_exchange.cpp b/src/SPIN/pair_spin_exchange.cpp index 059a8f5f34..cc28018ad0 100644 --- a/src/SPIN/pair_spin_exchange.cpp +++ b/src/SPIN/pair_spin_exchange.cpp @@ -21,10 +21,10 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "pair_spin_exchange.h" #include #include #include -#include "pair_spin_exchange.h" #include "atom.h" #include "comm.h" #include "error.h" diff --git a/src/SPIN/pair_spin_magelec.cpp b/src/SPIN/pair_spin_magelec.cpp index 55b96582c8..6756ebc3cc 100644 --- a/src/SPIN/pair_spin_magelec.cpp +++ b/src/SPIN/pair_spin_magelec.cpp @@ -21,10 +21,10 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "pair_spin_magelec.h" #include #include #include -#include "pair_spin_magelec.h" #include "atom.h" #include "comm.h" #include "error.h" diff --git a/src/SPIN/pair_spin_neel.cpp b/src/SPIN/pair_spin_neel.cpp index 4d68dbdc22..355ba20f39 100644 --- a/src/SPIN/pair_spin_neel.cpp +++ b/src/SPIN/pair_spin_neel.cpp @@ -21,10 +21,10 @@ and molecular dynamics. Journal of Computational Physics. ------------------------------------------------------------------------- */ +#include "pair_spin_neel.h" #include #include #include -#include "pair_spin_neel.h" #include "atom.h" #include "comm.h" #include "error.h" diff --git a/src/SRD/fix_srd.cpp b/src/SRD/fix_srd.cpp index a20ec212fd..d5eec91f50 100644 --- a/src/SRD/fix_srd.cpp +++ b/src/SRD/fix_srd.cpp @@ -15,10 +15,10 @@ Contributing authors: Jeremy Lechman (SNL), Pieter in 't Veld (BASF) ------------------------------------------------------------------------- */ +#include "fix_srd.h" #include #include #include -#include "fix_srd.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/SRD/fix_wall_srd.cpp b/src/SRD/fix_wall_srd.cpp index cb0f023640..ab113df28a 100644 --- a/src/SRD/fix_wall_srd.cpp +++ b/src/SRD/fix_wall_srd.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_wall_srd.h" #include #include -#include "fix_wall_srd.h" #include "fix.h" #include "domain.h" #include "lattice.h" diff --git a/src/USER-ADIOS/dump_atom_adios.cpp b/src/USER-ADIOS/dump_atom_adios.cpp index 55d6c5fbf9..e711b8a583 100644 --- a/src/USER-ADIOS/dump_atom_adios.cpp +++ b/src/USER-ADIOS/dump_atom_adios.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "dump_atom_adios.h" +#include #include "atom.h" #include "domain.h" #include "error.h" @@ -23,7 +24,6 @@ #include "memory.h" #include "universe.h" #include "update.h" -#include #include "adios2.h" diff --git a/src/USER-ADIOS/dump_custom_adios.cpp b/src/USER-ADIOS/dump_custom_adios.cpp index 67f3deeb64..ee6d7d7e49 100644 --- a/src/USER-ADIOS/dump_custom_adios.cpp +++ b/src/USER-ADIOS/dump_custom_adios.cpp @@ -16,6 +16,8 @@ ------------------------------------------------------------------------- */ #include "dump_custom_adios.h" +#include +#include #include "atom.h" #include "compute.h" #include "domain.h" @@ -30,8 +32,6 @@ #include "universe.h" #include "update.h" #include "variable.h" -#include -#include #include "adios2.h" diff --git a/src/USER-ATC/fix_atc.cpp b/src/USER-ATC/fix_atc.cpp index f53343ced1..e2a1768f55 100644 --- a/src/USER-ATC/fix_atc.cpp +++ b/src/USER-ATC/fix_atc.cpp @@ -11,8 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -// LAMMPS #include "fix_atc.h" +#include +#include +#include #include "fix_nve.h" #include "atom.h" #include "force.h" @@ -24,7 +26,7 @@ #include "pointers.h" #include "comm.h" #include "group.h" -// ATC + #include "ATC_Method.h" #include "ATC_Transfer.h" #include "ATC_TransferKernel.h" @@ -34,10 +36,6 @@ #include "ATC_CouplingMass.h" #include "ATC_CouplingMomentumEnergy.h" #include "LammpsInterface.h" -// other -#include -#include -#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index 7556dd2c8e..bc70c0dbc2 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -15,10 +15,10 @@ Contributing author: Ilya Valuev (JIHT, Moscow, Russia) ------------------------------------------------------------------------- */ +#include "atom_vec_wavepacket.h" #include #include #include -#include "atom_vec_wavepacket.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-AWPMD/fix_nve_awpmd.cpp b/src/USER-AWPMD/fix_nve_awpmd.cpp index 7722c93121..57ad17f3e6 100644 --- a/src/USER-AWPMD/fix_nve_awpmd.cpp +++ b/src/USER-AWPMD/fix_nve_awpmd.cpp @@ -15,10 +15,10 @@ Contributing author: Ilya Valuev (JIHT, Moscow, Russia) ------------------------------------------------------------------------- */ +#include "fix_nve_awpmd.h" #include #include #include -#include "fix_nve_awpmd.h" #include "atom.h" #include "force.h" #include "update.h" diff --git a/src/USER-AWPMD/pair_awpmd_cut.cpp b/src/USER-AWPMD/pair_awpmd_cut.cpp index 1b7bf35c28..ae2fbc59fa 100644 --- a/src/USER-AWPMD/pair_awpmd_cut.cpp +++ b/src/USER-AWPMD/pair_awpmd_cut.cpp @@ -15,11 +15,11 @@ Contributing author: Ilya Valuev (JIHT, Moscow, Russia) ------------------------------------------------------------------------- */ +#include "pair_awpmd_cut.h" #include #include #include #include -#include "pair_awpmd_cut.h" #include "atom.h" #include "update.h" #include "min.h" diff --git a/src/USER-BOCS/compute_pressure_bocs.cpp b/src/USER-BOCS/compute_pressure_bocs.cpp index fc24efab4c..33163f7aff 100644 --- a/src/USER-BOCS/compute_pressure_bocs.cpp +++ b/src/USER-BOCS/compute_pressure_bocs.cpp @@ -14,10 +14,10 @@ from The Pennsylvania State University ------------------------------------------------------------------------- */ +#include "compute_pressure_bocs.h" #include #include #include -#include "compute_pressure_bocs.h" #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/USER-BOCS/fix_bocs.cpp b/src/USER-BOCS/fix_bocs.cpp index 7bdb8933e3..e0952086dd 100644 --- a/src/USER-BOCS/fix_bocs.cpp +++ b/src/USER-BOCS/fix_bocs.cpp @@ -14,10 +14,10 @@ from The Pennsylvania State University ------------------------------------------------------------------------- */ +#include "fix_bocs.h" #include #include #include -#include "fix_bocs.h" #include "math_extra.h" #include "atom.h" #include "force.h" diff --git a/src/USER-CGDNA/bond_oxdna2_fene.cpp b/src/USER-CGDNA/bond_oxdna2_fene.cpp index 39cbb04f88..2cd7883600 100644 --- a/src/USER-CGDNA/bond_oxdna2_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna2_fene.cpp @@ -14,9 +14,9 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "bond_oxdna2_fene.h" #include #include -#include "bond_oxdna2_fene.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/bond_oxdna_fene.cpp b/src/USER-CGDNA/bond_oxdna_fene.cpp index 8271668e3f..8b94fd6a5a 100644 --- a/src/USER-CGDNA/bond_oxdna_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna_fene.cpp @@ -14,9 +14,9 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "bond_oxdna_fene.h" #include #include -#include "bond_oxdna_fene.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-CGDNA/fix_nve_dot.cpp b/src/USER-CGDNA/fix_nve_dot.cpp index 72b3388793..3bf6757df7 100644 --- a/src/USER-CGDNA/fix_nve_dot.cpp +++ b/src/USER-CGDNA/fix_nve_dot.cpp @@ -14,10 +14,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "fix_nve_dot.h" #include #include #include -#include "fix_nve_dot.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/USER-CGDNA/fix_nve_dotc_langevin.cpp b/src/USER-CGDNA/fix_nve_dotc_langevin.cpp index c73801c97a..61e3552f11 100644 --- a/src/USER-CGDNA/fix_nve_dotc_langevin.cpp +++ b/src/USER-CGDNA/fix_nve_dotc_langevin.cpp @@ -15,10 +15,10 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "fix_nve_dotc_langevin.h" #include #include #include -#include "fix_nve_dotc_langevin.h" #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" diff --git a/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp b/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp index dfea97f0bf..1d0a2eb494 100644 --- a/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp +++ b/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna2_coaxstk.h" #include #include #include #include -#include "pair_oxdna2_coaxstk.h" #include "mf_oxdna.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGDNA/pair_oxdna2_dh.cpp b/src/USER-CGDNA/pair_oxdna2_dh.cpp index b4afad12db..22fc79dae4 100644 --- a/src/USER-CGDNA/pair_oxdna2_dh.cpp +++ b/src/USER-CGDNA/pair_oxdna2_dh.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna2_dh.h" #include #include #include #include -#include "pair_oxdna2_dh.h" #include "mf_oxdna.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGDNA/pair_oxdna2_excv.cpp b/src/USER-CGDNA/pair_oxdna2_excv.cpp index 4329fbe071..de4f8319b9 100644 --- a/src/USER-CGDNA/pair_oxdna2_excv.cpp +++ b/src/USER-CGDNA/pair_oxdna2_excv.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna2_excv.h" #include #include #include #include -#include "pair_oxdna2_excv.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/pair_oxdna2_stk.cpp b/src/USER-CGDNA/pair_oxdna2_stk.cpp index f479572aa6..3b9480bff6 100644 --- a/src/USER-CGDNA/pair_oxdna2_stk.cpp +++ b/src/USER-CGDNA/pair_oxdna2_stk.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna2_stk.h" #include #include #include #include -#include "pair_oxdna2_stk.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/pair_oxdna_coaxstk.cpp b/src/USER-CGDNA/pair_oxdna_coaxstk.cpp index 6f3fa4fa4e..7310f60ec3 100644 --- a/src/USER-CGDNA/pair_oxdna_coaxstk.cpp +++ b/src/USER-CGDNA/pair_oxdna_coaxstk.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna_coaxstk.h" #include #include #include #include -#include "pair_oxdna_coaxstk.h" #include "mf_oxdna.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGDNA/pair_oxdna_excv.cpp b/src/USER-CGDNA/pair_oxdna_excv.cpp index 82af5ed1c7..68091f4190 100644 --- a/src/USER-CGDNA/pair_oxdna_excv.cpp +++ b/src/USER-CGDNA/pair_oxdna_excv.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna_excv.h" #include #include #include #include -#include "pair_oxdna_excv.h" #include "mf_oxdna.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGDNA/pair_oxdna_hbond.cpp b/src/USER-CGDNA/pair_oxdna_hbond.cpp index 8cd28f10c8..2de05e66ae 100644 --- a/src/USER-CGDNA/pair_oxdna_hbond.cpp +++ b/src/USER-CGDNA/pair_oxdna_hbond.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna_hbond.h" #include #include #include #include -#include "pair_oxdna_hbond.h" #include "mf_oxdna.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGDNA/pair_oxdna_stk.cpp b/src/USER-CGDNA/pair_oxdna_stk.cpp index 93c65979ac..aaa25039ef 100644 --- a/src/USER-CGDNA/pair_oxdna_stk.cpp +++ b/src/USER-CGDNA/pair_oxdna_stk.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna_stk.h" #include #include #include #include -#include "pair_oxdna_stk.h" #include "mf_oxdna.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGDNA/pair_oxdna_xstk.cpp b/src/USER-CGDNA/pair_oxdna_xstk.cpp index 1365d0d2b2..806f8a42c6 100644 --- a/src/USER-CGDNA/pair_oxdna_xstk.cpp +++ b/src/USER-CGDNA/pair_oxdna_xstk.cpp @@ -14,11 +14,11 @@ Contributing author: Oliver Henrich (University of Strathclyde, Glasgow) ------------------------------------------------------------------------- */ +#include "pair_oxdna_xstk.h" #include #include #include #include -#include "pair_oxdna_xstk.h" #include "mf_oxdna.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-CGSDK/angle_sdk.cpp b/src/USER-CGSDK/angle_sdk.cpp index 823c725e07..575b0fae69 100644 --- a/src/USER-CGSDK/angle_sdk.cpp +++ b/src/USER-CGSDK/angle_sdk.cpp @@ -18,9 +18,9 @@ lj/sdk potential for coarse grained MD simulations. ------------------------------------------------------------------------- */ +#include "angle_sdk.h" #include #include -#include "angle_sdk.h" #include "atom.h" #include "neighbor.h" #include "pair.h" diff --git a/src/USER-CGSDK/pair_lj_sdk.cpp b/src/USER-CGSDK/pair_lj_sdk.cpp index 7dd6c04436..b22469566e 100644 --- a/src/USER-CGSDK/pair_lj_sdk.cpp +++ b/src/USER-CGSDK/pair_lj_sdk.cpp @@ -16,11 +16,11 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ +#include "pair_lj_sdk.h" #include #include #include #include -#include "pair_lj_sdk.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp index 33a1659df9..5fba8cde66 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp @@ -16,11 +16,11 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ +#include "pair_lj_sdk_coul_long.h" #include #include #include #include -#include "pair_lj_sdk_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp index d26f8efcdc..b61ed5528f 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp @@ -16,11 +16,11 @@ This style is a simplified re-implementation of the CG/CMM pair style ------------------------------------------------------------------------- */ +#include "pair_lj_sdk_coul_msm.h" #include #include #include #include -#include "pair_lj_sdk_coul_msm.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-COLVARS/colvarproxy_lammps.cpp b/src/USER-COLVARS/colvarproxy_lammps.cpp index 651999f79c..685c698ab6 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.cpp +++ b/src/USER-COLVARS/colvarproxy_lammps.cpp @@ -8,7 +8,20 @@ // Colvars repository at GitHub. +#include "colvarproxy_lammps.h" #include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + #include "lammps.h" #include "atom.h" #include "error.h" @@ -22,19 +35,6 @@ #include "colvarbias.h" #include "colvaratoms.h" #include "colvarproxy.h" -#include "colvarproxy_lammps.h" - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include #define HASH_FAIL -1 diff --git a/src/USER-COLVARS/fix_colvars.cpp b/src/USER-COLVARS/fix_colvars.cpp index ff0e8fb334..9331fe7abb 100644 --- a/src/USER-COLVARS/fix_colvars.cpp +++ b/src/USER-COLVARS/fix_colvars.cpp @@ -24,13 +24,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_colvars.h" #include #include #include #include #include -#include "fix_colvars.h" #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-COLVARS/group_ndx.cpp b/src/USER-COLVARS/group_ndx.cpp index 858336c9d5..7350712c40 100644 --- a/src/USER-COLVARS/group_ndx.cpp +++ b/src/USER-COLVARS/group_ndx.cpp @@ -17,15 +17,14 @@ ------------------------------------------------------------------------- */ #include "group_ndx.h" +#include +#include #include "atom.h" #include "comm.h" #include "group.h" #include "memory.h" #include "error.h" -#include -#include - using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- diff --git a/src/USER-COLVARS/ndx_group.cpp b/src/USER-COLVARS/ndx_group.cpp index 7b46364f18..5436ba7b6b 100644 --- a/src/USER-COLVARS/ndx_group.cpp +++ b/src/USER-COLVARS/ndx_group.cpp @@ -17,6 +17,9 @@ ------------------------------------------------------------------------- */ #include "ndx_group.h" +#include +#include +#include #include "atom.h" #include "comm.h" #include "group.h" @@ -24,10 +27,6 @@ #include "force.h" #include "error.h" -#include -#include -#include - using namespace LAMMPS_NS; #define BUFLEN 4096 #define DELTA 16384 -- GitLab From 95cb995336e4c20211bd354067bdb199baadee07 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 3 Jul 2019 22:18:41 -0400 Subject: [PATCH 123/236] recover compilation of MANYBODY package --- src/MANYBODY/pair_polymorphic.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MANYBODY/pair_polymorphic.h b/src/MANYBODY/pair_polymorphic.h index 32f1c5414a..e7c3cd0d26 100644 --- a/src/MANYBODY/pair_polymorphic.h +++ b/src/MANYBODY/pair_polymorphic.h @@ -22,6 +22,7 @@ PairStyle(polymorphic,PairPolymorphic) #include "pair.h" #include +#include namespace LAMMPS_NS { -- GitLab From e63fe1fe84e51c734c2170b4f6eb324d01abb58e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 Jul 2019 00:09:01 -0400 Subject: [PATCH 124/236] please POEMS library in namespace POEMS and remove "using namespace" from headers --- lib/poems/POEMSChain.h | 99 +++--- lib/poems/SystemProcessor.h | 439 +++++++++++------------ lib/poems/body.cpp | 5 +- lib/poems/body.h | 3 +- lib/poems/body23joint.cpp | 3 + lib/poems/body23joint.h | 3 +- lib/poems/colmatmap.cpp | 2 + lib/poems/colmatmap.h | 3 +- lib/poems/colmatrix.cpp | 2 + lib/poems/colmatrix.h | 42 +-- lib/poems/defines.h | 7 +- lib/poems/eulerparameters.cpp | 42 +-- lib/poems/eulerparameters.h | 3 +- lib/poems/fastmatrixops.cpp | 130 +++---- lib/poems/fastmatrixops.h | 3 +- lib/poems/fixedpoint.cpp | 2 + lib/poems/fixedpoint.h | 3 +- lib/poems/freebodyjoint.cpp | 124 +++---- lib/poems/freebodyjoint.h | 8 +- lib/poems/inertialframe.cpp | 2 + lib/poems/inertialframe.h | 4 +- lib/poems/joint.cpp | 4 +- lib/poems/joint.h | 3 +- lib/poems/mat3x3.cpp | 2 + lib/poems/mat3x3.h | 14 +- lib/poems/mat4x4.cpp | 2 + lib/poems/mat4x4.h | 11 +- lib/poems/mat6x6.cpp | 2 + lib/poems/mat6x6.h | 3 +- lib/poems/matrices.h | 13 +- lib/poems/matrix.cpp | 2 + lib/poems/matrix.h | 8 +- lib/poems/matrixfun.cpp | 48 +-- lib/poems/matrixfun.h | 17 +- lib/poems/mixedjoint.cpp | 130 +++---- lib/poems/mixedjoint.h | 12 +- lib/poems/norm.cpp | 2 + lib/poems/norm.h | 7 +- lib/poems/onbody.cpp | 2 + lib/poems/onbody.h | 106 +++--- lib/poems/onfunctions.cpp | 40 ++- lib/poems/onfunctions.h | 3 +- lib/poems/onsolver.cpp | 2 + lib/poems/onsolver.h | 49 ++- lib/poems/particle.cpp | 2 + lib/poems/particle.h | 10 +- lib/poems/poemslist.h | 74 ++-- lib/poems/poemsnodelib.h | 11 +- lib/poems/poemsobject.cpp | 2 + lib/poems/poemsobject.h | 4 +- lib/poems/poemstree.h | 4 +- lib/poems/poemstreenode.cpp | 2 + lib/poems/poemstreenode.h | 39 ++- lib/poems/point.cpp | 4 +- lib/poems/point.h | 18 +- lib/poems/prismaticjoint.cpp | 2 + lib/poems/prismaticjoint.h | 5 +- lib/poems/revolutejoint.cpp | 2 + lib/poems/revolutejoint.h | 3 +- lib/poems/rigidbody.cpp | 2 + lib/poems/rigidbody.h | 3 +- lib/poems/rowmatrix.cpp | 2 + lib/poems/rowmatrix.h | 3 +- lib/poems/solver.cpp | 2 + lib/poems/solver.h | 19 +- lib/poems/sphericaljoint.cpp | 196 +++++------ lib/poems/sphericaljoint.h | 3 +- lib/poems/system.cpp | 615 +++++++++++++++++---------------- lib/poems/system.h | 33 +- lib/poems/vect3.cpp | 2 + lib/poems/vect3.h | 8 +- lib/poems/vect4.cpp | 2 + lib/poems/vect4.h | 9 +- lib/poems/vect6.cpp | 2 + lib/poems/vect6.h | 3 +- lib/poems/virtualcolmatrix.cpp | 2 + lib/poems/virtualcolmatrix.h | 40 +-- lib/poems/virtualmatrix.cpp | 6 +- lib/poems/virtualmatrix.h | 3 +- lib/poems/virtualrowmatrix.cpp | 2 + lib/poems/virtualrowmatrix.h | 11 +- lib/poems/workspace.cpp | 2 + lib/poems/workspace.h | 69 ++-- src/POEMS/fix_poems.cpp | 4 +- src/POEMS/fix_poems.h | 3 +- 85 files changed, 1365 insertions(+), 1274 deletions(-) diff --git a/lib/poems/POEMSChain.h b/lib/poems/POEMSChain.h index 9f0db59333..8baa293dbd 100644 --- a/lib/poems/POEMSChain.h +++ b/lib/poems/POEMSChain.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: PoemsChain.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -19,56 +19,59 @@ #define POEMSCHAIN_H_ #include "poemslist.h" +#include +namespace POEMS { struct ChildRingData { - List * childRing; - int entranceNodeId; + List * childRing; + int entranceNodeId; }; struct POEMSChain{ - ~POEMSChain(){ - for(int i = 0; i < childChains.GetNumElements(); i++) - { - delete childChains(i); - } - listOfNodes.DeleteValues(); - } - //void printTreeStructure(int tabs); - //void getTreeAsList(List * temp); - List listOfNodes; - List childChains; - POEMSChain * parentChain; - List childRings; - - - void printTreeStructure(int tabs){ - for(int i = 0; i < tabs; i++) - { - cout << "\t"; - } - cout << "Chain: "; - for(int i = 0; i < listOfNodes.GetNumElements(); i++) - { - cout << *(listOfNodes(i)) << " "; - } - cout << endl; - for(int i = 0; i < childChains.GetNumElements(); i++) - { - childChains(i)->printTreeStructure(tabs + 1); - } - } - void getTreeAsList(List * temp) - { - for(int i = 0; i < listOfNodes.GetNumElements(); i++) - { - int * integer = new int; - *integer = *(listOfNodes(i)); - temp->Append(integer); - } - for(int i = 0; i < childChains.GetNumElements(); i++) - { - childChains(i)->getTreeAsList(temp); - } - } + ~POEMSChain(){ + for(int i = 0; i < childChains.GetNumElements(); i++) + { + delete childChains(i); + } + listOfNodes.DeleteValues(); + } + //void printTreeStructure(int tabs); + //void getTreeAsList(List * temp); + List listOfNodes; + List childChains; + POEMSChain * parentChain; + List childRings; + + + void printTreeStructure(int tabs){ + for(int i = 0; i < tabs; i++) + { + std::cout << "\t"; + } + std::cout << "Chain: "; + for(int i = 0; i < listOfNodes.GetNumElements(); i++) + { + std::cout << *(listOfNodes(i)) << " "; + } + std::cout << std::endl; + for(int i = 0; i < childChains.GetNumElements(); i++) + { + childChains(i)->printTreeStructure(tabs + 1); + } + } + void getTreeAsList(List * temp) + { + for(int i = 0; i < listOfNodes.GetNumElements(); i++) + { + int * integer = new int; + *integer = *(listOfNodes(i)); + temp->Append(integer); + } + for(int i = 0; i < childChains.GetNumElements(); i++) + { + childChains(i)->getTreeAsList(temp); + } + } }; +} #endif diff --git a/lib/poems/SystemProcessor.h b/lib/poems/SystemProcessor.h index 3be168c34d..a6001d96d0 100644 --- a/lib/poems/SystemProcessor.h +++ b/lib/poems/SystemProcessor.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: SystemProcessor.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,59 +11,61 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef _SYS_PROCESSOR_H_ #define _SYS_PROCESSOR_H_ +#include #include "poemslist.h" #include "poemstree.h" #include "POEMSChain.h" +namespace POEMS { struct POEMSNode { - List links; - List taken; - int idNumber; - bool visited; - - ~POEMSNode(){ - for(int i = 0; i < taken.GetNumElements(); i++) - { - delete taken(i); - } - }; + List links; + List taken; + int idNumber; + bool visited; + + ~POEMSNode(){ + for(int i = 0; i < taken.GetNumElements(); i++) + { + delete taken(i); + } + }; }; class SystemProcessor{ private: - Tree nodes; - static void POEMSNodeDelete_cb(void *node) { - delete (POEMSNode *) node; - } - List headsOfSystems; - List > ringsInSystem; - POEMSNode * findSingleLink(TreeNode * aNode); - POEMSChain * AddNewChain(POEMSNode * currentNode); - bool setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNode); + Tree nodes; + static void POEMSNodeDelete_cb(void *node) { + delete (POEMSNode *) node; + } + List headsOfSystems; + List > ringsInSystem; + POEMSNode * findSingleLink(TreeNode * aNode); + POEMSChain * AddNewChain(POEMSNode * currentNode); + bool setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNode); public: - SystemProcessor(void); - - ~SystemProcessor(void) { - headsOfSystems.DeleteValues(); - for(int i = 0; i < ringsInSystem.GetNumElements(); i++) - { - for(int k = 0; k < ringsInSystem(i)->GetNumElements(); i++) - { - delete (*ringsInSystem(i))(k); - } - } - }; - void processArray(int** links, int numLinks); - List * getSystemData(); - int getNumberOfHeadChains(); + SystemProcessor(void); + + ~SystemProcessor(void) { + headsOfSystems.DeleteValues(); + for(int i = 0; i < ringsInSystem.GetNumElements(); i++) + { + for(int k = 0; k < ringsInSystem(i)->GetNumElements(); i++) + { + delete (*ringsInSystem(i))(k); + } + } + }; + void processArray(int** links, int numLinks); + List * getSystemData(); + int getNumberOfHeadChains(); }; SystemProcessor::SystemProcessor(void){ @@ -73,145 +75,145 @@ SystemProcessor::SystemProcessor(void){ void SystemProcessor::processArray(int** links, int numLinks) { - bool * false_var; //holds the value false; needed because a constant cannot be put into a list; the list requires a - //reference. - for(int i = 0; i < numLinks; i++) //go through all the links in the input array - { - if(!nodes.Find(links[i][0])) //if the first node in the pair is not found in the storage tree - { - POEMSNode * newNode = new POEMSNode; //make a new node -// forDeletion.Append(newNode); - newNode->idNumber = links[i][0]; //set its ID to the value - newNode->visited = false; //set it to be unvisited - nodes.Insert(links[i][0], links[i][0], (void *) newNode); //and add it to the tree storage structure - } - if(!nodes.Find(links[i][1])) //repeat process for the other half of each link - { - POEMSNode * newNode = new POEMSNode; -// forDeletion.Append(newNode); - newNode->idNumber = links[i][1]; - newNode->visited = false; - nodes.Insert(links[i][1], links[i][1], (void *) newNode); - } - POEMSNode * firstNode = (POEMSNode *)nodes.Find(links[i][0]); //now that we are sure both nodes exist, - POEMSNode * secondNode = (POEMSNode *)nodes.Find(links[i][1]); //we can get both of them out of the tree - firstNode->links.Append(secondNode); //and add the link from the first to the second... - false_var = new bool; - *false_var = false; //make a new false boolean to note that the link between these two - firstNode->taken.Append(false_var); //has not already been taken, and append it to the taken list - secondNode->links.Append(firstNode); //repeat process for link from second node to first - false_var = new bool; - *false_var = false; - secondNode->taken.Append(false_var); - } - - TreeNode * temp = nodes.GetRoot(); //get the root node of the node storage tree - POEMSNode * currentNode; - do - { - currentNode = findSingleLink(temp); //find the start of the next available chain - if(currentNode != NULL) - { - headsOfSystems.Append(AddNewChain(currentNode)); //and add it to the headsOfSystems list of chains - } - } - while(currentNode != NULL); //repeat this until all chains have been added + bool * false_var; //holds the value false; needed because a constant cannot be put into a list; the list requires a + //reference. + for(int i = 0; i < numLinks; i++) //go through all the links in the input array + { + if(!nodes.Find(links[i][0])) //if the first node in the pair is not found in the storage tree + { + POEMSNode * newNode = new POEMSNode; //make a new node +// forDeletion.Append(newNode); + newNode->idNumber = links[i][0]; //set its ID to the value + newNode->visited = false; //set it to be unvisited + nodes.Insert(links[i][0], links[i][0], (void *) newNode); //and add it to the tree storage structure + } + if(!nodes.Find(links[i][1])) //repeat process for the other half of each link + { + POEMSNode * newNode = new POEMSNode; +// forDeletion.Append(newNode); + newNode->idNumber = links[i][1]; + newNode->visited = false; + nodes.Insert(links[i][1], links[i][1], (void *) newNode); + } + POEMSNode * firstNode = (POEMSNode *)nodes.Find(links[i][0]); //now that we are sure both nodes exist, + POEMSNode * secondNode = (POEMSNode *)nodes.Find(links[i][1]); //we can get both of them out of the tree + firstNode->links.Append(secondNode); //and add the link from the first to the second... + false_var = new bool; + *false_var = false; //make a new false boolean to note that the link between these two + firstNode->taken.Append(false_var); //has not already been taken, and append it to the taken list + secondNode->links.Append(firstNode); //repeat process for link from second node to first + false_var = new bool; + *false_var = false; + secondNode->taken.Append(false_var); + } + + TreeNode * temp = nodes.GetRoot(); //get the root node of the node storage tree + POEMSNode * currentNode; + do + { + currentNode = findSingleLink(temp); //find the start of the next available chain + if(currentNode != NULL) + { + headsOfSystems.Append(AddNewChain(currentNode)); //and add it to the headsOfSystems list of chains + } + } + while(currentNode != NULL); //repeat this until all chains have been added } POEMSChain * SystemProcessor::AddNewChain(POEMSNode * currentNode){ - if(currentNode == NULL) //Termination condition; if the currentNode is null, then return null - { - return NULL; - } - int * tmp; - POEMSNode * nextNode = NULL; //nextNode stores the proposed next node to add to the chain. this will be checked to make sure no backtracking is occuring before being assigned as the current node. - POEMSChain * newChain = new POEMSChain; //make a new POEMSChain object. This will be the object returned + if(currentNode == NULL) //Termination condition; if the currentNode is null, then return null + { + return NULL; + } + int * tmp; + POEMSNode * nextNode = NULL; //nextNode stores the proposed next node to add to the chain. this will be checked to make sure no backtracking is occuring before being assigned as the current node. + POEMSChain * newChain = new POEMSChain; //make a new POEMSChain object. This will be the object returned - if(currentNode->links.GetNumElements() == 0) //if we have no links from this node, then the whole chain is only one node. Add this node to the chain and return it; mark node as visited for future reference - { - currentNode->visited = true; - tmp = new int; - *tmp = currentNode->idNumber; - newChain->listOfNodes.Append(tmp); - return newChain; - } - while(currentNode->links.GetNumElements() <= 2) //we go until we get to a node that branches, or both branches have already been taken both branches can already be taken if a loop with no spurs is found in the input data - { - currentNode->visited = true; - tmp = new int; - *tmp = currentNode->idNumber; - newChain->listOfNodes.Append(tmp); //append the current node to the chain & mark as visited - //cout << "Appending node " << currentNode->idNumber << " to chain" << endl; - nextNode = currentNode->links.GetHeadElement()->value; //the next node is the first or second value stored in the links array - //of the current node. We get the first value... - if(!setLinkVisited(currentNode, nextNode)) //...and see if it points back to where we came from. If it does... - { //either way, we set this link as visited - if(currentNode->links.GetNumElements() == 1) //if it does, then if that is the only link to this node, we're done with the chain, so append the chain to the list and return the newly created chain - { -// headsOfSystems.Append(newChain); - return newChain; - } - nextNode = currentNode->links.GetHeadElement()->next->value;//follow the other link if there is one, so we go down the chain - if(!setLinkVisited(currentNode, nextNode)) //mark link as followed, so we know not to backtrack - { - // headsOfSystems.Append(newChain); - return newChain; //This condition, where no branches have occurred but both links have already - //been taken can only occur in a loop with no spurs; add this loop to the - //system (currently added as a chain for consistency), and return. - } - } - currentNode = nextNode; //set the current node to be the next node in the chain - } - currentNode->visited = true; - tmp = new int; - *tmp = currentNode->idNumber; - newChain->listOfNodes.Append(tmp); //append the last node before branch (node shared jointly with branch chains) - //re-mark as visited, just to make sure - ListElement * tempNode = currentNode->links.GetHeadElement(); //go through all of the links, one at a time that branch - POEMSChain * tempChain = NULL; //temporary variable to hold data - while(tempNode != NULL) //when we have followed all links, stop - { - if(setLinkVisited(tempNode->value, currentNode)) //dont backtrack, or create closed loops - { - tempChain = AddNewChain(tempNode->value); //Add a new chain created out of the next node down that link - tempChain->parentChain = newChain; //set the parent to be this chain - newChain->childChains.Append(tempChain); //append the chain to this chain's list of child chains - } - tempNode = tempNode->next; //go to process the next chain - } - //headsOfSystems.Append(newChain); //append this chain to the system list - return newChain; + if(currentNode->links.GetNumElements() == 0) //if we have no links from this node, then the whole chain is only one node. Add this node to the chain and return it; mark node as visited for future reference + { + currentNode->visited = true; + tmp = new int; + *tmp = currentNode->idNumber; + newChain->listOfNodes.Append(tmp); + return newChain; + } + while(currentNode->links.GetNumElements() <= 2) //we go until we get to a node that branches, or both branches have already been taken both branches can already be taken if a loop with no spurs is found in the input data + { + currentNode->visited = true; + tmp = new int; + *tmp = currentNode->idNumber; + newChain->listOfNodes.Append(tmp); //append the current node to the chain & mark as visited + //std::cout << "Appending node " << currentNode->idNumber << " to chain" << std::endl; + nextNode = currentNode->links.GetHeadElement()->value; //the next node is the first or second value stored in the links array + //of the current node. We get the first value... + if(!setLinkVisited(currentNode, nextNode)) //...and see if it points back to where we came from. If it does... + { //either way, we set this link as visited + if(currentNode->links.GetNumElements() == 1) //if it does, then if that is the only link to this node, we're done with the chain, so append the chain to the list and return the newly created chain + { +// headsOfSystems.Append(newChain); + return newChain; + } + nextNode = currentNode->links.GetHeadElement()->next->value;//follow the other link if there is one, so we go down the chain + if(!setLinkVisited(currentNode, nextNode)) //mark link as followed, so we know not to backtrack + { + // headsOfSystems.Append(newChain); + return newChain; //This condition, where no branches have occurred but both links have already + //been taken can only occur in a loop with no spurs; add this loop to the + //system (currently added as a chain for consistency), and return. + } + } + currentNode = nextNode; //set the current node to be the next node in the chain + } + currentNode->visited = true; + tmp = new int; + *tmp = currentNode->idNumber; + newChain->listOfNodes.Append(tmp); //append the last node before branch (node shared jointly with branch chains) + //re-mark as visited, just to make sure + ListElement * tempNode = currentNode->links.GetHeadElement(); //go through all of the links, one at a time that branch + POEMSChain * tempChain = NULL; //temporary variable to hold data + while(tempNode != NULL) //when we have followed all links, stop + { + if(setLinkVisited(tempNode->value, currentNode)) //dont backtrack, or create closed loops + { + tempChain = AddNewChain(tempNode->value); //Add a new chain created out of the next node down that link + tempChain->parentChain = newChain; //set the parent to be this chain + newChain->childChains.Append(tempChain); //append the chain to this chain's list of child chains + } + tempNode = tempNode->next; //go to process the next chain + } + //headsOfSystems.Append(newChain); //append this chain to the system list + return newChain; } POEMSNode * SystemProcessor::findSingleLink(TreeNode * aNode) //This function takes the root of a search tree containing POEMSNodes and returns a POEMSNode corresponding to the start of a chain in the //system. It finds a node that has not been visited before, and only has one link; this node will be used as the head of the chain. { - if(aNode == NULL) - { - return NULL; - } - POEMSNode * returnVal = (POEMSNode *)aNode->GetAuxData(); //get the poemsnode data out of the treenode - POEMSNode * detectLoneLoops = NULL; //is used to handle a loop that has no protruding chains - if(returnVal->visited == false) - { - detectLoneLoops = returnVal; //if we find any node that has not been visited yet, save it - } - if(returnVal->links.GetNumElements() == 1 && returnVal->visited == false) //see if it has one element and hasnt been visited already - { - return returnVal; //return the node is it meets this criteria - } - returnVal = findSingleLink(aNode->Left()); //otherwise, check the left subtree - if(returnVal == NULL) //and if we find nothing... - { - returnVal = findSingleLink(aNode->Right()); //check the right subtree - } - if(returnVal == NULL) //if we could not find any chains - { - returnVal = detectLoneLoops; //see if we found any nodes at all that havent been processed - } - return returnVal; //return what we find (will be NULL if no new chains are - //found) + if(aNode == NULL) + { + return NULL; + } + POEMSNode * returnVal = (POEMSNode *)aNode->GetAuxData(); //get the poemsnode data out of the treenode + POEMSNode * detectLoneLoops = NULL; //is used to handle a loop that has no protruding chains + if(returnVal->visited == false) + { + detectLoneLoops = returnVal; //if we find any node that has not been visited yet, save it + } + if(returnVal->links.GetNumElements() == 1 && returnVal->visited == false) //see if it has one element and hasnt been visited already + { + return returnVal; //return the node is it meets this criteria + } + returnVal = findSingleLink(aNode->Left()); //otherwise, check the left subtree + if(returnVal == NULL) //and if we find nothing... + { + returnVal = findSingleLink(aNode->Right()); //check the right subtree + } + if(returnVal == NULL) //if we could not find any chains + { + returnVal = detectLoneLoops; //see if we found any nodes at all that havent been processed + } + return returnVal; //return what we find (will be NULL if no new chains are + //found) } bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNode) @@ -223,65 +225,66 @@ bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNo //value for that particular link. Because each link is represented twice, (once at each node in the link), both of the boolean values need //to be set in the event that the link has to be set as visited. { - //cout << "Checking link between nodes " << firstNode->idNumber << " and " << secondNode->idNumber << "... "; - ListElement * tmp = firstNode->links.GetHeadElement(); //get the head element of the list of pointers for node 1 - ListElement * tmp2 = firstNode->taken.GetHeadElement(); //get the head element of the list of bool isVisited flags for node 1 - while(tmp->value != NULL || tmp2->value != NULL) //go through untill we reach the end of the lists - { - if(tmp->value == secondNode) //if we find the link to the other node - { - if(*(tmp2->value) == true) //if the link has already been visited - { - //cout << "visited already" << endl; - return false; //return false to indicate that the link has been visited before this attempt - } - else //otherwise, visit it - { - *tmp2->value = true; - } - break; - } - tmp = tmp->next; //go check next link - tmp2 = tmp2->next; - } + //std::cout << "Checking link between nodes " << firstNode->idNumber << " and " << secondNode->idNumber << "... "; + ListElement * tmp = firstNode->links.GetHeadElement(); //get the head element of the list of pointers for node 1 + ListElement * tmp2 = firstNode->taken.GetHeadElement(); //get the head element of the list of bool isVisited flags for node 1 + while(tmp->value != NULL || tmp2->value != NULL) //go through untill we reach the end of the lists + { + if(tmp->value == secondNode) //if we find the link to the other node + { + if(*(tmp2->value) == true) //if the link has already been visited + { + //std::cout << "visited already" << std::endl; + return false; //return false to indicate that the link has been visited before this attempt + } + else //otherwise, visit it + { + *tmp2->value = true; + } + break; + } + tmp = tmp->next; //go check next link + tmp2 = tmp2->next; + } - tmp = secondNode->links.GetHeadElement(); //now, if the link was unvisited, we need to go set the other node's list such that - //it also knows this link is being visited - tmp2 = secondNode->taken.GetHeadElement(); - while(tmp->value != NULL || tmp2->value != NULL) //go through the list - { - if(tmp->value == firstNode) //if we find the link - { - if(*(tmp2->value) == true) //and it has already been visited, then signal an error; this shouldnt ever happen - { - cout << "Error in parsing structure! Should never reach this condition! \n" << - "Record of visited links out of synch between two adjacent nodes.\n"; - return false; - } - else - { - *tmp2->value = true; //set the appropriate value to true to indicate this link has been visited - } - break; - } - tmp = tmp->next; - tmp2 = tmp2->next; - } - //cout << "not visited" << endl; - return true; //return true to indicate that this is the first time the link has been visited + tmp = secondNode->links.GetHeadElement(); //now, if the link was unvisited, we need to go set the other node's list such that + //it also knows this link is being visited + tmp2 = secondNode->taken.GetHeadElement(); + while(tmp->value != NULL || tmp2->value != NULL) //go through the list + { + if(tmp->value == firstNode) //if we find the link + { + if(*(tmp2->value) == true) //and it has already been visited, then signal an error; this shouldnt ever happen + { + std::cout << "Error in parsing structure! Should never reach this condition! \n" << + "Record of visited links out of synch between two adjacent nodes.\n"; + return false; + } + else + { + *tmp2->value = true; //set the appropriate value to true to indicate this link has been visited + } + break; + } + tmp = tmp->next; + tmp2 = tmp2->next; + } + //std::cout << "not visited" << std::endl; + return true; //return true to indicate that this is the first time the link has been visited } -List * SystemProcessor::getSystemData(void) //Gets the list of POEMSChains that comprise the system. Might eventually only - //return chains linked to the reference plane, but currently returns every chain - //in the system. +List * SystemProcessor::getSystemData(void) //Gets the list of POEMSChains that comprise the system. Might eventually only + //return chains linked to the reference plane, but currently returns every chain + //in the system. { - return &headsOfSystems; + return &headsOfSystems; } int SystemProcessor::getNumberOfHeadChains(void) //This function isnt implemented yet, and might be taken out entirely; this was a holdover - //from when I intended to return an array of chain pointers, rather than a list of chains - //It will probably be deleted once I finish figuring out exactly what needs to be returned + //from when I intended to return an array of chain pointers, rather than a list of chains + //It will probably be deleted once I finish figuring out exactly what needs to be returned { - return 0; + return 0; +} } #endif diff --git a/lib/poems/body.cpp b/lib/poems/body.cpp index 487d5e1ab7..6825941b93 100644 --- a/lib/poems/body.cpp +++ b/lib/poems/body.cpp @@ -26,9 +26,8 @@ #include "rigidbody.h" #include "vect3.h" -class Joint; - using namespace std; +using namespace POEMS; Body::Body() { @@ -132,7 +131,7 @@ void Body::AddPoint(Point* point){ // global body functions // -Body* NewBody(int type){ +Body* POEMS::NewBody(int type){ switch( BodyType(type) ) { case INERTIALFRAME : // The inertial reference frame diff --git a/lib/poems/body.h b/lib/poems/body.h index 06a9c72417..e2394b40aa 100644 --- a/lib/poems/body.h +++ b/lib/poems/body.h @@ -25,6 +25,7 @@ #include "mat3x3.h" #include "vect3.h" +namespace POEMS { // emumerated type enum BodyType { INERTIALFRAME = 0, @@ -75,5 +76,5 @@ public: // global body functions Body* NewBody(int type); - +} #endif diff --git a/lib/poems/body23joint.cpp b/lib/poems/body23joint.cpp index 7aa761fe2a..e3ef32b2a9 100644 --- a/lib/poems/body23joint.cpp +++ b/lib/poems/body23joint.cpp @@ -27,6 +27,9 @@ #include "vect3.h" #include "virtualmatrix.h" +using namespace std; +using namespace POEMS; + Body23Joint::Body23Joint(){ DimQandU(4,2); } diff --git a/lib/poems/body23joint.h b/lib/poems/body23joint.h index c47cdfb9de..43a727c815 100644 --- a/lib/poems/body23joint.h +++ b/lib/poems/body23joint.h @@ -22,6 +22,7 @@ #include "joint.h" #include "matrix.h" +namespace POEMS { class Body23Joint : public Joint { Matrix const_sP; public: @@ -38,5 +39,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; - +} #endif diff --git a/lib/poems/colmatmap.cpp b/lib/poems/colmatmap.cpp index 1954e7ff15..34a95feb03 100644 --- a/lib/poems/colmatmap.cpp +++ b/lib/poems/colmatmap.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + ColMatMap::ColMatMap(){ numrows = 0; diff --git a/lib/poems/colmatmap.h b/lib/poems/colmatmap.h index 6d84870046..5a12cf487f 100644 --- a/lib/poems/colmatmap.h +++ b/lib/poems/colmatmap.h @@ -24,6 +24,7 @@ #include "virtualcolmatrix.h" #include "virtualmatrix.h" +namespace POEMS { class ColMatrix; class ColMatMap : public VirtualColMatrix { @@ -64,5 +65,5 @@ public: friend void FastCKRK5(ColMatMap& X, ColMatrix& Xi, ColMatrix* f, double* c, double dt); friend void FastFRK5(ColMatMap& X, ColMatrix& Xi, ColMatrix* f, double* c, double dt); }; - +} #endif diff --git a/lib/poems/colmatrix.cpp b/lib/poems/colmatrix.cpp index e7ae98a368..0cc666645a 100644 --- a/lib/poems/colmatrix.cpp +++ b/lib/poems/colmatrix.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + ColMatrix::ColMatrix(){ numrows = 0; diff --git a/lib/poems/colmatrix.h b/lib/poems/colmatrix.h index 70f13356e2..bcfa86843a 100644 --- a/lib/poems/colmatrix.h +++ b/lib/poems/colmatrix.h @@ -23,12 +23,14 @@ #include "virtualcolmatrix.h" #include "virtualmatrix.h" +namespace POEMS { class Matrix; class Vect6; class Mat3x3; class Vect3; class ColMatrix : public VirtualColMatrix { +protected: double* elements; public: ColMatrix(); @@ -58,28 +60,28 @@ public: ColMatrix& operator=(const VirtualMatrix& A); // overloaded = ColMatrix& operator*=(double b); - void Abs(); - void BasicMax(double& value, int& index); - void BasicMin(double& value, int& index); + void Abs(); + void BasicMax(double& value, int& index); + void BasicMin(double& value, int& index); // fast matrix operations - friend void FastQuaternions(ColMatrix& q, Mat3x3& C); - friend void FastInvQuaternions(Mat3x3& C, ColMatrix& q); - friend void FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot); - friend void FastTMult(Matrix& A, Vect6& B, ColMatrix& C); - friend void FastMult(Matrix& A, ColMatrix& B, Vect6& C); - friend void FastAssign(ColMatrix& A, ColMatrix& C); + friend void FastQuaternions(ColMatrix& q, Mat3x3& C); + friend void FastInvQuaternions(Mat3x3& C, ColMatrix& q); + friend void FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot); + friend void FastTMult(Matrix& A, Vect6& B, ColMatrix& C); + friend void FastMult(Matrix& A, ColMatrix& B, Vect6& C); + friend void FastAssign(ColMatrix& A, ColMatrix& C); - friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); - friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); - friend void FastAssign(ColMatrix&A, Vect3& C); - - friend void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); - friend void EP_Transformation(ColMatrix& q, Mat3x3& C); - friend void EP_FromTransformation(ColMatrix& q, Mat3x3& C); - friend void EP_Normalize(ColMatrix& q); - friend void EPdotdot_udot(ColMatrix& Audot, ColMatrix& Aqdot, ColMatrix& Aq,ColMatrix& Aqddot); - friend void qdot_to_u(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); -}; + friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); + friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); + friend void FastAssign(ColMatrix&A, Vect3& C); + friend void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); + friend void EP_Transformation(ColMatrix& q, Mat3x3& C); + friend void EP_FromTransformation(ColMatrix& q, Mat3x3& C); + friend void EP_Normalize(ColMatrix& q); + friend void EPdotdot_udot(ColMatrix& Audot, ColMatrix& Aqdot, ColMatrix& Aq,ColMatrix& Aqddot); + friend void qdot_to_u(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); +}; +} #endif diff --git a/lib/poems/defines.h b/lib/poems/defines.h index 455bc298d5..877bc0fa0b 100644 --- a/lib/poems/defines.h +++ b/lib/poems/defines.h @@ -15,13 +15,14 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ -#ifndef _DEFINES_H_ -#define _DEFINES_H_ +#ifndef POEMS_DEFINES_H +#define POEMS_DEFINES_H +namespace POEMS { enum SolverType { ONSOLVER = 0, PARTICLESOLVER = 1 }; - +} #endif diff --git a/lib/poems/eulerparameters.cpp b/lib/poems/eulerparameters.cpp index f698c40b3a..bb8d676796 100644 --- a/lib/poems/eulerparameters.cpp +++ b/lib/poems/eulerparameters.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: eulerparameters.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -23,8 +23,10 @@ #include "mat3x3.h" using namespace std; +using namespace POEMS; -void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot){ + +void POEMS::EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot){ EP_Normalize(q); int num=u.GetNumRows(); if (3 @@ -28,10 +28,12 @@ #include "mat6x6.h" #include "vect3.h" #include "virtualmatrix.h" - + +using namespace POEMS; + FreeBodyJoint::FreeBodyJoint(){ - DimQandU(7,6); + DimQandU(7,6); } FreeBodyJoint::~FreeBodyJoint(){ @@ -49,112 +51,112 @@ void FreeBodyJoint::WriteOutJointData(std::ostream& out){ } void FreeBodyJoint::ComputeLocalTransform(){ - Mat3x3 ko_C_k; - EP_Transformation(q, ko_C_k); - FastMult(pk_C_ko,ko_C_k,pk_C_k); + Mat3x3 ko_C_k; + EP_Transformation(q, ko_C_k); + FastMult(pk_C_ko,ko_C_k,pk_C_k); } Matrix FreeBodyJoint::GetForward_sP(){ Mat6x6 sP; - //sP.Identity(); - - sP.Zeros(); + //sP.Identity(); + + sP.Zeros(); Mat3x3 temp0=T(pk_C_k); for(int i=1;i<4;i++){ sP(i,i)=1.0; for(int j=1;j<4;j++){ sP(3+i,3+j)=temp0(i,j); } - } - return sP; + } + return sP; } Matrix FreeBodyJoint::GetBackward_sP(){ Mat6x6 sP; - sP.Identity(); + sP.Identity(); sP =-1.0*sP; - cout<<"Did I come here in "<r); - - //COMMENT STEP3: CALCULATE QDOT + + FastAssign(r12,body2->r); + + //COMMENT STEP3: CALCULATE QDOT qdot_to_u(q, u, qdot); - - + + Vect3 WN; WN.BasicSet(0,u.BasicGet(0)); WN.BasicSet(1,u.BasicGet(1)); WN.BasicSet(2,u.BasicGet(2)); - - Vect3 VN; + + Vect3 VN; VN.BasicSet(0,u.BasicGet(3)); VN.BasicSet(1,u.BasicGet(4)); - VN.BasicSet(2,u.BasicGet(5)); - - FastAssign(WN,body2->omega_k); - + VN.BasicSet(2,u.BasicGet(5)); + + FastAssign(WN,body2->omega_k); + Vect3 pk_w_k; - FastMult(body2->n_C_k,WN,pk_w_k); + FastMult(body2->n_C_k,WN,pk_w_k); FastAssign(pk_w_k,body2->omega); - - - - //COMMENT STEP5: CALCULATE VELOCITES - FastAssign(VN,body2->v); - FastTMult(body2->n_C_k,body2->v,body2->v_k); - - - //CALCULATE KE - + + + + //COMMENT STEP5: CALCULATE VELOCITES + FastAssign(VN,body2->v); + FastTMult(body2->n_C_k,body2->v,body2->v_k); + + + //CALCULATE KE + Matrix tempke; - tempke = T(body2->v)*(body2->v); + tempke = T(body2->v)*(body2->v); double ke = 0.0; - ke = body2->mass*tempke(1,1); + ke = body2->mass*tempke(1,1); FastMult(body2->inertia,body2->omega_k,result1); - tempke= T(body2->omega_k)*result1; + tempke= T(body2->omega_k)*result1; ke = 0.5*ke + 0.5*tempke(1,1); body2->KE=ke; - - + + //COMMENT STEP6: CALCULATE STATE EXPLICIT ANGULAR ACCELERATIONS body2->alpha_t.Zeros(); - - + + //COMMENT STEP7: CALCULATE STATE EXPLICIT ACCELERATIONS - body2->a_t.Zeros(); - + body2->a_t.Zeros(); + } void FreeBodyJoint::BackwardKinematics(){ -cout<<"Did I come here "< #include "virtualmatrix.h" +namespace POEMS { class Vect3; class Mat6x6; class ColMatrix; @@ -67,16 +68,15 @@ public: friend void FastMult(Mat3x3& A, Mat3x3& B, Mat3x3& C); friend void FastMultT(Mat3x3& A, Mat3x3& B, Mat3x3& C); friend void FastAssignT(Mat3x3& A, Mat3x3& C); - friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); - + friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); + friend void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC); friend void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI); friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); - + friend void EP_Transformation(ColMatrix& q, Mat3x3& C); friend void EP_FromTransformation(ColMatrix& q, Mat3x3& C); - }; - +} #endif diff --git a/lib/poems/mat4x4.cpp b/lib/poems/mat4x4.cpp index a6a587bc03..9a0e7b8d56 100644 --- a/lib/poems/mat4x4.cpp +++ b/lib/poems/mat4x4.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + Mat4x4::Mat4x4(){ numrows = numcols = 4; diff --git a/lib/poems/mat4x4.h b/lib/poems/mat4x4.h index a6ae232473..3f6d97ba15 100644 --- a/lib/poems/mat4x4.h +++ b/lib/poems/mat4x4.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: mat4x4.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,17 +21,18 @@ #include #include "virtualmatrix.h" +namespace POEMS { class Vect4; class Matrix; class Mat4x4 : public VirtualMatrix { double elements[4][4]; -public: +public: Mat4x4(); ~Mat4x4(); Mat4x4(const Mat4x4& A); // copy constructor Mat4x4(const VirtualMatrix& A); // copy constructor - + double& operator_2int (int i, int j); // array access double Get_2int(int i, int j) const; void Set_2int(int i, int j, double value); @@ -64,5 +65,5 @@ public: friend void FastMultT(Mat4x4& A, Mat4x4& B, Mat4x4& C); friend void FastAssignT(Mat4x4& A, Mat4x4& C); }; - +} #endif diff --git a/lib/poems/mat6x6.cpp b/lib/poems/mat6x6.cpp index fdc917e03d..e9dde2fe87 100644 --- a/lib/poems/mat6x6.cpp +++ b/lib/poems/mat6x6.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + Mat6x6::Mat6x6(){ numrows = numcols = 6; diff --git a/lib/poems/mat6x6.h b/lib/poems/mat6x6.h index 5eaa4f803b..a611bc8283 100644 --- a/lib/poems/mat6x6.h +++ b/lib/poems/mat6x6.h @@ -21,6 +21,7 @@ #include "virtualmatrix.h" +namespace POEMS { class Matrix; class Mat3x3; class Vect6; @@ -73,5 +74,5 @@ public: friend void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC); friend void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI); }; - +} #endif diff --git a/lib/poems/matrices.h b/lib/poems/matrices.h index 7a7e2c4b58..15f0d3ad23 100644 --- a/lib/poems/matrices.h +++ b/lib/poems/matrices.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: matrices.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -20,23 +20,14 @@ #define MATRICES_H #include "matrix.h" - #include "colmatrix.h" - #include "rowmatrix.h" - #include "mat3x3.h" - #include "vect3.h" - #include "mat4x4.h" - #include "vect4.h" - #include "mat6x6.h" - #include "vect6.h" - #include "colmatmap.h" #endif diff --git a/lib/poems/matrix.cpp b/lib/poems/matrix.cpp index f05d6f815c..f7b0c631f2 100644 --- a/lib/poems/matrix.cpp +++ b/lib/poems/matrix.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + Matrix::Matrix(){ numrows = numcols = 0; diff --git a/lib/poems/matrix.h b/lib/poems/matrix.h index 8bd8110760..c2ed92873c 100644 --- a/lib/poems/matrix.h +++ b/lib/poems/matrix.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: matrix.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -22,6 +22,7 @@ #include "virtualmatrix.h" +namespace POEMS { class Mat3x3; class Mat4x4; class Mat6x6; @@ -73,7 +74,6 @@ public: friend void FastMult(Mat6x6& A, Matrix& B, Matrix& C); friend void FastMult(Matrix& A, ColMatrix& B, Vect6& C); friend void FastMultT(Matrix& A, Matrix& B, Mat6x6& C); - }; - +} #endif diff --git a/lib/poems/matrixfun.cpp b/lib/poems/matrixfun.cpp index 99fbae4ca1..037e986a99 100644 --- a/lib/poems/matrixfun.cpp +++ b/lib/poems/matrixfun.cpp @@ -27,12 +27,14 @@ #include "virtualrowmatrix.h" using namespace std; +using namespace POEMS; + // // Create a new matrix // -VirtualMatrix* NewMatrix(int type){ +VirtualMatrix* POEMS::NewMatrix(int type){ switch( MatrixType(type) ) { case MATRIX : return new Matrix; @@ -50,7 +52,7 @@ VirtualMatrix* NewMatrix(int type){ // Transpose // -Matrix T(const VirtualMatrix& A){ +Matrix POEMS::T(const VirtualMatrix& A){ int numrows = A.GetNumRows(); int numcols = A.GetNumCols(); Matrix C(numcols,numrows); @@ -60,8 +62,8 @@ Matrix T(const VirtualMatrix& A){ return C; } -Mat3x3 T(const Mat3x3& A){ - Mat3x3 C; +Mat3x3 POEMS::T(const Mat3x3& A){ + Mat3x3 C; C.elements[0][0] = A.elements[0][0]; C.elements[1][1] = A.elements[1][1]; C.elements[2][2] = A.elements[2][2]; @@ -76,7 +78,7 @@ Mat3x3 T(const Mat3x3& A){ return C; } -Mat6x6 T(const Mat6x6& A){ +Mat6x6 POEMS::T(const Mat6x6& A){ Mat6x6 C; int i,j; for(i=0;i<6;i++) @@ -86,7 +88,7 @@ Mat6x6 T(const Mat6x6& A){ return C; } -Matrix T(const Vect3& A){ +Matrix POEMS::T(const Vect3& A){ Matrix C(1,3); C.BasicSet(0,0,A.elements[0]); C.BasicSet(0,1,A.elements[1]); @@ -95,7 +97,7 @@ Matrix T(const Vect3& A){ return C; } -Matrix T(const Vect6& A){ +Matrix POEMS::T(const Vect6& A){ Matrix C(1,6); C.BasicSet(0,0,A.elements[0]); C.BasicSet(0,1,A.elements[1]); @@ -107,7 +109,7 @@ Matrix T(const Vect6& A){ return C; } -RowMatrix T(const VirtualColMatrix &A){ +RowMatrix POEMS::T(const VirtualColMatrix &A){ int numele = A.GetNumRows(); RowMatrix C(numele); for(int i=0;i @@ -29,9 +29,11 @@ #include "vect3.h" #include "virtualmatrix.h" - +using namespace POEMS; +using namespace std; + -MixedJoint::MixedJoint(){ +MixedJoint::MixedJoint(){ } MixedJoint::~MixedJoint(){ @@ -54,23 +56,23 @@ void MixedJoint::SetsP(Matrix& sPr, Vect6& temp_dofs, int i, int j){ numrots = i; numtrans = j; if (numrots < 2) - DimQandU(numrots+numtrans,numrots+numtrans); - else - DimQandU((4+numtrans),(numrots+numtrans)); + DimQandU(numrots+numtrans,numrots+numtrans); + else + DimQandU((4+numtrans),(numrots+numtrans)); cout<<"Check "<<4+numtrans<<" "< 1) EP_Normalize(q); // COMMENT STEP1: CALCULATE ORIENTATIONS - ComputeForwardTransforms(); - - + ComputeForwardTransforms(); + + //COMMENT STEP2: CALCULATE POSITION VECTORS - Vect3 result1, result2, result3, result4; + Vect3 result1, result2, result3, result4; result1.Zeros(); for (int k=0; k<3; k++){ if( dofs(3+k) != 0.0 ){ @@ -116,32 +118,32 @@ void MixedJoint::ForwardKinematics(){ result1.BasicSet(k,q.BasicGet(4 + k)); else result1.BasicSet(k,q.BasicGet(numrots + k)); - } + } } - - - - FastAssign(result1,r12); // r12 in parents basis i.e. Newtonian - FastNegMult(k_C_pk,r12,r21); // r21 in body basis - - FastAssign(r12,body2->r); // This is right - - //COMMENT STEP3: CALCULATE QDOT + + + + FastAssign(result1,r12); // r12 in parents basis i.e. Newtonian + FastNegMult(k_C_pk,r12,r21); // r21 in body basis + + FastAssign(r12,body2->r); // This is right + + //COMMENT STEP3: CALCULATE QDOT int pp = 0; if (numrots > 1){ ColMatrix temp_u(3+numtrans); qdot_to_u(q,temp_u,qdot); for (int k=1;k<=6;k++){ if(dofs(k) != 0.0){ - u.BasicSet(pp,temp_u.BasicGet(k-1)); + u.BasicSet(pp,temp_u.BasicGet(k-1)); pp = pp+1; - } + } } } else u = qdot; - - + + Vect3 WN; WN.Zeros(); int p = 0; for (int k=0;k<3;k++){ @@ -151,51 +153,51 @@ void MixedJoint::ForwardKinematics(){ } }// WN is in body basis - - Vect3 VN; VN.Zeros(); + + Vect3 VN; VN.Zeros(); for (int k=0;k<3;k++){ if( dofs(3+k+1) != 0.0 ) { VN.BasicSet(k,u.BasicGet(p)); p=p+1; } }// VN is the vector of translational velocities in Newtonian basis - - FastAssign(WN,body2->omega_k); - // cout<<"Angular Velocity "<omega_k); + + // cout<<"Angular Velocity "<n_C_k,WN,pk_w_k); + FastMult(body2->n_C_k,WN,pk_w_k); FastAssign(pk_w_k,body2->omega); - - - - //COMMENT STEP5: CALCULATE VELOCITES - FastAssign(VN,body2->v); - FastTMult(body2->n_C_k,body2->v,body2->v_k); - - - //CALCULATE KE - + + + + //COMMENT STEP5: CALCULATE VELOCITES + FastAssign(VN,body2->v); + FastTMult(body2->n_C_k,body2->v,body2->v_k); + + + //CALCULATE KE + Matrix tempke; - tempke = T(body2->v)*(body2->v); + tempke = T(body2->v)*(body2->v); double ke = 0.0; - ke = body2->mass*tempke(1,1); + ke = body2->mass*tempke(1,1); FastMult(body2->inertia,body2->omega_k,result1); - tempke= T(body2->omega_k)*result1; + tempke= T(body2->omega_k)*result1; ke = 0.5*ke + 0.5*tempke(1,1); body2->KE=ke; - - + + //COMMENT STEP6: CALCULATE STATE EXPLICIT ANGULAR ACCELERATIONS body2->alpha_t.Zeros(); - - + + //COMMENT STEP7: CALCULATE STATE EXPLICIT ACCELERATIONS - body2->a_t.Zeros(); - + body2->a_t.Zeros(); + } void MixedJoint::BackwardKinematics(){ cout<<"Did I come here "< children; + Body* system_body; + Joint* system_joint; + OnBody* parent; + List children; - Direction joint_dir; - void (Joint::*kinfun)(); // kinematics function - void (Joint::*updatesP)(Matrix&); // sP update function - Vect3* gamma; // pointer to gamma vector - Mat3x3* pk_C_k; // pointer to transformation + Direction joint_dir; + void (Joint::*kinfun)(); // kinematics function + void (Joint::*updatesP)(Matrix&); // sP update function + Vect3* gamma; // pointer to gamma vector + Mat3x3* pk_C_k; // pointer to transformation - - Mat6x6 sI; // spatial inertias - Mat6x6 sIhat; // recursive spatial inertias - Mat6x6 sSC; // spatial shift - Mat6x6 sT; // spatial triangularization - Vect6 sF; // spatial forces - Vect6 sFhat; // recursive spatial forces - Vect6 sAhat; // recursive spatial acceleration + Mat6x6 sI; // spatial inertias + Mat6x6 sIhat; // recursive spatial inertias + Mat6x6 sSC; // spatial shift + Mat6x6 sT; // spatial triangularization - Matrix sP; // spatial partial velocities - Matrix sM; // triangularized mass matrix diagonal elements - Matrix sMinv; // inverse of sM - Matrix sPsMinv; - Matrix sIhatsP; + Vect6 sF; // spatial forces + Vect6 sFhat; // recursive spatial forces + Vect6 sAhat; // recursive spatial acceleration - // states and state derivatives - ColMatrix* q; - ColMatrix* u; - ColMatrix* qdot; - ColMatrix* udot; - ColMatrix* qdotdot; - - ColMatrix* r; - ColMatrix* acc; - ColMatrix* ang; + Matrix sP; // spatial partial velocities + Matrix sM; // triangularized mass matrix diagonal elements + Matrix sMinv; // inverse of sM + Matrix sPsMinv; + Matrix sIhatsP; + + // states and state derivatives + ColMatrix* q; + ColMatrix* u; + ColMatrix* qdot; + ColMatrix* udot; + ColMatrix* qdotdot; + + ColMatrix* r; + ColMatrix* acc; + ColMatrix* ang; // friend classes friend class OnSolver; - -public: - OnBody(); - ~OnBody(); - int RecursiveSetup(InertialFrame* basebody); - int RecursiveSetup(int ID, OnBody* parentbody, Joint* sys_joint); - void RecursiveKinematics(); - void RecursiveTriangularization(); - void RecursiveForwardSubstitution(); - Mat3x3 GetN_C_K(); - Vect3 LocalCart(); - int GetBodyID(); - void CalculateAcceleration(); - void Setup(); - void SetupInertialFrame(); - void LocalKinematics(); - void LocalTriangularization(Vect3& Torque, Vect3& Force); - void LocalForwardSubstitution(); +public: + OnBody(); + ~OnBody(); + int RecursiveSetup(InertialFrame* basebody); + int RecursiveSetup(int ID, OnBody* parentbody, Joint* sys_joint); + void RecursiveKinematics(); + void RecursiveTriangularization(); + void RecursiveForwardSubstitution(); + Mat3x3 GetN_C_K(); + Vect3 LocalCart(); + int GetBodyID(); + void CalculateAcceleration(); + void Setup(); + void SetupInertialFrame(); + void LocalKinematics(); + void LocalTriangularization(Vect3& Torque, Vect3& Force); + void LocalForwardSubstitution(); }; - +} #endif diff --git a/lib/poems/onfunctions.cpp b/lib/poems/onfunctions.cpp index 1d91dbf378..cfc0c60936 100644 --- a/lib/poems/onfunctions.cpp +++ b/lib/poems/onfunctions.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: onfunction.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,10 +11,10 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #include "onfunctions.h" @@ -25,9 +25,11 @@ #include "virtualmatrix.h" using namespace std; +using namespace POEMS; + // friend of Vect3 & Vect6 -void OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV){ +void POEMS::OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV){ sV.elements[0] = angular.elements[0]; sV.elements[1] = angular.elements[1]; sV.elements[2] = angular.elements[2]; @@ -37,38 +39,38 @@ void OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV){ } // friend of Vect3, Mat3x3, & Mat6x6 -void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC){ +void POEMS::OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC){ // the block diagonals - + // the gamma cross with transform Mat3x3 temp; Mat3x3 temp2; SC.Zeros(); - temp.Zeros(); + temp.Zeros(); temp2.Zeros(); - //FastTMult(C,gamma,temp); + //FastTMult(C,gamma,temp); temp(1,2)= -gamma(3); temp(1,3)= gamma(2); temp(2,1)= gamma(3); - temp(2,3)= -gamma(1); temp(3,1)= -gamma(2); temp(3,2)= gamma(1); + temp(2,3)= -gamma(1); temp(3,1)= -gamma(2); temp(3,2)= gamma(1); FastMult(temp,C,temp2); - + SC(1,4)=temp2(1,1); SC(2,4)=temp2(2,1); SC(3,4)=temp2(3,1); SC(1,5)=temp2(1,2); SC(2,5)=temp2(2,2); SC(3,5)=temp2(3,2); SC(1,6)=temp2(1,3); SC(2,6)=temp2(2,3); SC(3,6)=temp2(3,3); - + SC(1,1)=C(1,1); SC(2,1)=C(2,1); SC(3,1)=C(3,1); SC(1,2)=C(1,2); SC(2,2)=C(2,2); SC(3,2)=C(3,2); SC(1,3)=C(1,3); SC(2,3)=C(2,3); SC(3,3)=C(3,3); SC(4,4)=C(1,1); SC(5,4)=C(2,1); SC(6,4)=C(3,1); SC(4,5)=C(1,2); SC(5,5)=C(2,2); SC(6,5)=C(3,2); - SC(4,6)=C(1,3); SC(5,6)=C(2,3); SC(6,6)=C(3,3); - + SC(4,6)=C(1,3); SC(5,6)=C(2,3); SC(6,6)=C(3,3); + } // friend of Mat3x3 & Mat6x6 -void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI){ - - sI(4,4)=mass; sI(5,5)=mass; sI(6,6)=mass; - sI(1,1)=inertia(1,1); sI(1,2)=inertia(1,2); sI(1,3)=inertia(1,3); - sI(2,1)=inertia(2,1); sI(2,2)=inertia(2,2); sI(2,3)=inertia(2,3); - sI(3,1)=inertia(3,1); sI(3,2)=inertia(3,2); sI(3,3)=inertia(3,3); +void POEMS::OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI){ + + sI(4,4)=mass; sI(5,5)=mass; sI(6,6)=mass; + sI(1,1)=inertia(1,1); sI(1,2)=inertia(1,2); sI(1,3)=inertia(1,3); + sI(2,1)=inertia(2,1); sI(2,2)=inertia(2,2); sI(2,3)=inertia(2,3); + sI(3,1)=inertia(3,1); sI(3,2)=inertia(3,2); sI(3,3)=inertia(3,3); } diff --git a/lib/poems/onfunctions.h b/lib/poems/onfunctions.h index 42d0f4ac1c..bb07425b85 100644 --- a/lib/poems/onfunctions.h +++ b/lib/poems/onfunctions.h @@ -18,6 +18,7 @@ #ifndef ONFUNCTIONS_H #define ONFUNCTIONS_H +namespace POEMS { class Mat3x3; class Mat6x6; class Vect3; @@ -30,5 +31,5 @@ void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI); void Create_Map(int MM); int ICELL(int IX,int IY,int IZ, int MM); - +} #endif diff --git a/lib/poems/onsolver.cpp b/lib/poems/onsolver.cpp index dd94c9c7ad..609ef32613 100644 --- a/lib/poems/onsolver.cpp +++ b/lib/poems/onsolver.cpp @@ -33,6 +33,8 @@ #include "virtualmatrix.h" using namespace std; +using namespace POEMS; + OnSolver::OnSolver(){ numbodies = 0; diff --git a/lib/poems/onsolver.h b/lib/poems/onsolver.h index b4bbd5e25d..1e850b8fc1 100644 --- a/lib/poems/onsolver.h +++ b/lib/poems/onsolver.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: onsolver.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -22,32 +22,31 @@ #include "solver.h" #include "onbody.h" +namespace POEMS { class ColMatrix; class Matrix; - - class OnSolver : public Solver { - OnBody inertialframe; - int numbodies; - OnBody** bodyarray; - ColMatrix** q; - ColMatrix** qdot; - ColMatrix** qdotdot; - ColMatrix** u; - ColMatrix** udot; - - - - void DeleteModel(); - int CreateTopologyArray(int i, OnBody* body); - void CreateStateMatrixMaps(); - void GetType(); -public: - OnSolver(); - ~OnSolver(); - void CreateModel(); - void Solve(double time, Matrix& FF); -}; + OnBody inertialframe; + int numbodies; + OnBody** bodyarray; + ColMatrix** q; + ColMatrix** qdot; + ColMatrix** qdotdot; + ColMatrix** u; + ColMatrix** udot; + + + void DeleteModel(); + int CreateTopologyArray(int i, OnBody* body); + void CreateStateMatrixMaps(); + void GetType(); +public: + OnSolver(); + ~OnSolver(); + void CreateModel(); + void Solve(double time, Matrix& FF); +}; +} #endif diff --git a/lib/poems/particle.cpp b/lib/poems/particle.cpp index 0d953e00f6..37ec790666 100644 --- a/lib/poems/particle.cpp +++ b/lib/poems/particle.cpp @@ -18,6 +18,8 @@ #include "particle.h" +using namespace POEMS; + Particle::Particle(){ } diff --git a/lib/poems/particle.h b/lib/poems/particle.h index 0f13252f99..8a7a521451 100644 --- a/lib/poems/particle.h +++ b/lib/poems/particle.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: particle.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -23,14 +23,14 @@ #include "body.h" - +namespace POEMS { class Particle : public Body { -public: +public: Particle(); ~Particle(); BodyType GetType(); bool ReadInBodyData(std::istream& in); void WriteOutBodyData(std::ostream& out); }; - +} #endif diff --git a/lib/poems/poemslist.h b/lib/poems/poemslist.h index 9882af013a..bd0c1456b4 100644 --- a/lib/poems/poemslist.h +++ b/lib/poems/poemslist.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: poemslist.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,8 +21,7 @@ #include #include -using namespace std; - +namespace POEMS { template class ListElement{ public: ListElement* prev; @@ -51,7 +50,7 @@ public: S* operator()(int id); void Append(List * listToAppend); void DeleteValues(); - void RemoveElementAndDeleteValue(ListElement* ele); + void RemoveElementAndDeleteValue(ListElement* ele); void PrintList(); }; @@ -90,9 +89,9 @@ template List::~List(){ template void List::Append(List * listToAppend) { - tail->next = listToAppend->head; - listToAppend->head->prev = tail; - tail = listToAppend->tail; + tail->next = listToAppend->head; + listToAppend->head->prev = tail; + tail = listToAppend->tail; } template int List::GetNumElements(){ @@ -104,17 +103,17 @@ template ListElement* List::GetHeadElement(){ } template ListElement* List::GetTailElement(){ - return tail; + return tail; } template void List::Remove(ListElement* ele){ if(!ele){ - cerr << "ERROR: ListElement to be removed not defined" << endl; + std::cerr << "ERROR: ListElement to be removed not defined" << std::endl; exit(0); } if(!numelements){ - cerr << "ERROR: List is empty" << endl; + std::cerr << "ERROR: List is empty" << std::endl; exit(0); } @@ -135,7 +134,7 @@ template void List::Remove(ListElement* ele){ template ListElement* List::Append(S* v){ if(!v){ - cerr << "ERROR: cannot add null Body to list" << endl; + std::cerr << "ERROR: cannot add null Body to list" << std::endl; exit(0); } @@ -145,22 +144,22 @@ template ListElement* List::Append(S* v){ if(numelements==1) head = tail = ele; else{ - /* + /* tail->next = ele; ele->prev = tail; - tail = ele;*/ - - ele->prev = tail; - tail = ele; - ele->prev->next = ele; - - } + tail = ele;*/ + + ele->prev = tail; + tail = ele; + ele->prev->next = ele; + + } return ele; } template ListElement* List::Prepend(S* v){ if(!v){ - cerr << "ERROR: cannot add null Body to list" << endl; + std::cerr << "ERROR: cannot add null Body to list" << std::endl; exit(0); } @@ -170,9 +169,9 @@ template ListElement* List::Prepend(S* v){ if(numelements==1) head = tail = ele; else{ - ele->next = head; - head = ele; - ele->next->prev = ele; + ele->next = head; + head = ele; + ele->next->prev = ele; } return ele; } @@ -190,15 +189,15 @@ template S** List::CreateArray(){ template S* List::operator()(int id){ if(id >= numelements){ - cerr << "ERROR: subscript out of bounds" << endl; + std::cerr << "ERROR: subscript out of bounds" << std::endl; exit(0); } - + ListElement* ele = head; for(int i=0;inext; } - + return ele->value; } @@ -214,16 +213,15 @@ template void List::RemoveElementAndDeleteValue(ListElement* ele) } template void List::PrintList(){ - cout<<"Printing List "<* ele = head; - cout<<*(ele->value)<<" "; - ele = ele->next; - for(int k =2; kvalue)<<" "; - ele = ele->next; - } - cout<<*(ele->value)<* ele = head; + std::cout << *(ele->value) << " "; + ele = ele->next; + for(int k =2; kvalue) << " "; + ele = ele->next; + } + std::cout << *(ele->value) << std::endl; +} } - - #endif diff --git a/lib/poems/poemsnodelib.h b/lib/poems/poemsnodelib.h index 06cf4530d2..d323b701b0 100644 --- a/lib/poems/poemsnodelib.h +++ b/lib/poems/poemsnodelib.h @@ -20,9 +20,7 @@ #include -using namespace std; - - +namespace POEMS { TreeNode *GetTreeNode(int item,TreeNode *lptr = NULL,TreeNode *rptr =NULL); void FreeTreeNode(TreeNode *p); @@ -81,7 +79,7 @@ TreeNode *GetTreeNode(int item,TreeNode *lptr,TreeNode *rptr) // if insufficient memory, terminatewith an error message if (p == NULL) { - cerr << "Memory allocation failure!\n"; + std::cerr << "Memory allocation failure!\n"; exit(1); } @@ -140,7 +138,7 @@ void IndentBlanks(int num) // const int indentblock = 6; for(int i = 0; i < num; i++) - cout << " "; + std::cout << " "; } void PrintTree (TreeNode *t, int level) @@ -153,10 +151,11 @@ void PrintTree (TreeNode *t, int level) PrintTree(t->Right(),level + 1); // indent to current level; output node data IndentBlanks(indentUnit*level); - cout << t->GetData() << endl; + std::cout << t->GetData() << std::endl; // print left branch of tree t PrintTree(t->Left(),level + 1); } } +} #endif diff --git a/lib/poems/poemsobject.cpp b/lib/poems/poemsobject.cpp index 7c3f1ca872..dfdd95953e 100644 --- a/lib/poems/poemsobject.cpp +++ b/lib/poems/poemsobject.cpp @@ -19,6 +19,8 @@ #include "poemsobject.h" #include +using namespace POEMS; + POEMSObject::POEMSObject(){ name = 0; ChangeName((const char*)"unnamed"); diff --git a/lib/poems/poemsobject.h b/lib/poems/poemsobject.h index 63b2915638..173d9da7ab 100644 --- a/lib/poems/poemsobject.h +++ b/lib/poems/poemsobject.h @@ -19,7 +19,7 @@ #ifndef POEMSOBJECT_H #define POEMSOBJECT_H - +namespace POEMS { class POEMSObject { char* name; int ID; @@ -31,5 +31,5 @@ public: int GetID(); void SetID(int id); }; - +} #endif diff --git a/lib/poems/poemstree.h b/lib/poems/poemstree.h index 8f8e80ab66..d49a0d0a88 100644 --- a/lib/poems/poemstree.h +++ b/lib/poems/poemstree.h @@ -21,7 +21,7 @@ #include "poemstreenode.h" #include "poemsnodelib.h" - +namespace POEMS { // constants to indicate the balance factor of a node const int leftheavy = -1; const int balanced = 0; @@ -609,5 +609,5 @@ void Tree::ClearList(void) delete current; size = 0; } - +} #endif diff --git a/lib/poems/poemstreenode.cpp b/lib/poems/poemstreenode.cpp index 051e13d6e0..ca4307f69f 100644 --- a/lib/poems/poemstreenode.cpp +++ b/lib/poems/poemstreenode.cpp @@ -17,6 +17,8 @@ #include "poemstreenode.h" +using namespace POEMS; + // constructor; initialize the data and pointer fields // The pointer value NULL assigns a empty subtree TreeNode::TreeNode (const int & item, TreeNode *lptr,TreeNode *rptr, diff --git a/lib/poems/poemstreenode.h b/lib/poems/poemstreenode.h index e22bd9b97d..69f3caf958 100644 --- a/lib/poems/poemstreenode.h +++ b/lib/poems/poemstreenode.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: poemstreenode.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,36 +11,37 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef TREENODE_H #define TREENODE_H +namespace POEMS { // declares a tree node object for a binary tree class TreeNode{ private: // points to the left and right children of the node - TreeNode *left; - TreeNode *right; + TreeNode *left; + TreeNode *right; - int balanceFactor; - int data; - void * aux_data; -public: - // make Tree a friend because it needs access to left and right pointer fields of a node - friend class Tree; - TreeNode * Left(); - TreeNode * Right(); - int GetData(); - void * GetAuxData() {return aux_data;}; - void SetAuxData(void * AuxData) {aux_data = AuxData;}; - int GetBalanceFactor(); - TreeNode(const int &item, TreeNode *lptr, TreeNode *rptr, int balfac = 0); - //friend class DCASolver; + int balanceFactor; + int data; + void * aux_data; +public: + // make Tree a friend because it needs access to left and right pointer fields of a node + friend class Tree; + TreeNode * Left(); + TreeNode * Right(); + int GetData(); + void * GetAuxData() {return aux_data;}; + void SetAuxData(void * AuxData) {aux_data = AuxData;}; + int GetBalanceFactor(); + TreeNode(const int &item, TreeNode *lptr, TreeNode *rptr, int balfac = 0); + //friend class DCASolver; }; - +} #endif diff --git a/lib/poems/point.cpp b/lib/poems/point.cpp index d7eed94efd..f648b58d3d 100644 --- a/lib/poems/point.cpp +++ b/lib/poems/point.cpp @@ -20,6 +20,8 @@ #include "point.h" #include "vect3.h" +using namespace POEMS; + Point::Point(){ position.Zeros(); } @@ -35,7 +37,7 @@ void Point::WriteOut(std::ostream& out){ WriteOutPointData(out); } -Point* NewPoint(int type){ +Point* POEMS::NewPoint(int type){ switch( PointType(type) ) { case FIXEDPOINT : // A Fixed Point diff --git a/lib/poems/point.h b/lib/poems/point.h index 746a527cd7..c08e92db0d 100644 --- a/lib/poems/point.h +++ b/lib/poems/point.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: point.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -22,21 +22,21 @@ #include "poemsobject.h" #include "vect3.h" - +namespace POEMS { // emumerated type enum PointType { FIXEDPOINT = 0 }; class Point : public POEMSObject { -public: +public: Vect3 position; - Point(); - bool ReadIn(std::istream& in); + Point(); + bool ReadIn(std::istream& in); void WriteOut(std::ostream& out); - - virtual ~Point(); + + virtual ~Point(); virtual PointType GetType() = 0; virtual Vect3 GetPoint() = 0; virtual bool ReadInPointData(std::istream& in) = 0; @@ -45,5 +45,5 @@ public: // global point functions Point* NewPoint(int type); - +} #endif diff --git a/lib/poems/prismaticjoint.cpp b/lib/poems/prismaticjoint.cpp index c7d4bed568..3e649f0d22 100644 --- a/lib/poems/prismaticjoint.cpp +++ b/lib/poems/prismaticjoint.cpp @@ -25,6 +25,8 @@ #include "mat3x3.h" #include "virtualmatrix.h" +using namespace POEMS; + PrismaticJoint::PrismaticJoint(){ q.Dim(1); qdot.Dim(1); diff --git a/lib/poems/prismaticjoint.h b/lib/poems/prismaticjoint.h index c17be350cb..df3ab3195c 100644 --- a/lib/poems/prismaticjoint.h +++ b/lib/poems/prismaticjoint.h @@ -24,8 +24,7 @@ #include "vect3.h" #include "matrix.h" - - +namespace POEMS { class PrismaticJoint : public Joint { Vect3 axis_pk; // unit vector in body1 basis Vect3 axis_k; // unit vector in body2 basis @@ -45,5 +44,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; - +} #endif diff --git a/lib/poems/revolutejoint.cpp b/lib/poems/revolutejoint.cpp index 955a2f0dea..6b11acbf0f 100644 --- a/lib/poems/revolutejoint.cpp +++ b/lib/poems/revolutejoint.cpp @@ -25,6 +25,8 @@ #include "mat3x3.h" #include "virtualmatrix.h" +using namespace POEMS; + RevoluteJoint::RevoluteJoint(){ DimQandU(1); Vect3 axis; diff --git a/lib/poems/revolutejoint.h b/lib/poems/revolutejoint.h index ac1c06d5c5..10a38114df 100644 --- a/lib/poems/revolutejoint.h +++ b/lib/poems/revolutejoint.h @@ -23,6 +23,7 @@ #include "vect3.h" #include "matrix.h" +namespace POEMS { class VirtualMatrix; class RevoluteJoint : public Joint { @@ -44,5 +45,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; - +} #endif diff --git a/lib/poems/rigidbody.cpp b/lib/poems/rigidbody.cpp index 53acfa8bd4..a7d4f9f19f 100644 --- a/lib/poems/rigidbody.cpp +++ b/lib/poems/rigidbody.cpp @@ -20,6 +20,8 @@ #include "virtualmatrix.h" using namespace std; +using namespace POEMS; + RigidBody::RigidBody(){ } diff --git a/lib/poems/rigidbody.h b/lib/poems/rigidbody.h index 2f4430e264..d4be92ebcf 100644 --- a/lib/poems/rigidbody.h +++ b/lib/poems/rigidbody.h @@ -22,6 +22,7 @@ #include "body.h" +namespace POEMS { class RigidBody : public Body { public: RigidBody(); @@ -30,5 +31,5 @@ public: bool ReadInBodyData(std::istream& in); void WriteOutBodyData(std::ostream& out); }; - +} #endif diff --git a/lib/poems/rowmatrix.cpp b/lib/poems/rowmatrix.cpp index 9fa57e773f..eac8fbef5d 100644 --- a/lib/poems/rowmatrix.cpp +++ b/lib/poems/rowmatrix.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + RowMatrix::RowMatrix(){ numcols = 0; diff --git a/lib/poems/rowmatrix.h b/lib/poems/rowmatrix.h index 1dbb3d11e0..8e8d7b5f99 100644 --- a/lib/poems/rowmatrix.h +++ b/lib/poems/rowmatrix.h @@ -24,6 +24,7 @@ #include "virtualrowmatrix.h" #include "virtualmatrix.h" +namespace POEMS { class RowMatrix : public VirtualRowMatrix { double* elements; public: @@ -52,5 +53,5 @@ public: RowMatrix& operator=(const VirtualMatrix& A); // overloaded = RowMatrix& operator*=(double b); }; - +} #endif diff --git a/lib/poems/solver.cpp b/lib/poems/solver.cpp index 9d2245149f..04afb27945 100644 --- a/lib/poems/solver.cpp +++ b/lib/poems/solver.cpp @@ -20,6 +20,8 @@ #include "system.h" #include "onsolver.h" +using namespace POEMS; + Solver::Solver(){ } diff --git a/lib/poems/solver.h b/lib/poems/solver.h index 6a2debf497..489e6d41f1 100644 --- a/lib/poems/solver.h +++ b/lib/poems/solver.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: solver.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,6 +21,7 @@ #include "colmatmap.h" #include "defines.h" +namespace POEMS { class System; class Matrix; @@ -28,11 +29,11 @@ class Solver{ protected: System* system; - + double time; ColMatMap state; ColMatMap statedot; - ColMatMap statedoubledot; + ColMatMap statedoubledot; SolverType type; @@ -47,13 +48,13 @@ public: virtual void DeleteModel() = 0; virtual void CreateModel() = 0; - virtual void Solve(double time, Matrix& FF) = 0; - - - + virtual void Solve(double time, Matrix& FF) = 0; + + + ColMatMap* GetState(); ColMatMap* GetStateDerivative(); ColMatMap* GetStateDerivativeDerivative(); }; - +} #endif diff --git a/lib/poems/sphericaljoint.cpp b/lib/poems/sphericaljoint.cpp index cba6d00a6e..996bb5a887 100644 --- a/lib/poems/sphericaljoint.cpp +++ b/lib/poems/sphericaljoint.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: sphericaljoint.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,10 +11,10 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #include "sphericaljoint.h" @@ -30,6 +30,8 @@ #include "vect3.h" #include "virtualmatrix.h" +using namespace std; +using namespace POEMS; SphericalJoint::SphericalJoint(){ DimQandU(4,3); @@ -48,24 +50,24 @@ bool SphericalJoint::ReadInJointData(std::istream& in){ void SphericalJoint::WriteOutJointData(std::ostream& out){ } -Matrix SphericalJoint::GetForward_sP(){ +Matrix SphericalJoint::GetForward_sP(){ Mat3x3 sPa,sPl; Matrix sP(6,3); - sPa.Identity(); + sPa.Identity(); sPl.Zeros(); - Vect3 temp = -(point2->position); - + Vect3 temp = -(point2->position); + sPl(1,2) = temp(3); sPl(1,3) = -temp(2); - + sPl(2,1) = -temp(3); sPl(2,3) = temp(1); - - sPl(3,1) = temp(2); + + sPl(3,1) = temp(2); sPl(3,2) = -temp(1); - - sP=Stack(sPa,sPl); - return sP; + + sP=Stack(sPa,sPl); + return sP; } void SphericalJoint::UpdateForward_sP( Matrix& sP){ @@ -79,15 +81,15 @@ Matrix SphericalJoint::GetBackward_sP(){ cout<<" -----------"<position(1)); - sPl(2,3)=-(point2->position(1)); + sPa.Identity(); + sPl.Zeros(); + sPl(3,2)=(point2->position(1)); + sPl(2,3)=-(point2->position(1)); sP=Stack(sPa,sPl); - return sP; + return sP; } -void SphericalJoint::UpdateBackward_sP( Matrix& sP){ +void SphericalJoint::UpdateBackward_sP( Matrix& sP){ // sP is constant, do nothing. } @@ -96,106 +98,106 @@ void SphericalJoint::ComputeLocalTransform(){ // Obtain the transformation matrix from euler parameters EP_Transformation(q, ko_C_k); FastMult(pk_C_ko,ko_C_k,pk_C_k); - } + } void SphericalJoint::ForwardKinematics(){ Vect3 result1,result2,result3,result4,result5; Vect3 pk_w_k; - + //cout<<"Check in spherical "<position,result1); // parents basis - FastAdd(result1,point1->position,r12); - - // compute position vector r21 - FastNegMult(k_C_pk,r12,r21); - - - + // COMPUTE POSITION VECTOR R12 aka GAMMA + + FastNegMult(pk_C_k,point2->position,result1); // parents basis + FastAdd(result1,point1->position,r12); + + // compute position vector r21 + FastNegMult(k_C_pk,r12,r21); + + + //----------------------------------// - // COMPUTE GLOBAL LOCATION - FastMult(body1->n_C_k,(body1->GetPoint(2))->position,result1); - FastAdd(result1,body1->r,result1); - FastNegMult(body2->n_C_k,(body2->GetPoint(1))->position,result2); - FastAdd(result1,result2,body2->r); - - qdot_to_u(q, u, qdot); - - - //----------------------------------- - // angular velocities - + // COMPUTE GLOBAL LOCATION + FastMult(body1->n_C_k,(body1->GetPoint(2))->position,result1); + FastAdd(result1,body1->r,result1); + FastNegMult(body2->n_C_k,(body2->GetPoint(1))->position,result2); + FastAdd(result1,result2,body2->r); + + qdot_to_u(q, u, qdot); + + + //----------------------------------- + // angular velocities + FastAssign(u,pk_w_k); - FastTMult(pk_C_k,body1->omega_k,result1); + FastTMult(pk_C_k,body1->omega_k,result1); FastAdd(result1,pk_w_k,body2->omega_k); - FastMult(body2->n_C_k,body2->omega_k,body2->omega); - - - - //----------------------------------- - - // compute velocities - FastCross(body1->omega_k,(body1->GetPoint(2))->position,result1); + FastMult(body2->n_C_k,body2->omega_k,body2->omega); + + + + //----------------------------------- + + // compute velocities + FastCross(body1->omega_k,(body1->GetPoint(2))->position,result1); FastAdd(body1->v_k,result1,result2); - FastTMult(pk_C_k,result2,result1); // In body basis - - FastCross((body2->GetPoint(1))->position,body2->omega_k,result2); - FastAdd(result1,result2,body2->v_k); // In body basis - FastMult(body2->n_C_k,body2->v_k,body2->v); - - + FastTMult(pk_C_k,result2,result1); // In body basis + + FastCross((body2->GetPoint(1))->position,body2->omega_k,result2); + FastAdd(result1,result2,body2->v_k); // In body basis + FastMult(body2->n_C_k,body2->v_k,body2->v); + + //------------------------------------------ - //Compute the KE + //Compute the KE Matrix tempke; - tempke = T(body2->v)*(body2->v); + tempke = T(body2->v)*(body2->v); double ke = 0.0; - ke = body2->mass*tempke(1,1); + ke = body2->mass*tempke(1,1); FastMult(body2->inertia,body2->omega_k,result1); - tempke= T(body2->omega_k)*result1; + tempke= T(body2->omega_k)*result1; ke = 0.5*ke + 0.5*tempke(1,1); body2->KE=ke; - //----------------------------------- - // compute state explicit angular acceleration // Has to be in body basis - FastTMult(pk_C_k,body1->alpha_t,result2); + //----------------------------------- + // compute state explicit angular acceleration // Has to be in body basis + FastTMult(pk_C_k,body1->alpha_t,result2); FastCross(body2->omega_k,pk_w_k,result1); - FastAdd(result1,result2,body2->alpha_t); - - //----------------------------------- - // compute state explicit acceleration - // NEED TO DO THIS COMPLETELY IN BODY BASIS - + FastAdd(result1,result2,body2->alpha_t); + + //----------------------------------- + // compute state explicit acceleration + // NEED TO DO THIS COMPLETELY IN BODY BASIS + FastCross(body1->omega_k,(body1->GetPoint(2))->position,result1); - FastCross(body1->omega_k,result1,result2); - FastTMult(pk_C_k,result2,result1); - - //FastCross(body2->omega_k,-(body2->GetPoint(1))->position,result3); - FastCross((body2->GetPoint(1))->position,body2->omega_k,result3); - FastCross(body2->omega_k,result3,result2); - FastAdd(result1,result2,result3); //wxwxr in body basis - - FastCross(body1->alpha_t,(body1->GetPoint(2))->position,result4); - FastTMult(pk_C_k,result4,result5); + FastCross(body1->omega_k,result1,result2); + FastTMult(pk_C_k,result2,result1); + + //FastCross(body2->omega_k,-(body2->GetPoint(1))->position,result3); + FastCross((body2->GetPoint(1))->position,body2->omega_k,result3); + FastCross(body2->omega_k,result3,result2); + FastAdd(result1,result2,result3); //wxwxr in body basis + + FastCross(body1->alpha_t,(body1->GetPoint(2))->position,result4); + FastTMult(pk_C_k,result4,result5); FastAssign(result5,result4); - - FastCross((body2->GetPoint(1))->position,body2->alpha_t,result2); - FastAdd(result2,result4,result1); //alphaxr in body basis - + + FastCross((body2->GetPoint(1))->position,body2->alpha_t,result2); + FastAdd(result2,result4,result1); //alphaxr in body basis + FastTMult(pk_C_k,body1->a_t,result2); - FastTripleSum(result3,result1,result2,body2->a_t); // in body basis - - - //----------------------------------- + FastTripleSum(result3,result1,result2,body2->a_t); // in body basis + + + //----------------------------------- } // NOTE: NOT USING BACKWARDKINEMATICS AT PRESENT @@ -206,13 +208,13 @@ void SphericalJoint::BackwardKinematics(){ // orientations ComputeBackwardTransforms(); - + // compute position vector r21 //r21 = point2->position - k_C_pk * point1->position; FastMult(k_C_pk,point1->position,result1); FastSubt(point2->position,result1,r21); - + // compute position vector r21 FastNegMult(pk_C_k,r21,r12); @@ -231,7 +233,7 @@ void SphericalJoint::BackwardKinematics(){ EP_Derivatives(q,u,qdot); // angular velocities - + FastMult(body2->n_C_k,u,result2); FastAdd(body2->omega,result2,body1->omega); FastAssign(u,k_w_pk); @@ -251,7 +253,7 @@ void SphericalJoint::BackwardKinematics(){ FastCross(body1->omega_k,k_w_pk,result1); FastMult(pk_C_k,body2->alpha_t,result2); FastAdd(result1,result2,body1->alpha_t); - + // compute state explicit acceleration FastCross(body2->alpha_t,point2->position,result1); FastCross(body2->omega_k,point2->position,result2); @@ -264,5 +266,5 @@ void SphericalJoint::BackwardKinematics(){ FastCross(body1->omega_k,result2,result3); FastTripleSum(result5,result1,result3,body1->a_t); - + } diff --git a/lib/poems/sphericaljoint.h b/lib/poems/sphericaljoint.h index 90f1547873..db048e5544 100644 --- a/lib/poems/sphericaljoint.h +++ b/lib/poems/sphericaljoint.h @@ -22,6 +22,7 @@ #include "joint.h" #include "matrix.h" +namespace POEMS { class SphericalJoint : public Joint { Matrix const_sP; public: @@ -38,5 +39,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; - +} #endif diff --git a/lib/poems/system.cpp b/lib/poems/system.cpp index 1ac9ce1236..8515588424 100644 --- a/lib/poems/system.cpp +++ b/lib/poems/system.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: system.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -36,11 +36,12 @@ #include "vect3.h" #include "virtualmatrix.h" -class Point; - +namespace POEMS { class Point; } +using namespace std; +using namespace POEMS; System::System(){ - mappings = NULL; + mappings = NULL; } System::~System(){ @@ -59,7 +60,7 @@ int System::GetNumBodies(){ int * System::GetMappings() { - return mappings; + return mappings; } void System::AddBody(Body* body){ @@ -78,16 +79,16 @@ double System::GetTime(){ return time; } -void System::ComputeForces(){ - // NOT DOING ANYTHING AT THIS TIME - } - +void System::ComputeForces(){ + // NOT DOING ANYTHING AT THIS TIME + } + bool System::ReadIn(istream& in){ int numbodies; Body* body; int bodytype; char bodyname[256]; - int index; + int index; // get number of bodies in >> numbodies; @@ -165,12 +166,12 @@ bool System::ReadIn(istream& in){ delete [] bodyarray; return false; } - + joint->SetBodies(bodyarray[body1], bodyarray[body2]); bodyarray[body1]->AddJoint(joint); bodyarray[body2]->AddJoint(joint); - + in >> point1 >> point2; joint->SetPoints(bodyarray[body1]->GetPoint(point1),bodyarray[body2]->GetPoint(point2)); @@ -203,7 +204,7 @@ void System::WriteOut(ostream& out){ // set the body ID for later identification body->SetID(i); - + // write out the data body->WriteOut(out); @@ -211,7 +212,7 @@ void System::WriteOut(ostream& out){ } // number of joints - out << joints.GetNumElements() << endl; + out << joints.GetNumElements() << endl; // joints loop i = 0; @@ -226,7 +227,7 @@ void System::WriteOut(ostream& out){ // write out the data joint->WriteOut(out); - + i++; j_ele = j_ele->next; } } @@ -252,68 +253,68 @@ void System::ClearJointIDs(){ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space){ - //-------------------------------------------------------------------------// - // Declaring Temporary Entities - //-------------------------------------------------------------------------// + //-------------------------------------------------------------------------// + // Declaring Temporary Entities + //-------------------------------------------------------------------------// Body* body = NULL; Body* prev; Body* Inertial; Point* origin; Joint* joint; - Point* point_CM; - Point* point_p; - Point* point_k; + Point* point_CM; + Point* point_p; + Point* point_k; Point* point_ch = NULL; - Vect3 r1,r2,r3,v1,v2,v3; + Vect3 r1,r2,r3,v1,v2,v3; Mat3x3 IM, N, PKCK,PKCN ; ColMatrix qo, uo, q, qdot,w; - - mappings = new int[nfree]; - for(int i = 0; i < nfree; i++) - { - mappings[i] = freelist[i]; - } + + mappings = new int[nfree]; + for(int i = 0; i < nfree; i++) + { + mappings[i] = freelist[i]; + } qo.Dim(4); uo.Dim(3); q.Dim(4); - qdot.Dim(4); + qdot.Dim(4); PKCN.Identity(); PKCK.Identity(); w.Dim(3); - -//-------------------------------------------------------------------------// - // Setting up Inertial Frame, gravity and Origin + +//-------------------------------------------------------------------------// + // Setting up Inertial Frame, gravity and Origin //-------------------------------------------------------------------------// - Inertial= new InertialFrame; + Inertial= new InertialFrame; AddBody(Inertial); - - Vect3 temp1; - temp1.Zeros(); - ((InertialFrame*) Inertial)->SetGravity(temp1); + + Vect3 temp1; + temp1.Zeros(); + ((InertialFrame*) Inertial)->SetGravity(temp1); origin= new FixedPoint(temp1); - Inertial->AddPoint(origin); + Inertial->AddPoint(origin); +//-------------------------------------------------------------------------// + double ** xh1 = new double*[nfree]; + double ** xh2 = new double*[nfree]; + + for (int i=0; imass=masstotal[mappings[i]-1]; IM(1,1)=inertia[mappings[i]-1][0]; IM(2,2)=inertia[mappings[i]-1][1]; @@ -324,49 +325,49 @@ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstota IM(2,1)=IM(1,2); IM(3,1)=IM(1,3); IM(3,2)=IM(2,3); - body->inertia = IM; - -//-------------------------------------------------------// - - - for (int k=0;k<3;k++){ - r1(k+1)=xh1[i][k]-xcm[mappings[i]-1][k]; - r3(k+1) = xcm[mappings[i]-1][k]; - r3(k+1)=xh2[i][k]-xcm[mappings[i]-1][k]; - } - - r2.Zeros(); - - for (int k=1;k<=3;k++){ - N(k,1)=ex_space[mappings[i]-1][k-1]; - N(k,2)=ey_space[mappings[i]-1][k-1]; - N(k,3)=ez_space[mappings[i]-1][k-1]; - } - + body->inertia = IM; + +//-------------------------------------------------------// + + + for (int k=0;k<3;k++){ + r1(k+1)=xh1[i][k]-xcm[mappings[i]-1][k]; + r3(k+1) = xcm[mappings[i]-1][k]; + r3(k+1)=xh2[i][k]-xcm[mappings[i]-1][k]; + } + + r2.Zeros(); + + for (int k=1;k<=3;k++){ + N(k,1)=ex_space[mappings[i]-1][k-1]; + N(k,2)=ey_space[mappings[i]-1][k-1]; + N(k,3)=ez_space[mappings[i]-1][k-1]; + } + PKCK=T(N); PKCN=T(N); - - q.Zeros(); + + q.Zeros(); EP_FromTransformation(q,N); - + r1=PKCN*r1; r3=PKCN*r3; - + for (int k=1;k<=3;k++){ - w(k)=omega[mappings[i]-1][k-1]; - } - + w(k)=omega[mappings[i]-1][k-1]; + } + Vect3 cart_r, cart_v; for (int k=1;k<=3;k++){ - cart_r(k)=xcm[mappings[i]-1][k-1]; - cart_v(k)=vcm[mappings[i]-1][k-1]; - } - - w=PKCN*w; - EP_Derivatives(q,w,qdot); - - -//-------------------------------------------------------------------------// + cart_r(k)=xcm[mappings[i]-1][k-1]; + cart_v(k)=vcm[mappings[i]-1][k-1]; + } + + w=PKCN*w; + EP_Derivatives(q,w,qdot); + + +//-------------------------------------------------------------------------// // Create bodies and joints with associated properties for POEMS //-------------------------------------------------------------------------// @@ -376,12 +377,12 @@ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstota body->AddPoint(point_CM); body->AddPoint(point_k); body->AddPoint(point_ch); - AddBody(body); - + AddBody(body); + Mat3x3 One; - One.Identity(); - ColMatrix qq=Stack(q,cart_r); - ColMatrix vv=Stack(qdot,cart_v); + One.Identity(); + ColMatrix qq=Stack(q,cart_r); + ColMatrix vv=Stack(qdot,cart_v); joint=new FreeBodyJoint; AddJoint(joint); joint->SetBodies(prev,body); @@ -391,225 +392,225 @@ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstota joint->SetZeroOrientation(One); joint->DimQandU(7,6); joint->SetInitialState(qq,vv); - joint->ForwardKinematics(); + joint->ForwardKinematics(); } for(int i = 0; i < nfree; i++) { - delete [] xh1[i]; - delete [] xh2[i]; + delete [] xh1[i]; + delete [] xh2[i]; } delete [] xh1; - delete [] xh2; + delete [] xh2; } void System::Create_System_LAMMPS(int numbodies, double *mass,double **inertia, double ** xcm, double ** xjoint,double **vcm,double **omega,double **ex_space, double **ey_space, double **ez_space, int b, int * mapping, int count){ - //-------------------------------------------------------------------------// - // Declaring Temporary Entities - //-------------------------------------------------------------------------// - - Body* body = NULL; - Body* prev; - Body* Inertial; - Point* origin; - Joint* joint; - Point* point_CM; - Point* point_p; - Point* point_k; - Point* point_ch = NULL; - Vect3 r1,r2,r3,v1,v2,v3; - Mat3x3 IM, N, PKCK,PKCN ; - ColMatrix qo, uo, q, qdot,w; - Vect3 cart_r, cart_v; - mappings = new int[b]; - for(int i = 0; i < b; i++){ - mappings[i] = mapping[i]; - } - - - qo.Dim(4); - uo.Dim(3); - q.Dim(4); - qdot.Dim(4); - PKCN.Identity(); - PKCK.Identity(); - w.Dim(3); - - //-------------------------------------------------------------------------// - // Setting up Inertial Frame, gravity and Origin - //-------------------------------------------------------------------------// - Inertial= new InertialFrame; - AddBody(Inertial); - - Vect3 temp1; - temp1.Zeros(); - ((InertialFrame*) Inertial)->SetGravity(temp1); - origin= new FixedPoint(temp1); - Inertial->AddPoint(origin); - //-------------------------------------------------------------------------// - - double ** xh1; - double ** xh2; - - xh1 = new double*[b]; - xh2 = new double*[b]; - - - for (int i=0; iSetGravity(temp1); + origin= new FixedPoint(temp1); + Inertial->AddPoint(origin); + //-------------------------------------------------------------------------// + + double ** xh1; + double ** xh2; + + xh1 = new double*[b]; + xh2 = new double*[b]; + + + for (int i=0; imass=mass[mapping[i]-1]; - IM(1,1)=inertia[mapping[i]-1][0]; - IM(2,2)=inertia[mapping[i]-1][1]; - IM(3,3)=inertia[mapping[i]-1][2]; - IM(1,2)=0.0; - IM(1,3)=0.0; - IM(2,3)=0.0; - IM(2,1)=IM(1,2); - IM(3,1)=IM(1,3); - IM(3,2)=IM(2,3); - body->inertia = IM; - - //-------------------------------------------------------// - - for (int k=0;k<3;k++){ - r1(k+1)=xh1[i][k]-xcm[mapping[i]-1][k]; - r3(k+1)=xh2[i][k]-xcm[mapping[i]-1][k]; - } - r2.Zeros(); - - for (int k=1;k<=3;k++){ - N(k,1)=ex_space[mapping[i]-1][k-1]; - N(k,2)=ey_space[mapping[i]-1][k-1]; - N(k,3)=ez_space[mapping[i]-1][k-1]; - } - - - if (i==0){ - PKCK=T(N); - PKCN=T(N); - - q.Zeros(); - EP_FromTransformation(q,N); - - r1=PKCN*r1; - r3=PKCN*r3; - - for (int k=1;k<=3;k++){ - w(k)=omega[mappings[i]-1][k-1]; - } - - for (int k=1;k<=3;k++){ - cart_r(k)=xcm[mappings[i]-1][k-1]; - cart_v(k)=vcm[mappings[i]-1][k-1]; - } - w=PKCN*w; - EP_Derivatives(q,w,qdot); - - } - else{ - PKCK=PKCN*N; - PKCN=T(N); - - q.Zeros(); - EP_FromTransformation(q,PKCK); - - r1=PKCN*r1; - r3=PKCN*r3; - - for (int k=1;k<=3;k++){ - w(k)=omega[mapping[i]-1][k-1]-omega[mapping[i-1]-1][k-1]; - } - - w=PKCN*w; - EP_Derivatives(q, w, qdot); - } - - - //-------------------------------------------------------------------------// + //-------------------------------------------------------------------------// + for(int i=0;imass=mass[mapping[i]-1]; + IM(1,1)=inertia[mapping[i]-1][0]; + IM(2,2)=inertia[mapping[i]-1][1]; + IM(3,3)=inertia[mapping[i]-1][2]; + IM(1,2)=0.0; + IM(1,3)=0.0; + IM(2,3)=0.0; + IM(2,1)=IM(1,2); + IM(3,1)=IM(1,3); + IM(3,2)=IM(2,3); + body->inertia = IM; + + //-------------------------------------------------------// + + for (int k=0;k<3;k++){ + r1(k+1)=xh1[i][k]-xcm[mapping[i]-1][k]; + r3(k+1)=xh2[i][k]-xcm[mapping[i]-1][k]; + } + r2.Zeros(); + + for (int k=1;k<=3;k++){ + N(k,1)=ex_space[mapping[i]-1][k-1]; + N(k,2)=ey_space[mapping[i]-1][k-1]; + N(k,3)=ez_space[mapping[i]-1][k-1]; + } + + + if (i==0){ + PKCK=T(N); + PKCN=T(N); + + q.Zeros(); + EP_FromTransformation(q,N); + + r1=PKCN*r1; + r3=PKCN*r3; + + for (int k=1;k<=3;k++){ + w(k)=omega[mappings[i]-1][k-1]; + } + + for (int k=1;k<=3;k++){ + cart_r(k)=xcm[mappings[i]-1][k-1]; + cart_v(k)=vcm[mappings[i]-1][k-1]; + } + w=PKCN*w; + EP_Derivatives(q,w,qdot); + + } + else{ + PKCK=PKCN*N; + PKCN=T(N); + + q.Zeros(); + EP_FromTransformation(q,PKCK); + + r1=PKCN*r1; + r3=PKCN*r3; + + for (int k=1;k<=3;k++){ + w(k)=omega[mapping[i]-1][k-1]-omega[mapping[i-1]-1][k-1]; + } + + w=PKCN*w; + EP_Derivatives(q, w, qdot); + } + + + //-------------------------------------------------------------------------// // Create bodies and joints with associated properties for POEMS - //-------------------------------------------------------------------------// - - point_CM = new FixedPoint(r2); - point_k = new FixedPoint(r1); - point_ch = new FixedPoint(r3); - body->AddPoint(point_CM); - body->AddPoint(point_k); - body->AddPoint(point_ch); - AddBody(body); - - Mat3x3 One; - One.Identity(); - if (i==0){ - ColMatrix qq=Stack(q,cart_r); - ColMatrix vv=Stack(qdot,cart_v); - joint=new FreeBodyJoint; - AddJoint(joint); - joint->SetBodies(prev,body); - body->AddJoint(joint); - prev->AddJoint(joint); - joint->SetPoints(point_p,point_k); - joint->SetZeroOrientation(One); - joint->DimQandU(7,6); - joint->SetInitialState(qq,vv); - joint->ForwardKinematics(); - } - else{ - joint= new SphericalJoint; - AddJoint(joint); - joint->SetBodies(prev,body); - body->AddJoint(joint); - prev->AddJoint(joint); - joint->SetPoints(point_p,point_k); - joint->SetZeroOrientation(One); - joint->DimQandU(4,3); - joint->SetInitialState(q,qdot); - joint->ForwardKinematics(); - } - } - for(int i = 0; i < b; i++) - { - delete [] xh1[i]; - delete [] xh2[i]; - } - delete [] xh1; - delete [] xh2; - + //-------------------------------------------------------------------------// + + point_CM = new FixedPoint(r2); + point_k = new FixedPoint(r1); + point_ch = new FixedPoint(r3); + body->AddPoint(point_CM); + body->AddPoint(point_k); + body->AddPoint(point_ch); + AddBody(body); + + Mat3x3 One; + One.Identity(); + if (i==0){ + ColMatrix qq=Stack(q,cart_r); + ColMatrix vv=Stack(qdot,cart_v); + joint=new FreeBodyJoint; + AddJoint(joint); + joint->SetBodies(prev,body); + body->AddJoint(joint); + prev->AddJoint(joint); + joint->SetPoints(point_p,point_k); + joint->SetZeroOrientation(One); + joint->DimQandU(7,6); + joint->SetInitialState(qq,vv); + joint->ForwardKinematics(); + } + else{ + joint= new SphericalJoint; + AddJoint(joint); + joint->SetBodies(prev,body); + body->AddJoint(joint); + prev->AddJoint(joint); + joint->SetPoints(point_p,point_k); + joint->SetZeroOrientation(One); + joint->DimQandU(4,3); + joint->SetInitialState(q,qdot); + joint->ForwardKinematics(); + } + } + for(int i = 0; i < b; i++) + { + delete [] xh1[i]; + delete [] xh2[i]; + } + delete [] xh1; + delete [] xh2; + } diff --git a/lib/poems/system.h b/lib/poems/system.h index e5ce27194b..2402e5852f 100644 --- a/lib/poems/system.h +++ b/lib/poems/system.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: system.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -22,6 +22,7 @@ #include #include "poemslist.h" +namespace POEMS { class Body; class Joint; @@ -33,37 +34,37 @@ double time; List bodies; List joints; - + System(); ~System(); void Delete(); - + int GetNumBodies(); - + int * GetMappings(); void AddBody(Body* body); - + void AddJoint(Joint* joint); - + void SetTime(double t); - + double GetTime(); - + void ComputeForces(); - + bool ReadIn(std::istream& in); - + void WriteOut(std::ostream& out); - + void ClearBodyIDs(); - - void ClearJointIDs(); + + void ClearJointIDs(); void Create_System_LAMMPS(int numbodies, double *mass,double **inertia, double ** xcm, double ** xjoint,double **vh1,double **omega,double **ex_space, double **ey_space, double **ez_space, int b, int * mapping, int count); - + void Create_DegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space); }; - +} #endif diff --git a/lib/poems/vect3.cpp b/lib/poems/vect3.cpp index 7ce3230238..66c2f902d5 100644 --- a/lib/poems/vect3.cpp +++ b/lib/poems/vect3.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + Vect3::Vect3(){ numrows = 3; numcols = 1; diff --git a/lib/poems/vect3.h b/lib/poems/vect3.h index a28832db6c..6b0efc371a 100644 --- a/lib/poems/vect3.h +++ b/lib/poems/vect3.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: vect3.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -23,6 +23,7 @@ #include "virtualcolmatrix.h" #include "virtualmatrix.h" +namespace POEMS { class Matrix; class Mat3x3; class Mat6x6; @@ -82,7 +83,6 @@ public: friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); friend void FastAssign(ColMatrix&A, Vect3& C); friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); - }; - +} #endif diff --git a/lib/poems/vect4.cpp b/lib/poems/vect4.cpp index b045998017..8e903d57bd 100644 --- a/lib/poems/vect4.cpp +++ b/lib/poems/vect4.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + Vect4::Vect4(){ numrows = 4; numcols = 1; diff --git a/lib/poems/vect4.h b/lib/poems/vect4.h index 0b28994043..754706f10a 100644 --- a/lib/poems/vect4.h +++ b/lib/poems/vect4.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: vect4.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -23,6 +23,7 @@ #include "virtualcolmatrix.h" #include "virtualmatrix.h" +namespace POEMS { class Matrix; class Mat4x4; @@ -41,7 +42,7 @@ public: void BasicSet_1int(int i, double value); void BasicIncrement_1int(int i, double value); - + void Const(double value); MatrixType GetType() const; std::ostream& WriteData(std::ostream& c) const; @@ -69,5 +70,5 @@ public: friend void FastAdd(Vect4& A, Vect4& B, Vect4& C); friend void FastSubt(Vect4& A, Vect4& B, Vect4& C); }; - +} #endif diff --git a/lib/poems/vect6.cpp b/lib/poems/vect6.cpp index 5baadafc34..5aabe520e1 100644 --- a/lib/poems/vect6.cpp +++ b/lib/poems/vect6.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + Vect6::Vect6(){ numrows = 6; numcols = 1; diff --git a/lib/poems/vect6.h b/lib/poems/vect6.h index 8047c1bbf8..5def4c6b1b 100644 --- a/lib/poems/vect6.h +++ b/lib/poems/vect6.h @@ -23,6 +23,7 @@ #include "virtualcolmatrix.h" #include "virtualmatrix.h" +namespace POEMS { class Matrix; class Mat6x6; class ColMatrix; @@ -69,5 +70,5 @@ public: friend void OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV); }; - +} #endif diff --git a/lib/poems/virtualcolmatrix.cpp b/lib/poems/virtualcolmatrix.cpp index 3a6c6e22cd..fa430b81f7 100644 --- a/lib/poems/virtualcolmatrix.cpp +++ b/lib/poems/virtualcolmatrix.cpp @@ -20,6 +20,8 @@ #include using namespace std; +using namespace POEMS; + VirtualColMatrix::VirtualColMatrix(){ numcols = 1; diff --git a/lib/poems/virtualcolmatrix.h b/lib/poems/virtualcolmatrix.h index 1548794ca0..040fce051e 100644 --- a/lib/poems/virtualcolmatrix.h +++ b/lib/poems/virtualcolmatrix.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: virtualcolmatrix.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,25 +21,25 @@ #include "virtualmatrix.h" - +namespace POEMS { class VirtualColMatrix : public VirtualMatrix { -public: - VirtualColMatrix(); - ~VirtualColMatrix(); - double& operator_2int (int i, int j); // array access - double Get_2int (int i, int j) const; - void Set_2int (int i, int j, double value); - double BasicGet_2int(int i, int j) const; - void BasicSet_2int(int i, int j, double value); - void BasicIncrement_2int(int i, int j, double value); - - virtual double& operator_1int (int i) = 0; // array access - virtual double Get_1int(int i) const = 0; - virtual void Set_1int(int i, double value) = 0; - virtual double BasicGet_1int(int i) const = 0; - virtual void BasicSet_1int(int i, double value) = 0; - virtual void BasicIncrement_1int(int i, double value) = 0; +public: + VirtualColMatrix(); + ~VirtualColMatrix(); + double& operator_2int (int i, int j); // array access + double Get_2int (int i, int j) const; + void Set_2int (int i, int j, double value); + double BasicGet_2int(int i, int j) const; + void BasicSet_2int(int i, int j, double value); + void BasicIncrement_2int(int i, int j, double value); + + virtual double& operator_1int (int i) = 0; // array access + virtual double Get_1int(int i) const = 0; + virtual void Set_1int(int i, double value) = 0; + virtual double BasicGet_1int(int i) const = 0; + virtual void BasicSet_1int(int i, double value) = 0; + virtual void BasicIncrement_1int(int i, double value) = 0; }; - +} #endif diff --git a/lib/poems/virtualmatrix.cpp b/lib/poems/virtualmatrix.cpp index 19d5946961..bfffeb3d74 100644 --- a/lib/poems/virtualmatrix.cpp +++ b/lib/poems/virtualmatrix.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + VirtualMatrix::VirtualMatrix(){ numrows = numcols = 0; @@ -140,14 +142,14 @@ istream& VirtualMatrix::ReadData(istream& c){ // operators and functions // -ostream& operator<< (ostream& c, const VirtualMatrix& A){ //output +ostream& POEMS::operator<< (ostream& c, const VirtualMatrix& A){ //output c << A.GetType() << ' '; A.WriteData(c); c << endl; return c; } -istream& operator>> (istream& c, VirtualMatrix& A){ //input +istream& POEMS::operator>> (istream& c, VirtualMatrix& A){ //input VirtualMatrix* vm; int matrixtype; c >> matrixtype; diff --git a/lib/poems/virtualmatrix.h b/lib/poems/virtualmatrix.h index a27c7de047..706b943d66 100644 --- a/lib/poems/virtualmatrix.h +++ b/lib/poems/virtualmatrix.h @@ -20,6 +20,7 @@ #define VIRTUALMATRIX_H #include +namespace POEMS { enum MatrixType { MATRIX = 0, COLMATRIX = 1, @@ -83,5 +84,5 @@ protected: // overloaded operators std::ostream& operator<< (std::ostream& c, const VirtualMatrix& A); // output std::istream& operator>> (std::istream& c, VirtualMatrix& A); // input - +} #endif diff --git a/lib/poems/virtualrowmatrix.cpp b/lib/poems/virtualrowmatrix.cpp index 1a12cfbfd9..740c747407 100644 --- a/lib/poems/virtualrowmatrix.cpp +++ b/lib/poems/virtualrowmatrix.cpp @@ -21,6 +21,8 @@ #include using namespace std; +using namespace POEMS; + VirtualRowMatrix::VirtualRowMatrix(){ numrows = 1; diff --git a/lib/poems/virtualrowmatrix.h b/lib/poems/virtualrowmatrix.h index 68b39f137d..0a3c877f64 100644 --- a/lib/poems/virtualrowmatrix.h +++ b/lib/poems/virtualrowmatrix.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: virtualrowmatrix.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,8 +21,9 @@ #include "virtualmatrix.h" +namespace POEMS { class VirtualRowMatrix : public VirtualMatrix { -public: +public: VirtualRowMatrix(); ~VirtualRowMatrix(); double& operator_2int (int i, int j); // array access @@ -31,7 +32,7 @@ public: double BasicGet_2int(int i, int j) const; void BasicSet_2int(int i, int j, double value); void BasicIncrement_2int(int i, int j, double value); - + virtual double& operator_1int (int i) = 0; // array access virtual double Get_1int(int i) const = 0; virtual void Set_1int(int i, double value) = 0; @@ -39,5 +40,5 @@ public: virtual void BasicSet_1int(int i, double value) = 0; virtual void BasicIncrement_1int(int i, double value) = 0; }; - +} #endif diff --git a/lib/poems/workspace.cpp b/lib/poems/workspace.cpp index 29a1c95832..03f18a7895 100644 --- a/lib/poems/workspace.cpp +++ b/lib/poems/workspace.cpp @@ -38,6 +38,8 @@ using namespace std; +using namespace POEMS; + void Workspace::allocateNewSystem() { currentIndex++; diff --git a/lib/poems/workspace.h b/lib/poems/workspace.h index 6213815d81..2510b2fc3a 100644 --- a/lib/poems/workspace.h +++ b/lib/poems/workspace.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: workspace.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -19,61 +19,62 @@ #ifndef WORKSPACE_H #define WORKSPACE_H +namespace POEMS { class System; class Solver; struct SysData{ - System * system; - int solver; - int integrator; + System * system; + int solver; + int integrator; }; class Workspace { - SysData * system; // the multibody systems data - int currentIndex; - int maxAlloc; - + SysData * system; // the multibody systems data + int currentIndex; + int maxAlloc; + public: Workspace(); ~Workspace(); - + double Thalf; double Tfull; double ConFac; double KE_val; - int FirstTime; - + int FirstTime; + bool LoadFile(char* filename); - + bool SaveFile(char* filename, int index = -1); System* GetSystem(int index = -1); - - void AddSolver(Solver* s, int index = -1); - - - void LobattoOne(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); - - void LobattoTwo(double **&vcm,double **&omega,double **&torque, double **&fcm); - - + + void AddSolver(Solver* s, int index = -1); + + + void LobattoOne(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); + + void LobattoTwo(double **&vcm,double **&omega,double **&torque, double **&fcm); + + bool MakeSystem(int& nbody, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space, int &njoint, int **&jointbody, double **&xjoint, int& nfree, int*freelist, double dthalf, double dtv, double tempcon, double KE); - - - bool SaveSystem(int& nbody, double *&masstotal, double **&inertia, double **&xcm, double **&xjoint, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space, double **&acm, double **&alpha, double **&torque, double **&fcm, int **&jointbody, int &njoint); - - bool MakeDegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space); + + + bool SaveSystem(int& nbody, double *&masstotal, double **&inertia, double **&xcm, double **&xjoint, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space, double **&acm, double **&alpha, double **&torque, double **&fcm, int **&jointbody, int &njoint); + + bool MakeDegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space); int getNumberOfSystems(); - + void SetLammpsValues(double dtv, double dthalf, double tempcon); void SetKE(int temp, double SysKE); - - void RKStep(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); - - void WriteFile(char* filename); + + void RKStep(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); + + void WriteFile(char* filename); private: - void allocateNewSystem(); //helper function to handle vector resizing and such for the array of system pointers + void allocateNewSystem(); //helper function to handle vector resizing and such for the array of system pointers }; - +} #endif diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 6d943a79db..21c12f700b 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -20,7 +20,6 @@ #include "fix_poems.h" #include #include -#include #include #include #include "workspace.h" @@ -30,7 +29,6 @@ #include "respa.h" #include "modify.h" #include "force.h" -#include "output.h" #include "group.h" #include "comm.h" #include "citeme.h" @@ -265,7 +263,7 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : // create POEMS instance - poems = new Workspace; + poems = new POEMS::Workspace; // compute per body forces and torques inside final_integrate() by default diff --git a/src/POEMS/fix_poems.h b/src/POEMS/fix_poems.h index 7b2c77a1bd..87f9557ac0 100644 --- a/src/POEMS/fix_poems.h +++ b/src/POEMS/fix_poems.h @@ -22,6 +22,7 @@ FixStyle(poems,FixPOEMS) #include "fix.h" +namespace POEMS { class Workspace; } namespace LAMMPS_NS { class FixPOEMS : public Fix { @@ -94,7 +95,7 @@ class FixPOEMS : public Fix { // POEMS object - class Workspace *poems; + POEMS::Workspace *poems; // internal class functions -- GitLab From fa15bf5edd552cafcfb5cfd28edc2ad327015921 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 Jul 2019 00:25:33 -0400 Subject: [PATCH 125/236] recover compilation of USER-COLVARS package --- src/USER-COLVARS/colvarproxy_lammps.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/USER-COLVARS/colvarproxy_lammps.h b/src/USER-COLVARS/colvarproxy_lammps.h index c3d9dbb35f..3243a14fbd 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.h +++ b/src/USER-COLVARS/colvarproxy_lammps.h @@ -38,6 +38,12 @@ inline std::ostream & operator<< (std::ostream &out, const commdata &cd) return out; } +// forward declarations +namespace LAMMPS_NS { + class LAMMPS; + class RanPark; +} + /// \brief Communication between colvars and LAMMPS /// (implementation of \link colvarproxy \endlink) class colvarproxy_lammps : public colvarproxy { @@ -46,8 +52,8 @@ class colvarproxy_lammps : public colvarproxy { protected: // pointers to LAMMPS class instances - class LAMMPS_NS::LAMMPS *_lmp; - class LAMMPS_NS::RanPark *_random; + LAMMPS_NS::LAMMPS *_lmp; + LAMMPS_NS::RanPark *_random; // state of LAMMPS properties double t_target, my_timestep, my_boltzmann, my_angstrom; -- GitLab From 732bd937e0416d46be708778bd234cd3e0c9ba97 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 Jul 2019 01:16:56 -0400 Subject: [PATCH 126/236] clean up includes in USER-COLVARS package --- src/USER-COLVARS/colvarproxy_lammps.cpp | 13 +-------- src/USER-COLVARS/colvarproxy_lammps.h | 39 +++++++------------------ src/USER-COLVARS/fix_colvars.cpp | 25 ++++++++++++---- src/USER-COLVARS/fix_colvars.h | 5 ++-- src/USER-COLVARS/group_ndx.cpp | 3 +- src/USER-COLVARS/ndx_group.cpp | 4 +-- 6 files changed, 36 insertions(+), 53 deletions(-) diff --git a/src/USER-COLVARS/colvarproxy_lammps.cpp b/src/USER-COLVARS/colvarproxy_lammps.cpp index 685c698ab6..2c43a3fb26 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.cpp +++ b/src/USER-COLVARS/colvarproxy_lammps.cpp @@ -10,30 +10,19 @@ #include "colvarproxy_lammps.h" #include -#include #include -#include - #include -#include #include - #include -#include +#include #include #include "lammps.h" -#include "atom.h" #include "error.h" #include "output.h" #include "random_park.h" -#include "fix_colvars.h" - #include "colvarmodule.h" -#include "colvar.h" -#include "colvarbias.h" -#include "colvaratoms.h" #include "colvarproxy.h" #define HASH_FAIL -1 diff --git a/src/USER-COLVARS/colvarproxy_lammps.h b/src/USER-COLVARS/colvarproxy_lammps.h index 3243a14fbd..8ed03309a3 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.h +++ b/src/USER-COLVARS/colvarproxy_lammps.h @@ -10,39 +10,22 @@ #ifndef COLVARPROXY_LAMMPS_H #define COLVARPROXY_LAMMPS_H -#include "colvarproxy_lammps_version.h" - -#include "colvarmodule.h" -#include "colvarproxy.h" -#include "colvarvalue.h" - -#include "lammps.h" -#include "domain.h" -#include "force.h" -#include "update.h" +#include "colvarproxy_lammps_version.h" // IWYU pragma: export +#include +#include #include #include -#include -/* struct for packed data communication of coordinates and forces. */ -struct commdata { - int tag,type; - double x,y,z,m,q; -}; +#include "colvarmodule.h" +#include "colvarproxy.h" +#include "colvartypes.h" -inline std::ostream & operator<< (std::ostream &out, const commdata &cd) -{ - out << " (" << cd.tag << "/" << cd.type << ": " - << cd.x << ", " << cd.y << ", " << cd.z << ") "; - return out; -} - -// forward declarations -namespace LAMMPS_NS { - class LAMMPS; - class RanPark; -} +#include "random_park.h" +#include "lammps.h" // IWYU pragma: keep +#include "domain.h" // IWYU pragma: keep +#include "force.h" // IWYU pragma: keep +#include "update.h" // IWYU pragma: keep /// \brief Communication between colvars and LAMMPS /// (implementation of \link colvarproxy \endlink) diff --git a/src/USER-COLVARS/fix_colvars.cpp b/src/USER-COLVARS/fix_colvars.cpp index 9331fe7abb..4a57e59fbd 100644 --- a/src/USER-COLVARS/fix_colvars.cpp +++ b/src/USER-COLVARS/fix_colvars.cpp @@ -25,26 +25,28 @@ ------------------------------------------------------------------------- */ #include "fix_colvars.h" -#include -#include +#include #include #include -#include +#include +#include +#include +#include #include "atom.h" #include "comm.h" #include "domain.h" #include "error.h" -#include "group.h" +#include "force.h" #include "memory.h" #include "modify.h" -#include "random_park.h" #include "respa.h" #include "universe.h" #include "update.h" #include "citeme.h" #include "colvarproxy_lammps.h" +#include "colvarmodule.h" static const char colvars_pub[] = "fix colvars command:\n\n" @@ -57,6 +59,19 @@ static const char colvars_pub[] = " note = {doi: 10.1080/00268976.2013.813594}\n" "}\n\n"; +/* struct for packed data communication of coordinates and forces. */ +struct LAMMPS_NS::commdata { + int tag,type; + double x,y,z,m,q; +}; + +inline std::ostream & operator<< (std::ostream &out, const LAMMPS_NS::commdata &cd) +{ + out << " (" << cd.tag << "/" << cd.type << ": " + << cd.x << ", " << cd.y << ", " << cd.z << ") "; + return out; +} + /* re-usable integer hash table code with static linkage. */ /** hash table top level data structure */ diff --git a/src/USER-COLVARS/fix_colvars.h b/src/USER-COLVARS/fix_colvars.h index a0c197fca4..985457e746 100644 --- a/src/USER-COLVARS/fix_colvars.h +++ b/src/USER-COLVARS/fix_colvars.h @@ -34,10 +34,9 @@ FixStyle(colvars,FixColvars) #define LMP_FIX_COLVARS_H #include "fix.h" +#include -// forward declaration class colvarproxy_lammps; -struct commdata; namespace LAMMPS_NS { @@ -64,7 +63,7 @@ class FixColvars : public Fix { virtual void restart(char *); protected: - class colvarproxy_lammps *proxy; // pointer to the colvars proxy class + colvarproxy_lammps *proxy; // pointer to the colvars proxy class char *conf_file; // name of colvars config file char *inp_name; // name/prefix of colvars restart file char *out_name; // prefix string for all output files diff --git a/src/USER-COLVARS/group_ndx.cpp b/src/USER-COLVARS/group_ndx.cpp index 7350712c40..1e37e2de9c 100644 --- a/src/USER-COLVARS/group_ndx.cpp +++ b/src/USER-COLVARS/group_ndx.cpp @@ -17,12 +17,11 @@ ------------------------------------------------------------------------- */ #include "group_ndx.h" -#include +#include #include #include "atom.h" #include "comm.h" #include "group.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-COLVARS/ndx_group.cpp b/src/USER-COLVARS/ndx_group.cpp index 5436ba7b6b..a1369df2fb 100644 --- a/src/USER-COLVARS/ndx_group.cpp +++ b/src/USER-COLVARS/ndx_group.cpp @@ -17,14 +17,12 @@ ------------------------------------------------------------------------- */ #include "ndx_group.h" -#include +#include #include #include #include "atom.h" #include "comm.h" #include "group.h" -#include "memory.h" -#include "force.h" #include "error.h" using namespace LAMMPS_NS; -- GitLab From b4cf4b1ed7d976dba74536659bd59c1887f1f546 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 Jul 2019 06:51:52 -0400 Subject: [PATCH 127/236] recover compilation of KOKKOS package --- src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 7a2fca47a0..27a7a59c2a 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -20,6 +20,7 @@ #include #include #include +#include "atom_kokkos.h" #include "atom_vec.h" #include "comm.h" #include "update.h" -- GitLab From ce6fa0118ab69fd09fa19410f6bbfec3608f0f73 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 4 Jul 2019 07:23:01 -0400 Subject: [PATCH 128/236] continuing to clean up include file lists --- src/pair_lj_cut_coul_wolf.cpp | 7 +------ src/pair_lj_expand.cpp | 3 +-- src/pair_lj_gromacs.cpp | 5 +---- src/pair_lj_gromacs_coul_gromacs.cpp | 4 +--- src/pair_lj_smooth.cpp | 3 +-- src/pair_lj_smooth_linear.cpp | 3 +-- src/pair_mie_cut.cpp | 4 +--- src/pair_morse.cpp | 3 +-- src/pair_soft.cpp | 4 +--- src/pair_table.cpp | 1 + src/pair_ufm.cpp | 10 +--------- src/pair_yukawa.cpp | 2 +- src/pair_zbl.cpp | 10 ---------- src/pair_zero.cpp | 4 +--- src/procmap.cpp | 8 +++++--- src/rcb.cpp | 1 - src/read_data.cpp | 4 ---- src/read_dump.cpp | 8 +------- src/read_restart.cpp | 2 -- src/reader.cpp | 1 - src/reader_xyz.cpp | 2 -- src/region.cpp | 1 - src/region_block.cpp | 1 - src/region_cone.cpp | 1 - src/region_cylinder.cpp | 1 - src/region_intersect.cpp | 1 - src/region_plane.cpp | 2 -- src/region_prism.cpp | 2 -- src/region_sphere.cpp | 1 - src/region_union.cpp | 1 - src/replicate.cpp | 3 +-- src/rerun.cpp | 1 - src/reset_ids.cpp | 1 + src/respa.cpp | 4 +--- src/run.cpp | 1 - src/set.cpp | 4 +--- src/special.cpp | 2 -- src/thermo.cpp | 5 ----- src/thermo.h | 3 --- 39 files changed, 23 insertions(+), 101 deletions(-) diff --git a/src/pair_lj_cut_coul_wolf.cpp b/src/pair_lj_cut_coul_wolf.cpp index fb641f7d24..00a5832529 100644 --- a/src/pair_lj_cut_coul_wolf.cpp +++ b/src/pair_lj_cut_coul_wolf.cpp @@ -16,18 +16,13 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_coul_wolf.h" +#include #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/pair_lj_expand.cpp b/src/pair_lj_expand.cpp index 60593fd01d..a5184bc2f5 100644 --- a/src/pair_lj_expand.cpp +++ b/src/pair_lj_expand.cpp @@ -12,9 +12,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_expand.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/pair_lj_gromacs.cpp b/src/pair_lj_gromacs.cpp index 4796c288d7..baef482ef9 100644 --- a/src/pair_lj_gromacs.cpp +++ b/src/pair_lj_gromacs.cpp @@ -16,14 +16,11 @@ ------------------------------------------------------------------------- */ #include "pair_lj_gromacs.h" +#include #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/pair_lj_gromacs_coul_gromacs.cpp b/src/pair_lj_gromacs_coul_gromacs.cpp index 45beeb1daf..c62944b6a1 100644 --- a/src/pair_lj_gromacs_coul_gromacs.cpp +++ b/src/pair_lj_gromacs_coul_gromacs.cpp @@ -16,10 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_gromacs_coul_gromacs.h" +#include #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_smooth.cpp b/src/pair_lj_smooth.cpp index d89fee1148..7c7eb51b53 100644 --- a/src/pair_lj_smooth.cpp +++ b/src/pair_lj_smooth.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_smooth.h" +#include #include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_lj_smooth_linear.cpp b/src/pair_lj_smooth_linear.cpp index 6ed19a452f..a3e4aed2fe 100644 --- a/src/pair_lj_smooth_linear.cpp +++ b/src/pair_lj_smooth_linear.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_smooth_linear.h" +#include #include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/pair_mie_cut.cpp b/src/pair_mie_cut.cpp index d2b0c20cd5..46657687f6 100644 --- a/src/pair_mie_cut.cpp +++ b/src/pair_mie_cut.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_mie_cut.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" @@ -27,7 +26,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory.h" diff --git a/src/pair_morse.cpp b/src/pair_morse.cpp index 47102932db..d088f98bf4 100644 --- a/src/pair_morse.cpp +++ b/src/pair_morse.cpp @@ -12,9 +12,8 @@ ------------------------------------------------------------------------- */ #include "pair_morse.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/pair_soft.cpp b/src/pair_soft.cpp index f3d7423b04..6f821e684b 100644 --- a/src/pair_soft.cpp +++ b/src/pair_soft.cpp @@ -12,14 +12,12 @@ ------------------------------------------------------------------------- */ #include "pair_soft.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" #include "force.h" -#include "update.h" #include "neigh_list.h" #include "math_const.h" #include "memory.h" diff --git a/src/pair_table.cpp b/src/pair_table.cpp index 63cda78c67..9fcbc3ee9f 100644 --- a/src/pair_table.cpp +++ b/src/pair_table.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/pair_ufm.cpp b/src/pair_ufm.cpp index 40b72136ff..8cc4d2796f 100644 --- a/src/pair_ufm.cpp +++ b/src/pair_ufm.cpp @@ -18,25 +18,17 @@ ------------------------------------------------------------------------- */ #include "pair_ufm.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/pair_yukawa.cpp b/src/pair_yukawa.cpp index 4a2cf23952..e8775c9668 100644 --- a/src/pair_yukawa.cpp +++ b/src/pair_yukawa.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include "pair_yukawa.h" +#include #include -#include #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/pair_zbl.cpp b/src/pair_zbl.cpp index b01c301785..199e4f0907 100644 --- a/src/pair_zbl.cpp +++ b/src/pair_zbl.cpp @@ -17,19 +17,10 @@ #include "pair_zbl.h" #include -#include -#include -#include #include "atom.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" -#include "math_const.h" #include "memory.h" #include "error.h" @@ -37,7 +28,6 @@ // "The Stopping and Range of Ions in Matter" volume 1, Pergamon, 1985. using namespace LAMMPS_NS; -using namespace MathConst; using namespace PairZBLConstants; /* ---------------------------------------------------------------------- */ diff --git a/src/pair_zero.cpp b/src/pair_zero.cpp index 2692710e20..403bd73944 100644 --- a/src/pair_zero.cpp +++ b/src/pair_zero.cpp @@ -16,9 +16,7 @@ ------------------------------------------------------------------------- */ #include "pair_zero.h" -#include -#include -#include +#include #include #include "atom.h" #include "comm.h" diff --git a/src/procmap.cpp b/src/procmap.cpp index 47afb76da9..69585aa453 100644 --- a/src/procmap.cpp +++ b/src/procmap.cpp @@ -16,7 +16,12 @@ ------------------------------------------------------------------------- */ #include "procmap.h" +#include +#include #include +#include +#include +#include #include "universe.h" #include "comm.h" #include "domain.h" @@ -24,9 +29,6 @@ #include "memory.h" #include "error.h" -#include -#include - using namespace LAMMPS_NS; #define MAXLINE 128 diff --git a/src/rcb.cpp b/src/rcb.cpp index b19beae3c5..f1a6377046 100644 --- a/src/rcb.cpp +++ b/src/rcb.cpp @@ -16,7 +16,6 @@ #include #include "irregular.h" #include "memory.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/read_data.cpp b/src/read_data.cpp index a50d41b498..dad48110f7 100644 --- a/src/read_data.cpp +++ b/src/read_data.cpp @@ -16,18 +16,14 @@ // before lmptype.h can set flags to insure it is done correctly #include "read_data.h" -#include "lmptype.h" #include -#include #include -#include #include #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" #include "atom_vec_line.h" #include "atom_vec_tri.h" -#include "force.h" #include "molecule.h" #include "group.h" #include "comm.h" diff --git a/src/read_dump.cpp b/src/read_dump.cpp index 49f96db680..d83a96f0fa 100644 --- a/src/read_dump.cpp +++ b/src/read_dump.cpp @@ -20,24 +20,18 @@ // before lmptype.h can set flags to insure it is done correctly #include "read_dump.h" -#include "lmptype.h" #include #include -#include +#include #include "reader.h" #include "style_reader.h" #include "atom.h" #include "atom_vec.h" #include "update.h" -#include "modify.h" -#include "fix.h" -#include "compute.h" #include "domain.h" #include "comm.h" #include "force.h" #include "irregular.h" -#include "input.h" -#include "variable.h" #include "error.h" #include "memory.h" #include "utils.h" diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 17b313bfa2..3d2e2b6592 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -14,7 +14,6 @@ #include "read_restart.h" #include #include -#include #include #include "atom.h" #include "atom_vec.h" @@ -23,7 +22,6 @@ #include "irregular.h" #include "update.h" #include "modify.h" -#include "fix.h" #include "fix_read_restart.h" #include "group.h" #include "force.h" diff --git a/src/reader.cpp b/src/reader.cpp index a1fe51f662..b2751662e2 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "reader.h" -#include #include #include "error.h" diff --git a/src/reader_xyz.cpp b/src/reader_xyz.cpp index fa553dc30f..81aaba77bc 100644 --- a/src/reader_xyz.cpp +++ b/src/reader_xyz.cpp @@ -16,9 +16,7 @@ ------------------------------------------------------------------------- */ #include "reader_xyz.h" -#include #include -#include "atom.h" #include "memory.h" #include "error.h" #include "force.h" diff --git a/src/region.cpp b/src/region.cpp index 0c4bec16e0..7a676de1af 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -13,7 +13,6 @@ #include "region.h" #include -#include #include #include "update.h" #include "domain.h" diff --git a/src/region_block.cpp b/src/region_block.cpp index bc52fcd7cf..8ea8b3f202 100644 --- a/src/region_block.cpp +++ b/src/region_block.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "region_block.h" -#include #include #include "force.h" #include "domain.h" diff --git a/src/region_cone.cpp b/src/region_cone.cpp index 345c9fa8e2..3c7d0a29d8 100644 --- a/src/region_cone.cpp +++ b/src/region_cone.cpp @@ -17,7 +17,6 @@ #include "region_cone.h" #include -#include #include #include "domain.h" #include "error.h" diff --git a/src/region_cylinder.cpp b/src/region_cylinder.cpp index 968453cf37..b2c06270d0 100644 --- a/src/region_cylinder.cpp +++ b/src/region_cylinder.cpp @@ -13,7 +13,6 @@ #include "region_cylinder.h" #include -#include #include #include "update.h" #include "domain.h" diff --git a/src/region_intersect.cpp b/src/region_intersect.cpp index c6c11cf35c..fe074a6b4c 100644 --- a/src/region_intersect.cpp +++ b/src/region_intersect.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "region_intersect.h" -#include #include #include "domain.h" #include "error.h" diff --git a/src/region_plane.cpp b/src/region_plane.cpp index 950c0a4b53..85671357ef 100644 --- a/src/region_plane.cpp +++ b/src/region_plane.cpp @@ -13,8 +13,6 @@ #include "region_plane.h" #include -#include -#include #include "error.h" #include "force.h" diff --git a/src/region_prism.cpp b/src/region_prism.cpp index 38fc23da21..b6c54c2fb9 100644 --- a/src/region_prism.cpp +++ b/src/region_prism.cpp @@ -16,8 +16,6 @@ ------------------------------------------------------------------------- */ #include "region_prism.h" -#include -#include #include #include "domain.h" #include "force.h" diff --git a/src/region_sphere.cpp b/src/region_sphere.cpp index 9c478960e3..bf874ad311 100644 --- a/src/region_sphere.cpp +++ b/src/region_sphere.cpp @@ -13,7 +13,6 @@ #include "region_sphere.h" #include -#include #include #include "update.h" #include "input.h" diff --git a/src/region_union.cpp b/src/region_union.cpp index f4e30f5b94..be1fe6eeff 100644 --- a/src/region_union.cpp +++ b/src/region_union.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "region_union.h" -#include #include #include "domain.h" #include "error.h" diff --git a/src/replicate.cpp b/src/replicate.cpp index 6f8c94238a..1617ab0313 100644 --- a/src/replicate.cpp +++ b/src/replicate.cpp @@ -12,11 +12,10 @@ ------------------------------------------------------------------------- */ #include "replicate.h" -#include +#include #include #include "atom.h" #include "atom_vec.h" -#include "atom_vec_hybrid.h" #include "force.h" #include "domain.h" #include "comm.h" diff --git a/src/rerun.cpp b/src/rerun.cpp index e75779ccc0..3cd1c53628 100644 --- a/src/rerun.cpp +++ b/src/rerun.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "rerun.h" -#include #include #include "read_dump.h" #include "domain.h" diff --git a/src/reset_ids.cpp b/src/reset_ids.cpp index b68b7ca797..857738e841 100644 --- a/src/reset_ids.cpp +++ b/src/reset_ids.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include "reset_ids.h" +#include #include "atom.h" #include "atom_vec.h" #include "domain.h" diff --git a/src/respa.cpp b/src/respa.cpp index 867662b3c2..a184756335 100644 --- a/src/respa.cpp +++ b/src/respa.cpp @@ -16,13 +16,13 @@ ------------------------------------------------------------------------- */ #include "respa.h" -#include #include #include "neighbor.h" #include "atom.h" #include "atom_vec.h" #include "domain.h" #include "comm.h" +#include "fix.h" #include "force.h" #include "pair.h" #include "bond.h" @@ -33,10 +33,8 @@ #include "output.h" #include "update.h" #include "modify.h" -#include "compute.h" #include "fix_respa.h" #include "timer.h" -#include "memory.h" #include "error.h" #include "utils.h" #include "pair_hybrid.h" diff --git a/src/run.cpp b/src/run.cpp index 60861ad3b9..2c2f00a7a8 100644 --- a/src/run.cpp +++ b/src/run.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "run.h" -#include #include #include "domain.h" #include "update.h" diff --git a/src/set.cpp b/src/set.cpp index d34aa7753a..3bf00063c5 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -14,8 +14,8 @@ #include "set.h" #include #include -#include #include +#include #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" @@ -26,9 +26,7 @@ #include "region.h" #include "group.h" #include "comm.h" -#include "neighbor.h" #include "force.h" -#include "pair.h" #include "input.h" #include "variable.h" #include "random_park.h" diff --git a/src/special.cpp b/src/special.cpp index f8661e238c..b64aa96e2b 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -13,7 +13,6 @@ #include "special.h" #include -#include #include "atom.h" #include "atom_vec.h" #include "force.h" @@ -23,7 +22,6 @@ #include "accelerator_kokkos.h" #include "atom_masks.h" #include "memory.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/thermo.cpp b/src/thermo.cpp index d267ea260c..be725d907b 100644 --- a/src/thermo.cpp +++ b/src/thermo.cpp @@ -16,10 +16,8 @@ // before lmptype.h can set flags to insure it is done correctly #include "thermo.h" -#include "lmptype.h" #include #include -#include #include #include "atom.h" #include "update.h" @@ -43,11 +41,8 @@ #include "kspace.h" #include "output.h" #include "timer.h" -#include "math_const.h" #include "memory.h" #include "error.h" -#include "universe.h" - #include "math_const.h" using namespace LAMMPS_NS; diff --git a/src/thermo.h b/src/thermo.h index 8c32f24d3c..f2384e0ac3 100644 --- a/src/thermo.h +++ b/src/thermo.h @@ -18,9 +18,6 @@ namespace LAMMPS_NS { -class DumpNetCDF; -class DumpNetCDFMPIIO; - class Thermo : protected Pointers { friend class MinCG; // accesses compute_pe friend class DumpNetCDF; // accesses thermo properties -- GitLab From d07a49aeea8a13cb83eb1da6096877d0e6b53ea5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 5 Jul 2019 11:37:21 -0400 Subject: [PATCH 129/236] add missing prototypes --- lib/poems/fastmatrixops.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/poems/fastmatrixops.h b/lib/poems/fastmatrixops.h index 4c3c1353bd..45573c3eab 100644 --- a/lib/poems/fastmatrixops.h +++ b/lib/poems/fastmatrixops.h @@ -32,6 +32,7 @@ class Vect6; void FastCross(Vect3& a, Vect3& b, Vect3& c); void FastSimpleRotation(Vect3& v, double q, Mat3x3& C); void FastQuaternions(ColMatrix& q, Mat3x3& C); +void FastInvQuaternions(Mat3x3& C, ColMatrix& q); void FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot); void FastLDLT(Matrix& A, Matrix& LD); // C is the LDL^T decomposition of A (SPD) void FastLDLT(Mat6x6& A, Mat6x6& LD); // C is the LDL^T decomposition of A (SPD) @@ -54,6 +55,7 @@ void FastTripleSumPPM(Vect3& a, Vect3& b, Vect3& c, Vect3& d); // d = a+b-c void FastMult(Matrix& A, Matrix& B, Matrix& C); // C = A*B void FastTMult(Matrix& A, Matrix& B, Matrix& C); // C = A^T*B +void FastTMult(Mat3x3& A, Vect3& B, Vect3& C); void FastMult(Mat3x3& A, Vect3& B, Vect3& C); // C = A*B void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); // C = A*B @@ -90,6 +92,7 @@ void FastAdd(Vect3& A, Vect3& B, Vect3& C); // C = A+B void FastAdd(Vect4& A, Vect4& B, Vect3& C); // C = A+B void FastAdd(Mat6x6& A, Mat6x6& B, Mat6x6& C); // C = A+B void FastAdd(Vect6& A, Vect6& B, Vect6& C); // C = A+B +void FastAdd(Vect4& A, Vect4& B, Vect4& C); void FastSubt(Vect3& A, Vect3& B, Vect3& C); // C = A-B void FastSubt(Vect4& A, Vect4& B, Vect4& C); // C = A-B -- GitLab From 5fffccb076fd350cf0bf6c80374bccee87c210a1 Mon Sep 17 00:00:00 2001 From: Anne Gunn Date: Fri, 5 Jul 2019 12:08:57 -0600 Subject: [PATCH 130/236] Apply minor line editing to new documentation file. --- doc/include-file-conventions.md | 44 ++++++++++++++++----------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/include-file-conventions.md b/doc/include-file-conventions.md index 1f206c8f88..c9f8bd5cb1 100644 --- a/doc/include-file-conventions.md +++ b/doc/include-file-conventions.md @@ -3,7 +3,7 @@ This purpose of this document is to provide a point of reference for LAMMPS developers and contributors as to what include files and definitions to put where into LAMMPS source. -Last change 2019-06-27 +Last change 2019-07-05 ## Table of Contents @@ -14,43 +14,43 @@ Last change 2019-06-27 ## Motivation -The conventions outlined in this document are supposed to help making +The conventions outlined in this document are supposed to help make maintenance of the LAMMPS software easier. By trying to achieve consistency across files contributed by different developers, it will -become easier to modify and adjust files by the code maintainers, and -overall the chance for errors or portability issues will be reduced. -Also the rules employed are supposed to minimize naming conflicts and -simplify dependencies between files (and thus speed up compilation), as -well as make otherwise hidden dependencies visible. +become easier for the code maintainers to modify and adjust files and, +overall, the chance for errors or portability issues will be reduced. +The rules employed are supposed to minimize naming conflicts and +simplify dependencies between files and thus speed up compilation. They +may, as well, make otherwise hidden dependencies visible. ## Rules Below are the various rules that are applied. Not all are enforced strictly and automatically. If there are no significant side effects, -exceptions may be possible for cases, where a full compliance to the +exceptions may be possible for cases where a full compliance to the rules may require a large effort compared to the benefit. ### Core Files Versus Package Files -All rules listed below are most strictly observed for core LAMMPS files. -Which are the files that are not part of a package and files of the +All rules listed below are most strictly observed for core LAMMPS files, +which are the files that are not part of a package, and the files of the packages MOLECULE, MANYBODY, KSPACE, and RIGID. On the other end of the spectrum are USER packages and legacy packages that predate these -rules and thus may not be fully compliant. Also new contributions -will be checked more closely, while existing code is incrementally +rules and thus may not be fully compliant. Also, new contributions +will be checked more closely, while existing code will be incrementally adapted to the rules as time and required effort permits. ### System Versus Local Header Files -All system or library provided include files are included with angular +All system- or library-provided include files are included with angular brackets (examples: `#include ` or `#include `) while include files provided with LAMMPS are included with double quotes (examples: `#include "pointers.h"` or `#include "compute_temp.h"`). For headers declaring functions of the C-library, the corresponding C++ versions should be included (examples: `#include ` or -`#include `). However, those are limited to those defined -in the C++98 standard. Some files thus must use the older style unless +`#include `). However, these includes are limited to those defined +in the C++98 standard. Some files thus must use the older style until the minimum C++ standard requirement of LAMMPS is lifted to C++11 or even beyond (examples: `#include ` versus `#include ` or `#include ` versus `#include `). @@ -60,7 +60,7 @@ or `#include ` versus `#include `). LAMMPS core files currently correspond to the C++98 standard. Files requiring C++11 or later are only permitted in (optional) packages and particularly packages that are not part of the list of commonly -used packages like MOLECULE, KSPACE, MANYBODY, or RIGID. +used packages such as MOLECULE, KSPACE, MANYBODY, or RIGID. Also, LAMMPS uses the C-style stdio library for I/O instead of iostreams. Since using both at the same time can cause problems, iostreams should @@ -72,8 +72,8 @@ Header files will typically contain the definition of a (single) class. These header files should have as few include statements as possible. This is particularly important for classes that implement a "style" and thus use a macro of the kind `SomeStyle(some/name,SomeName)`. These will -be all included in the auto-generated `"some_style.h"` files which will -result in a high potential for direct or indirect symbol name clashes. +all be included in the auto-generated `"some_style.h"` files which +results in a high potential for direct or indirect symbol name clashes. In the ideal case, the header would only include one file defining the parent class. That would typically be either `#include "pointers.h"` for @@ -85,7 +85,7 @@ be employed. The full definition will then be included into the corresponding implementation file. In the given example from above, the header file would be called `some_name.h` and the implementation `some_name.cpp` (all lower case with underscores, while the class itself would be in camel case -and no underscores, and the style name with lower case names separated by +and no underscores `SomeName`, and the style name with lower case names separated by a forward slash). ### Implementation Files @@ -124,9 +124,9 @@ which include files should be added or removed. ## Legacy Code -A lot of code predates the application of the rules in this document, -and those rules are a moving target as well. So there is going to be -significant chunks of code, that does not fully comply. This applies +A lot of code predates the application of the rules in this document +and the rules themselves are a moving target. So there are going to be +significant chunks of code that do not fully comply. This applies for example to the USER-REAXC, or the USER-ATC package. The LAMMPS developers are dedicated to make an effort to improve the compliance and welcome volunteers wanting to help with the process. -- GitLab From 5d4016c285a1ff930a1e2dfaea055a0bc9f6e74b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 5 Jul 2019 14:42:46 -0400 Subject: [PATCH 131/236] cleaning up includes of ASPHERE package --- src/ASPHERE/compute_erotate_asphere.cpp | 1 - src/ASPHERE/compute_temp_asphere.cpp | 1 - src/ASPHERE/fix_nh_asphere.cpp | 5 ----- src/ASPHERE/fix_nve_asphere.cpp | 6 ------ src/ASPHERE/fix_nve_asphere_noforce.cpp | 6 ------ src/ASPHERE/fix_nve_line.cpp | 3 --- src/ASPHERE/fix_nve_tri.cpp | 3 --- src/ASPHERE/pair_gayberne.cpp | 5 +---- 8 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/ASPHERE/compute_erotate_asphere.cpp b/src/ASPHERE/compute_erotate_asphere.cpp index 665506acdf..3cf23b87eb 100644 --- a/src/ASPHERE/compute_erotate_asphere.cpp +++ b/src/ASPHERE/compute_erotate_asphere.cpp @@ -20,7 +20,6 @@ #include "atom_vec_tri.h" #include "update.h" #include "force.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index 32773b2925..d591e2ca81 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -26,7 +26,6 @@ #include "domain.h" #include "modify.h" #include "group.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/ASPHERE/fix_nh_asphere.cpp b/src/ASPHERE/fix_nh_asphere.cpp index 9e8e9d73d9..2f8f11978e 100644 --- a/src/ASPHERE/fix_nh_asphere.cpp +++ b/src/ASPHERE/fix_nh_asphere.cpp @@ -16,14 +16,9 @@ ------------------------------------------------------------------------- */ #include "fix_nh_asphere.h" -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" -#include "group.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/ASPHERE/fix_nve_asphere.cpp b/src/ASPHERE/fix_nve_asphere.cpp index 05219e442f..93ccf008f4 100644 --- a/src/ASPHERE/fix_nve_asphere.cpp +++ b/src/ASPHERE/fix_nve_asphere.cpp @@ -16,15 +16,9 @@ ------------------------------------------------------------------------- */ #include "fix_nve_asphere.h" -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" -#include "force.h" -#include "update.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/ASPHERE/fix_nve_asphere_noforce.cpp b/src/ASPHERE/fix_nve_asphere_noforce.cpp index 015cc8cfb6..3a7d7e86e9 100644 --- a/src/ASPHERE/fix_nve_asphere_noforce.cpp +++ b/src/ASPHERE/fix_nve_asphere_noforce.cpp @@ -12,15 +12,9 @@ ------------------------------------------------------------------------- */ #include "fix_nve_asphere_noforce.h" -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" -#include "group.h" -#include "update.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/ASPHERE/fix_nve_line.cpp b/src/ASPHERE/fix_nve_line.cpp index 57335f22e0..5e17cb355f 100644 --- a/src/ASPHERE/fix_nve_line.cpp +++ b/src/ASPHERE/fix_nve_line.cpp @@ -12,9 +12,6 @@ ------------------------------------------------------------------------- */ #include "fix_nve_line.h" -#include -#include -#include #include "atom.h" #include "atom_vec_line.h" #include "domain.h" diff --git a/src/ASPHERE/fix_nve_tri.cpp b/src/ASPHERE/fix_nve_tri.cpp index b1f7667d06..797fea1c5b 100644 --- a/src/ASPHERE/fix_nve_tri.cpp +++ b/src/ASPHERE/fix_nve_tri.cpp @@ -12,9 +12,6 @@ ------------------------------------------------------------------------- */ #include "fix_nve_tri.h" -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_tri.h" diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index 7dbf11c5ea..93b164c503 100644 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -16,10 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_gayberne.h" +#include #include -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" @@ -27,7 +25,6 @@ #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "integrate.h" #include "citeme.h" #include "memory.h" #include "error.h" -- GitLab From 2c0eeeb976075e6df3fc5362d2e06566cc20821c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 5 Jul 2019 14:43:20 -0400 Subject: [PATCH 132/236] one more chunk of files in src folder to be cleaned up --- src/universe.cpp | 1 - src/update.cpp | 5 ----- src/utils.cpp | 1 - src/velocity.cpp | 4 ---- src/verlet.cpp | 3 --- src/write_coeff.cpp | 1 + src/write_data.cpp | 1 - src/write_dump.cpp | 4 +--- 8 files changed, 2 insertions(+), 18 deletions(-) diff --git a/src/universe.cpp b/src/universe.cpp index 2a7117da51..a36b67d115 100644 --- a/src/universe.cpp +++ b/src/universe.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include "version.h" #include "error.h" #include "force.h" diff --git a/src/update.cpp b/src/update.cpp index e83f4d9f72..8a3e6f0d1d 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -13,21 +13,16 @@ #include "update.h" #include -#include #include "integrate.h" #include "min.h" #include "style_integrate.h" #include "style_minimize.h" #include "neighbor.h" -#include "neigh_list.h" #include "force.h" #include "modify.h" #include "fix.h" -#include "domain.h" -#include "region.h" #include "compute.h" #include "output.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/utils.cpp b/src/utils.cpp index ea2ab57f6f..f45a834bec 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "utils.h" -#include #include #include "lammps.h" #include "error.h" diff --git a/src/velocity.cpp b/src/velocity.cpp index 1a03f71128..e5985884f8 100644 --- a/src/velocity.cpp +++ b/src/velocity.cpp @@ -12,13 +12,9 @@ ------------------------------------------------------------------------- */ #include "velocity.h" -#include #include -#include -#include #include #include "atom.h" -#include "update.h" #include "domain.h" #include "lattice.h" #include "input.h" diff --git a/src/verlet.cpp b/src/verlet.cpp index 5ccef36259..8cd6fe940d 100644 --- a/src/verlet.cpp +++ b/src/verlet.cpp @@ -28,10 +28,7 @@ #include "output.h" #include "update.h" #include "modify.h" -#include "compute.h" -#include "fix.h" #include "timer.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/write_coeff.cpp b/src/write_coeff.cpp index 08ff964e7c..8e5b4fcb71 100644 --- a/src/write_coeff.cpp +++ b/src/write_coeff.cpp @@ -14,6 +14,7 @@ #include "write_coeff.h" #include #include +#include #include #include "pair.h" #include "bond.h" diff --git a/src/write_data.cpp b/src/write_data.cpp index b78e701d35..3d788b9665 100644 --- a/src/write_data.cpp +++ b/src/write_data.cpp @@ -16,7 +16,6 @@ #include #include "atom.h" #include "atom_vec.h" -#include "group.h" #include "force.h" #include "pair.h" #include "bond.h" diff --git a/src/write_dump.cpp b/src/write_dump.cpp index 903f0e0cdd..31ceb4cbbf 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -17,13 +17,11 @@ #include "write_dump.h" #include +#include #include "style_dump.h" #include "dump.h" #include "dump_image.h" -#include "atom.h" #include "comm.h" -#include "group.h" -#include "input.h" #include "update.h" #include "error.h" #include "utils.h" -- GitLab From 4db483339504396f084bf269db6b06862f2025cb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 5 Jul 2019 21:11:06 -0400 Subject: [PATCH 133/236] fix up includes for BODY package --- src/BODY/body_rounded_polygon.cpp | 2 +- src/BODY/body_rounded_polyhedron.cpp | 2 +- src/BODY/compute_body_local.cpp | 4 +--- src/BODY/compute_temp_body.cpp | 1 - src/BODY/fix_nh_body.cpp | 5 ----- src/BODY/fix_nve_body.cpp | 6 ------ src/BODY/fix_wall_body_polygon.cpp | 4 ---- src/BODY/fix_wall_body_polyhedron.cpp | 4 ---- src/BODY/pair_body_nparticle.cpp | 2 -- src/BODY/pair_body_rounded_polygon.cpp | 3 +-- src/BODY/pair_body_rounded_polyhedron.cpp | 5 +---- 11 files changed, 5 insertions(+), 33 deletions(-) diff --git a/src/BODY/body_rounded_polygon.cpp b/src/BODY/body_rounded_polygon.cpp index 21f1d7e221..caf7e4bb8c 100644 --- a/src/BODY/body_rounded_polygon.cpp +++ b/src/BODY/body_rounded_polygon.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "body_rounded_polygon.h" +#include #include -#include #include "my_pool_chunk.h" #include "atom_vec_body.h" #include "atom.h" diff --git a/src/BODY/body_rounded_polyhedron.cpp b/src/BODY/body_rounded_polyhedron.cpp index 15e1871e02..98f7913859 100644 --- a/src/BODY/body_rounded_polyhedron.cpp +++ b/src/BODY/body_rounded_polyhedron.cpp @@ -16,13 +16,13 @@ ------------------------------------------------------------------------- */ #include "body_rounded_polyhedron.h" +#include #include #include #include "my_pool_chunk.h" #include "atom_vec_body.h" #include "atom.h" #include "force.h" -#include "domain.h" #include "math_extra.h" #include "memory.h" #include "error.h" diff --git a/src/BODY/compute_body_local.cpp b/src/BODY/compute_body_local.cpp index f58b66c2ca..c12502df42 100644 --- a/src/BODY/compute_body_local.cpp +++ b/src/BODY/compute_body_local.cpp @@ -12,15 +12,13 @@ ------------------------------------------------------------------------- */ #include "compute_body_local.h" -#include +#include #include #include "atom.h" #include "atom_vec_body.h" #include "body.h" #include "update.h" -#include "domain.h" #include "force.h" -#include "bond.h" #include "memory.h" #include "error.h" diff --git a/src/BODY/compute_temp_body.cpp b/src/BODY/compute_temp_body.cpp index 7beca36df8..d9007f573d 100644 --- a/src/BODY/compute_temp_body.cpp +++ b/src/BODY/compute_temp_body.cpp @@ -27,7 +27,6 @@ #include "domain.h" #include "modify.h" #include "group.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/BODY/fix_nh_body.cpp b/src/BODY/fix_nh_body.cpp index 6064f1f9de..b9a0c81e15 100644 --- a/src/BODY/fix_nh_body.cpp +++ b/src/BODY/fix_nh_body.cpp @@ -17,14 +17,9 @@ ------------------------------------------------------------------------- */ #include "fix_nh_body.h" -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" -#include "group.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/BODY/fix_nve_body.cpp b/src/BODY/fix_nve_body.cpp index 3f3bd41cbc..185e397540 100644 --- a/src/BODY/fix_nve_body.cpp +++ b/src/BODY/fix_nve_body.cpp @@ -12,15 +12,9 @@ ------------------------------------------------------------------------- */ #include "fix_nve_body.h" -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" -#include "force.h" -#include "update.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp index 8f27a094cb..e51476de60 100644 --- a/src/BODY/fix_wall_body_polygon.cpp +++ b/src/BODY/fix_wall_body_polygon.cpp @@ -17,7 +17,6 @@ #include "fix_wall_body_polygon.h" #include -#include #include #include "atom.h" #include "atom_vec_body.h" @@ -25,9 +24,6 @@ #include "domain.h" #include "update.h" #include "force.h" -#include "pair.h" -#include "modify.h" -#include "respa.h" #include "math_const.h" #include "math_extra.h" #include "memory.h" diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index 37b542803f..42c62de436 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -17,7 +17,6 @@ #include "fix_wall_body_polyhedron.h" #include -#include #include #include "atom.h" #include "atom_vec_body.h" @@ -25,9 +24,6 @@ #include "domain.h" #include "update.h" #include "force.h" -#include "pair.h" -#include "modify.h" -#include "respa.h" #include "math_const.h" #include "math_extra.h" #include "memory.h" diff --git a/src/BODY/pair_body_nparticle.cpp b/src/BODY/pair_body_nparticle.cpp index 96a7af6255..bd7aba5455 100644 --- a/src/BODY/pair_body_nparticle.cpp +++ b/src/BODY/pair_body_nparticle.cpp @@ -13,8 +13,6 @@ #include "pair_body_nparticle.h" #include -#include -#include #include #include "math_extra.h" #include "atom.h" diff --git a/src/BODY/pair_body_rounded_polygon.cpp b/src/BODY/pair_body_rounded_polygon.cpp index c818b5a2e6..f5e18e9d89 100644 --- a/src/BODY/pair_body_rounded_polygon.cpp +++ b/src/BODY/pair_body_rounded_polygon.cpp @@ -19,9 +19,8 @@ ------------------------------------------------------------------------- */ #include "pair_body_rounded_polygon.h" +#include #include -#include -#include #include #include "math_extra.h" #include "atom.h" diff --git a/src/BODY/pair_body_rounded_polyhedron.cpp b/src/BODY/pair_body_rounded_polyhedron.cpp index 75caab88bd..2df58d45cd 100644 --- a/src/BODY/pair_body_rounded_polyhedron.cpp +++ b/src/BODY/pair_body_rounded_polyhedron.cpp @@ -21,11 +21,9 @@ ------------------------------------------------------------------------- */ #include "pair_body_rounded_polyhedron.h" +#include #include -#include -#include #include -#include "math_extra.h" #include "atom.h" #include "atom_vec_body.h" #include "body_rounded_polyhedron.h" @@ -41,7 +39,6 @@ #include "math_const.h" using namespace LAMMPS_NS; -using namespace MathExtra; using namespace MathConst; #define DELTA 10000 -- GitLab From a00d38572e425f7734cfd651959b760b36eb6b12 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 6 Jul 2019 06:29:22 -0400 Subject: [PATCH 134/236] clean up includes in packages CLASS2, COLLOID, COMPRESS, and CORESHELL --- src/CLASS2/angle_class2.cpp | 2 +- src/CLASS2/bond_class2.cpp | 3 +-- src/CLASS2/dihedral_class2.cpp | 3 +-- src/CLASS2/improper_class2.cpp | 3 +-- src/CLASS2/pair_lj_class2.cpp | 4 +--- src/CLASS2/pair_lj_class2_coul_cut.cpp | 3 +-- src/CLASS2/pair_lj_class2_coul_long.cpp | 4 +--- src/COLLOID/fix_wall_colloid.cpp | 4 +--- src/COLLOID/pair_brownian.cpp | 6 +----- src/COLLOID/pair_brownian_poly.cpp | 7 +------ src/COLLOID/pair_colloid.cpp | 5 +---- src/COLLOID/pair_lubricate.cpp | 6 +----- src/COLLOID/pair_lubricateU.cpp | 5 ----- src/COLLOID/pair_lubricateU_poly.cpp | 5 ----- src/COLLOID/pair_lubricate_poly.cpp | 6 +----- src/COLLOID/pair_yukawa_colloid.cpp | 3 --- src/COMPRESS/dump_xyz_gz.cpp | 1 - src/CORESHELL/compute_temp_cs.cpp | 3 --- src/CORESHELL/pair_born_coul_dsf_cs.cpp | 6 ------ src/CORESHELL/pair_born_coul_long_cs.cpp | 9 --------- src/CORESHELL/pair_born_coul_wolf_cs.cpp | 8 -------- src/CORESHELL/pair_buck_coul_long_cs.cpp | 10 ---------- src/CORESHELL/pair_coul_long_cs.cpp | 11 ----------- src/CORESHELL/pair_coul_wolf_cs.cpp | 8 -------- src/CORESHELL/pair_lj_cut_coul_long_cs.cpp | 14 -------------- 25 files changed, 13 insertions(+), 126 deletions(-) diff --git a/src/CLASS2/angle_class2.cpp b/src/CLASS2/angle_class2.cpp index 340152abd4..99e1b39c9d 100644 --- a/src/CLASS2/angle_class2.cpp +++ b/src/CLASS2/angle_class2.cpp @@ -16,9 +16,9 @@ ------------------------------------------------------------------------- */ #include "angle_class2.h" +#include #include #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/CLASS2/bond_class2.cpp b/src/CLASS2/bond_class2.cpp index 945555f772..cfc1a93bde 100644 --- a/src/CLASS2/bond_class2.cpp +++ b/src/CLASS2/bond_class2.cpp @@ -16,11 +16,10 @@ ------------------------------------------------------------------------- */ #include "bond_class2.h" +#include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/CLASS2/dihedral_class2.cpp b/src/CLASS2/dihedral_class2.cpp index c36d976525..725228666e 100644 --- a/src/CLASS2/dihedral_class2.cpp +++ b/src/CLASS2/dihedral_class2.cpp @@ -16,13 +16,12 @@ ------------------------------------------------------------------------- */ #include "dihedral_class2.h" +#include #include #include -#include #include "atom.h" #include "neighbor.h" #include "update.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "math_const.h" diff --git a/src/CLASS2/improper_class2.cpp b/src/CLASS2/improper_class2.cpp index aff37df318..ca7ac95239 100644 --- a/src/CLASS2/improper_class2.cpp +++ b/src/CLASS2/improper_class2.cpp @@ -16,13 +16,12 @@ ------------------------------------------------------------------------- */ #include "improper_class2.h" +#include #include #include -#include #include "atom.h" #include "neighbor.h" #include "update.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "math_const.h" diff --git a/src/CLASS2/pair_lj_class2.cpp b/src/CLASS2/pair_lj_class2.cpp index 9a67fafecb..a0088e52b7 100644 --- a/src/CLASS2/pair_lj_class2.cpp +++ b/src/CLASS2/pair_lj_class2.cpp @@ -10,9 +10,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_class2.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" @@ -21,7 +20,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory.h" diff --git a/src/CLASS2/pair_lj_class2_coul_cut.cpp b/src/CLASS2/pair_lj_class2_coul_cut.cpp index 24620611c6..e999a3682e 100644 --- a/src/CLASS2/pair_lj_class2_coul_cut.cpp +++ b/src/CLASS2/pair_lj_class2_coul_cut.cpp @@ -12,9 +12,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_class2_coul_cut.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/CLASS2/pair_lj_class2_coul_long.cpp b/src/CLASS2/pair_lj_class2_coul_long.cpp index cd11294327..b56c076996 100644 --- a/src/CLASS2/pair_lj_class2_coul_long.cpp +++ b/src/CLASS2/pair_lj_class2_coul_long.cpp @@ -12,16 +12,14 @@ ------------------------------------------------------------------------- */ #include "pair_lj_class2_coul_long.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/COLLOID/fix_wall_colloid.cpp b/src/COLLOID/fix_wall_colloid.cpp index f2e895c4f3..58593a99b1 100644 --- a/src/COLLOID/fix_wall_colloid.cpp +++ b/src/COLLOID/fix_wall_colloid.cpp @@ -16,12 +16,10 @@ ------------------------------------------------------------------------- */ #include "fix_wall_colloid.h" +#include #include -#include #include "atom.h" #include "atom_vec.h" -#include "update.h" -#include "respa.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/COLLOID/pair_brownian.cpp b/src/COLLOID/pair_brownian.cpp index f9185264e0..71a5f8c056 100644 --- a/src/COLLOID/pair_brownian.cpp +++ b/src/COLLOID/pair_brownian.cpp @@ -16,22 +16,18 @@ ------------------------------------------------------------------------- */ #include "pair_brownian.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "domain.h" #include "update.h" #include "modify.h" #include "fix.h" -#include "fix_deform.h" #include "fix_wall.h" #include "input.h" #include "variable.h" diff --git a/src/COLLOID/pair_brownian_poly.cpp b/src/COLLOID/pair_brownian_poly.cpp index 250dcef1fd..c3eb4f28a5 100644 --- a/src/COLLOID/pair_brownian_poly.cpp +++ b/src/COLLOID/pair_brownian_poly.cpp @@ -17,13 +17,10 @@ ------------------------------------------------------------------------- */ #include "pair_brownian_poly.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" @@ -32,14 +29,12 @@ #include "update.h" #include "modify.h" #include "fix.h" -#include "fix_deform.h" #include "fix_wall.h" #include "input.h" #include "variable.h" #include "random_mars.h" #include "math_const.h" #include "math_special.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/COLLOID/pair_colloid.cpp b/src/COLLOID/pair_colloid.cpp index 306cdfebdf..ad25184181 100644 --- a/src/COLLOID/pair_colloid.cpp +++ b/src/COLLOID/pair_colloid.cpp @@ -16,14 +16,11 @@ ------------------------------------------------------------------------- */ #include "pair_colloid.h" +#include #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "math_special.h" #include "memory.h" diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index ee55c6cbf5..4492de3cbb 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -17,17 +17,14 @@ ------------------------------------------------------------------------- */ #include "pair_lubricate.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -35,7 +32,6 @@ #include "fix_wall.h" #include "input.h" #include "variable.h" -#include "random_mars.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/COLLOID/pair_lubricateU.cpp b/src/COLLOID/pair_lubricateU.cpp index be589167c9..4f7e3917e8 100644 --- a/src/COLLOID/pair_lubricateU.cpp +++ b/src/COLLOID/pair_lubricateU.cpp @@ -18,22 +18,17 @@ #include "pair_lubricateU.h" #include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "domain.h" #include "update.h" #include "math_const.h" #include "modify.h" #include "fix.h" -#include "fix_deform.h" #include "fix_wall.h" #include "input.h" #include "variable.h" diff --git a/src/COLLOID/pair_lubricateU_poly.cpp b/src/COLLOID/pair_lubricateU_poly.cpp index ebcf939cff..0f16d94300 100644 --- a/src/COLLOID/pair_lubricateU_poly.cpp +++ b/src/COLLOID/pair_lubricateU_poly.cpp @@ -20,21 +20,16 @@ #include "pair_lubricateU_poly.h" #include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "domain.h" -#include "update.h" #include "modify.h" #include "fix.h" -#include "fix_deform.h" #include "fix_wall.h" #include "input.h" #include "variable.h" diff --git a/src/COLLOID/pair_lubricate_poly.cpp b/src/COLLOID/pair_lubricate_poly.cpp index f1bfa0c695..e347441cf4 100644 --- a/src/COLLOID/pair_lubricate_poly.cpp +++ b/src/COLLOID/pair_lubricate_poly.cpp @@ -18,12 +18,10 @@ ------------------------------------------------------------------------- */ #include "pair_lubricate_poly.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "force.h" #include "neighbor.h" @@ -33,8 +31,6 @@ #include "modify.h" #include "fix.h" #include "fix_deform.h" -#include "memory.h" -#include "random_mars.h" #include "fix_wall.h" #include "input.h" #include "variable.h" diff --git a/src/COLLOID/pair_yukawa_colloid.cpp b/src/COLLOID/pair_yukawa_colloid.cpp index 98d0586925..1866fa60b5 100644 --- a/src/COLLOID/pair_yukawa_colloid.cpp +++ b/src/COLLOID/pair_yukawa_colloid.cpp @@ -17,14 +17,11 @@ #include "pair_yukawa_colloid.h" #include -#include #include "atom.h" #include "atom_vec.h" #include "force.h" -#include "comm.h" #include "neighbor.h" #include "neigh_list.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/COMPRESS/dump_xyz_gz.cpp b/src/COMPRESS/dump_xyz_gz.cpp index 7be1a10fe2..c76b7afa17 100644 --- a/src/COMPRESS/dump_xyz_gz.cpp +++ b/src/COMPRESS/dump_xyz_gz.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "dump_xyz_gz.h" -#include "domain.h" #include "error.h" #include "update.h" diff --git a/src/CORESHELL/compute_temp_cs.cpp b/src/CORESHELL/compute_temp_cs.cpp index 4217fe3410..cccccaf254 100644 --- a/src/CORESHELL/compute_temp_cs.cpp +++ b/src/CORESHELL/compute_temp_cs.cpp @@ -18,9 +18,7 @@ #include "compute_temp_cs.h" #include -#include #include -#include #include "atom.h" #include "atom_vec.h" #include "domain.h" @@ -28,7 +26,6 @@ #include "force.h" #include "group.h" #include "modify.h" -#include "fix.h" #include "fix_store.h" #include "comm.h" #include "memory.h" diff --git a/src/CORESHELL/pair_born_coul_dsf_cs.cpp b/src/CORESHELL/pair_born_coul_dsf_cs.cpp index cd932e560b..9440bca109 100644 --- a/src/CORESHELL/pair_born_coul_dsf_cs.cpp +++ b/src/CORESHELL/pair_born_coul_dsf_cs.cpp @@ -18,17 +18,11 @@ #include "pair_born_coul_dsf_cs.h" #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "math_const.h" -#include "memory.h" -#include "error.h" #include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/CORESHELL/pair_born_coul_long_cs.cpp b/src/CORESHELL/pair_born_coul_long_cs.cpp index 2ef7fdb273..f6262fa9e7 100644 --- a/src/CORESHELL/pair_born_coul_long_cs.cpp +++ b/src/CORESHELL/pair_born_coul_long_cs.cpp @@ -17,21 +17,12 @@ #include "pair_born_coul_long_cs.h" #include -#include -#include #include #include "atom.h" -#include "comm.h" #include "force.h" -#include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" -#include "math_const.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; #define EWALD_F 1.12837917 #define EWALD_P 9.95473818e-1 diff --git a/src/CORESHELL/pair_born_coul_wolf_cs.cpp b/src/CORESHELL/pair_born_coul_wolf_cs.cpp index c0374e2ddb..398c2ba1ee 100644 --- a/src/CORESHELL/pair_born_coul_wolf_cs.cpp +++ b/src/CORESHELL/pair_born_coul_wolf_cs.cpp @@ -14,22 +14,14 @@ #include "pair_born_coul_wolf_cs.h" #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "math_const.h" -#include "math_special.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; using namespace MathConst; -using namespace MathSpecial; #define EPSILON 1.0e-20 diff --git a/src/CORESHELL/pair_buck_coul_long_cs.cpp b/src/CORESHELL/pair_buck_coul_long_cs.cpp index 6c897622fa..1392ec1880 100644 --- a/src/CORESHELL/pair_buck_coul_long_cs.cpp +++ b/src/CORESHELL/pair_buck_coul_long_cs.cpp @@ -17,21 +17,11 @@ #include "pair_buck_coul_long_cs.h" #include -#include -#include -#include #include "atom.h" -#include "comm.h" #include "force.h" -#include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" -#include "math_const.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; #define EWALD_F 1.12837917 #define EWALD_P 9.95473818e-1 diff --git a/src/CORESHELL/pair_coul_long_cs.cpp b/src/CORESHELL/pair_coul_long_cs.cpp index 6094ae072a..8280799389 100644 --- a/src/CORESHELL/pair_coul_long_cs.cpp +++ b/src/CORESHELL/pair_coul_long_cs.cpp @@ -17,20 +17,9 @@ #include "pair_coul_long_cs.h" #include -#include -#include -#include #include "atom.h" -#include "comm.h" #include "force.h" -#include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/CORESHELL/pair_coul_wolf_cs.cpp b/src/CORESHELL/pair_coul_wolf_cs.cpp index 40ade7bfe4..20b7339480 100644 --- a/src/CORESHELL/pair_coul_wolf_cs.cpp +++ b/src/CORESHELL/pair_coul_wolf_cs.cpp @@ -13,22 +13,14 @@ #include "pair_coul_wolf_cs.h" #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "math_const.h" -#include "math_special.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; using namespace MathConst; -using namespace MathSpecial; #define EPSILON 1.0e-20 diff --git a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp index 3f20377cf1..7ad544051a 100644 --- a/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp +++ b/src/CORESHELL/pair_lj_cut_coul_long_cs.cpp @@ -17,25 +17,11 @@ #include "pair_lj_cut_coul_long_cs.h" #include -#include -#include -#include #include "atom.h" -#include "comm.h" #include "force.h" -#include "kspace.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "math_const.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; #define EWALD_F 1.12837917 #define EWALD_P 9.95473818e-1 -- GitLab From 316554297c15d1a5dc62f7d0649c6c5d8a6e9bae Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 6 Jul 2019 10:00:24 -0400 Subject: [PATCH 135/236] clean up includes in packages DIPOLE and GRANULAR --- src/DIPOLE/pair_lj_cut_dipole_cut.cpp | 2 +- src/DIPOLE/pair_lj_cut_dipole_long.cpp | 3 +-- src/DIPOLE/pair_lj_long_dipole_long.cpp | 6 +----- src/GRANULAR/fix_freeze.cpp | 2 +- src/GRANULAR/fix_pour.cpp | 2 +- src/GRANULAR/fix_wall_gran.cpp | 2 -- src/GRANULAR/fix_wall_gran_region.cpp | 7 ------- src/GRANULAR/pair_gran_hertz_history.cpp | 2 -- src/GRANULAR/pair_gran_hooke.cpp | 2 -- src/GRANULAR/pair_gran_hooke_history.cpp | 5 +---- src/GRANULAR/pair_granular.cpp | 5 +---- 11 files changed, 7 insertions(+), 31 deletions(-) diff --git a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp index 44708edec9..14c511c100 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_cut.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_cut.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_dipole_cut.h" +#include #include -#include #include #include "atom.h" #include "neighbor.h" diff --git a/src/DIPOLE/pair_lj_cut_dipole_long.cpp b/src/DIPOLE/pair_lj_cut_dipole_long.cpp index 071dbaeb02..fe020ed2e6 100644 --- a/src/DIPOLE/pair_lj_cut_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_cut_dipole_long.cpp @@ -12,9 +12,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_dipole_long.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/DIPOLE/pair_lj_long_dipole_long.cpp b/src/DIPOLE/pair_lj_long_dipole_long.cpp index 1391cc1a1a..5e7819c2f4 100644 --- a/src/DIPOLE/pair_lj_long_dipole_long.cpp +++ b/src/DIPOLE/pair_lj_long_dipole_long.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_long_dipole_long.h" +#include #include -#include -#include #include #include "math_const.h" #include "math_vector.h" @@ -26,12 +25,9 @@ #include "comm.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" -#include "respa.h" #include "memory.h" #include "error.h" diff --git a/src/GRANULAR/fix_freeze.cpp b/src/GRANULAR/fix_freeze.cpp index e2345bdf19..1df5c9d0a8 100644 --- a/src/GRANULAR/fix_freeze.cpp +++ b/src/GRANULAR/fix_freeze.cpp @@ -12,11 +12,11 @@ ------------------------------------------------------------------------- */ #include "fix_freeze.h" +#include #include #include "atom.h" #include "update.h" #include "modify.h" -#include "comm.h" #include "respa.h" #include "error.h" diff --git a/src/GRANULAR/fix_pour.cpp b/src/GRANULAR/fix_pour.cpp index 0fe7493127..3b1bbcef35 100644 --- a/src/GRANULAR/fix_pour.cpp +++ b/src/GRANULAR/fix_pour.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include "fix_pour.h" +#include #include -#include #include #include "atom.h" #include "atom_vec.h" diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index b0fbc0c2b8..e7464a78a9 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -18,13 +18,11 @@ #include "fix_wall_gran.h" #include -#include #include #include "atom.h" #include "domain.h" #include "update.h" #include "force.h" -#include "pair.h" #include "modify.h" #include "respa.h" #include "math_const.h" diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index 97e889ddcc..a4b798d6aa 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -16,18 +16,12 @@ ------------------------------------------------------------------------- */ #include "fix_wall_gran_region.h" -#include -#include #include #include "region.h" #include "atom.h" #include "domain.h" #include "update.h" -#include "force.h" #include "pair.h" -#include "modify.h" -#include "respa.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "comm.h" @@ -35,7 +29,6 @@ using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; // same as FixWallGran diff --git a/src/GRANULAR/pair_gran_hertz_history.cpp b/src/GRANULAR/pair_gran_hertz_history.cpp index e303089e56..4a362c0928 100644 --- a/src/GRANULAR/pair_gran_hertz_history.cpp +++ b/src/GRANULAR/pair_gran_hertz_history.cpp @@ -17,8 +17,6 @@ #include "pair_gran_hertz_history.h" #include -#include -#include #include #include "atom.h" #include "update.h" diff --git a/src/GRANULAR/pair_gran_hooke.cpp b/src/GRANULAR/pair_gran_hooke.cpp index a30aa0bb6c..d4be320554 100644 --- a/src/GRANULAR/pair_gran_hooke.cpp +++ b/src/GRANULAR/pair_gran_hooke.cpp @@ -17,8 +17,6 @@ #include "pair_gran_hooke.h" #include -#include -#include #include "atom.h" #include "force.h" #include "fix.h" diff --git a/src/GRANULAR/pair_gran_hooke_history.cpp b/src/GRANULAR/pair_gran_hooke_history.cpp index f832fdfac3..771a5566df 100644 --- a/src/GRANULAR/pair_gran_hooke_history.cpp +++ b/src/GRANULAR/pair_gran_hooke_history.cpp @@ -16,13 +16,10 @@ ------------------------------------------------------------------------- */ #include "pair_gran_hooke_history.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" -#include "domain.h" #include "force.h" #include "update.h" #include "modify.h" diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 942587a676..e7b4c01f5e 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -17,13 +17,10 @@ See the README file in the top-level LAMMPS directory. ----------------------------------------------------------------------- */ #include "pair_granular.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" -#include "domain.h" #include "force.h" #include "update.h" #include "modify.h" -- GitLab From 61ed3b65b75c3781bce511cc00ff298b023965ab Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 6 Jul 2019 10:20:13 -0400 Subject: [PATCH 136/236] clean up includes in KSPACE package --- src/KSPACE/ewald.cpp | 3 --- src/KSPACE/ewald_dipole.cpp | 5 ----- src/KSPACE/ewald_dipole_spin.cpp | 7 ------- src/KSPACE/ewald_disp.cpp | 2 -- src/KSPACE/gridcomm.cpp | 2 -- src/KSPACE/msm.cpp | 2 -- src/KSPACE/msm_cg.cpp | 5 ----- src/KSPACE/pair_born_coul_long.cpp | 2 -- src/KSPACE/pair_born_coul_msm.cpp | 6 ------ src/KSPACE/pair_coul_long.cpp | 6 +----- src/KSPACE/pair_coul_msm.cpp | 7 ------- src/KSPACE/pair_lj_charmm_coul_long.cpp | 3 --- src/KSPACE/pair_lj_charmm_coul_msm.cpp | 7 ------- src/KSPACE/pair_lj_charmmfsw_coul_long.cpp | 4 ---- src/KSPACE/pair_lj_cut_coul_long.cpp | 3 --- src/KSPACE/pair_lj_cut_coul_msm.cpp | 9 --------- src/KSPACE/pair_lj_cut_tip4p_long.cpp | 7 +------ src/KSPACE/pair_lj_long_coul_long.cpp | 4 +--- src/KSPACE/pair_lj_long_tip4p_long.cpp | 7 +------ src/KSPACE/pair_tip4p_long.cpp | 7 +------ src/KSPACE/pppm.cpp | 2 -- src/KSPACE/pppm_cg.cpp | 2 +- src/KSPACE/pppm_dipole.cpp | 5 ----- src/KSPACE/pppm_dipole_spin.cpp | 10 ---------- src/KSPACE/pppm_disp.cpp | 2 -- src/KSPACE/pppm_disp_tip4p.cpp | 1 - src/KSPACE/pppm_stagger.cpp | 3 --- src/KSPACE/pppm_tip4p.cpp | 2 +- src/KSPACE/remap.cpp | 1 + 29 files changed, 8 insertions(+), 118 deletions(-) diff --git a/src/KSPACE/ewald.cpp b/src/KSPACE/ewald.cpp index aad0e364d0..d74d90b0d6 100644 --- a/src/KSPACE/ewald.cpp +++ b/src/KSPACE/ewald.cpp @@ -20,9 +20,6 @@ #include "ewald.h" #include -#include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/ewald_dipole.cpp b/src/KSPACE/ewald_dipole.cpp index 53bac0637f..c3442beef5 100644 --- a/src/KSPACE/ewald_dipole.cpp +++ b/src/KSPACE/ewald_dipole.cpp @@ -17,8 +17,6 @@ #include "ewald_dipole.h" #include -#include -#include #include #include #include "atom.h" @@ -32,9 +30,6 @@ #include "error.h" #include "update.h" -#include "math_const.h" -#include "math_special.h" - using namespace LAMMPS_NS; using namespace MathConst; using namespace MathSpecial; diff --git a/src/KSPACE/ewald_dipole_spin.cpp b/src/KSPACE/ewald_dipole_spin.cpp index 2b6c95f174..e7d67680a1 100644 --- a/src/KSPACE/ewald_dipole_spin.cpp +++ b/src/KSPACE/ewald_dipole_spin.cpp @@ -17,8 +17,6 @@ #include "ewald_dipole_spin.h" #include -#include -#include #include #include #include "atom.h" @@ -27,17 +25,12 @@ #include "pair.h" #include "domain.h" #include "math_const.h" -#include "math_special.h" #include "memory.h" #include "error.h" #include "update.h" -#include "math_const.h" -#include "math_special.h" - using namespace LAMMPS_NS; using namespace MathConst; -using namespace MathSpecial; #define SMALL 0.00001 diff --git a/src/KSPACE/ewald_disp.cpp b/src/KSPACE/ewald_disp.cpp index c775056dd8..a7ac66fdd3 100644 --- a/src/KSPACE/ewald_disp.cpp +++ b/src/KSPACE/ewald_disp.cpp @@ -18,8 +18,6 @@ #include "ewald_disp.h" #include #include -#include -#include #include #include "math_vector.h" #include "math_const.h" diff --git a/src/KSPACE/gridcomm.cpp b/src/KSPACE/gridcomm.cpp index 552d80daab..368e7370fe 100644 --- a/src/KSPACE/gridcomm.cpp +++ b/src/KSPACE/gridcomm.cpp @@ -13,10 +13,8 @@ #include "gridcomm.h" #include -#include "comm.h" #include "kspace.h" #include "memory.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/KSPACE/msm.cpp b/src/KSPACE/msm.cpp index bc5360dcd2..81dbabdbbd 100644 --- a/src/KSPACE/msm.cpp +++ b/src/KSPACE/msm.cpp @@ -18,8 +18,6 @@ #include "msm.h" #include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/msm_cg.cpp b/src/KSPACE/msm_cg.cpp index 22976b8442..9119d51878 100644 --- a/src/KSPACE/msm_cg.cpp +++ b/src/KSPACE/msm_cg.cpp @@ -18,8 +18,6 @@ #include "msm_cg.h" #include #include -#include -#include #include #include "atom.h" #include "gridcomm.h" @@ -29,10 +27,7 @@ #include "neighbor.h" #include "memory.h" -#include "math_const.h" - using namespace LAMMPS_NS; -using namespace MathConst; #define OFFSET 16384 #define SMALLQ 0.00001 diff --git a/src/KSPACE/pair_born_coul_long.cpp b/src/KSPACE/pair_born_coul_long.cpp index cb8360e401..e248a24ef7 100644 --- a/src/KSPACE/pair_born_coul_long.cpp +++ b/src/KSPACE/pair_born_coul_long.cpp @@ -17,8 +17,6 @@ #include "pair_born_coul_long.h" #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pair_born_coul_msm.cpp b/src/KSPACE/pair_born_coul_msm.cpp index deaf224334..7300cd92e0 100644 --- a/src/KSPACE/pair_born_coul_msm.cpp +++ b/src/KSPACE/pair_born_coul_msm.cpp @@ -17,21 +17,15 @@ #include "pair_born_coul_msm.h" #include -#include -#include #include #include "atom.h" -#include "comm.h" #include "force.h" #include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_coul_long.cpp b/src/KSPACE/pair_coul_long.cpp index cb45b7a906..7cedf3d003 100644 --- a/src/KSPACE/pair_coul_long.cpp +++ b/src/KSPACE/pair_coul_long.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_coul_long.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" @@ -26,9 +25,6 @@ #include "kspace.h" #include "neighbor.h" #include "neigh_list.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pair_coul_msm.cpp b/src/KSPACE/pair_coul_msm.cpp index 2173171e79..0917bb9275 100644 --- a/src/KSPACE/pair_coul_msm.cpp +++ b/src/KSPACE/pair_coul_msm.cpp @@ -17,18 +17,11 @@ #include "pair_coul_msm.h" #include -#include -#include #include #include "atom.h" -#include "comm.h" #include "force.h" #include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index 3ad14c8ea7..751ee77388 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -17,15 +17,12 @@ #include "pair_lj_charmm_coul_long.h" #include -#include -#include #include #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/KSPACE/pair_lj_charmm_coul_msm.cpp b/src/KSPACE/pair_lj_charmm_coul_msm.cpp index 2d1775802f..804ae5919d 100644 --- a/src/KSPACE/pair_lj_charmm_coul_msm.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_msm.cpp @@ -17,19 +17,12 @@ #include "pair_lj_charmm_coul_msm.h" #include -#include -#include #include #include "atom.h" -#include "comm.h" #include "force.h" #include "kspace.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index 7f32613cba..494a349768 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -21,16 +21,12 @@ #include "pair_lj_charmmfsw_coul_long.h" #include -#include -#include #include #include "atom.h" -#include "update.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 59f4766fa3..7921c814c3 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -17,15 +17,12 @@ #include "pair_lj_cut_coul_long.h" #include -#include -#include #include #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/KSPACE/pair_lj_cut_coul_msm.cpp b/src/KSPACE/pair_lj_cut_coul_msm.cpp index 1305d485da..f8021cc180 100644 --- a/src/KSPACE/pair_lj_cut_coul_msm.cpp +++ b/src/KSPACE/pair_lj_cut_coul_msm.cpp @@ -17,25 +17,16 @@ #include "pair_lj_cut_coul_msm.h" #include -#include -#include #include #include "atom.h" -#include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" -#include "respa.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_cut_tip4p_long.cpp b/src/KSPACE/pair_lj_cut_tip4p_long.cpp index cd9b3c032d..c98092f19b 100644 --- a/src/KSPACE/pair_lj_cut_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_cut_tip4p_long.cpp @@ -17,9 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_tip4p_long.h" +#include #include -#include -#include #include #include "angle.h" #include "atom.h" @@ -27,12 +26,8 @@ #include "comm.h" #include "domain.h" #include "force.h" -#include "kspace.h" -#include "update.h" -#include "respa.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 46dbb60a96..610fc4e89b 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -18,9 +18,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_long_coul_long.h" +#include #include -#include -#include #include #include "math_vector.h" #include "atom.h" @@ -31,7 +30,6 @@ #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pair_lj_long_tip4p_long.cpp b/src/KSPACE/pair_lj_long_tip4p_long.cpp index 5a1e347c78..08409dce72 100644 --- a/src/KSPACE/pair_lj_long_tip4p_long.cpp +++ b/src/KSPACE/pair_lj_long_tip4p_long.cpp @@ -17,9 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_long_tip4p_long.h" +#include #include -#include -#include #include #include "angle.h" #include "atom.h" @@ -27,12 +26,8 @@ #include "comm.h" #include "domain.h" #include "force.h" -#include "kspace.h" -#include "update.h" -#include "respa.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pair_tip4p_long.cpp b/src/KSPACE/pair_tip4p_long.cpp index deb8662a8b..2c47f42beb 100644 --- a/src/KSPACE/pair_tip4p_long.cpp +++ b/src/KSPACE/pair_tip4p_long.cpp @@ -17,9 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_tip4p_long.h" +#include #include -#include -#include #include #include "angle.h" #include "atom.h" @@ -27,12 +26,8 @@ #include "comm.h" #include "domain.h" #include "force.h" -#include "kspace.h" -#include "update.h" -#include "respa.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pppm.cpp b/src/KSPACE/pppm.cpp index ae545c5c27..90db943750 100644 --- a/src/KSPACE/pppm.cpp +++ b/src/KSPACE/pppm.cpp @@ -21,8 +21,6 @@ #include "pppm.h" #include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/KSPACE/pppm_cg.cpp b/src/KSPACE/pppm_cg.cpp index f9bd7b0cb4..bd23dedef1 100644 --- a/src/KSPACE/pppm_cg.cpp +++ b/src/KSPACE/pppm_cg.cpp @@ -18,7 +18,6 @@ #include "pppm_cg.h" #include #include -#include #include #include "atom.h" #include "gridcomm.h" @@ -28,6 +27,7 @@ #include "neighbor.h" #include "memory.h" #include "math_const.h" +#include "remap.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/KSPACE/pppm_dipole.cpp b/src/KSPACE/pppm_dipole.cpp index ad03b8205a..0eb761d9be 100644 --- a/src/KSPACE/pppm_dipole.cpp +++ b/src/KSPACE/pppm_dipole.cpp @@ -18,17 +18,12 @@ #include "pppm_dipole.h" #include #include -#include -#include #include #include "atom.h" #include "comm.h" #include "gridcomm.h" -#include "neighbor.h" #include "force.h" #include "pair.h" -#include "bond.h" -#include "angle.h" #include "domain.h" #include "fft3d_wrap.h" #include "remap_wrap.h" diff --git a/src/KSPACE/pppm_dipole_spin.cpp b/src/KSPACE/pppm_dipole_spin.cpp index 2c96eadde1..9e9f07322c 100644 --- a/src/KSPACE/pppm_dipole_spin.cpp +++ b/src/KSPACE/pppm_dipole_spin.cpp @@ -18,30 +18,20 @@ #include "pppm_dipole_spin.h" #include #include -#include -#include -#include #include "atom.h" #include "comm.h" #include "gridcomm.h" -#include "neighbor.h" #include "force.h" #include "pair.h" -#include "bond.h" -#include "angle.h" #include "domain.h" -#include "fft3d_wrap.h" -#include "remap_wrap.h" #include "memory.h" #include "error.h" #include "update.h" #include "math_const.h" -#include "math_special.h" using namespace LAMMPS_NS; using namespace MathConst; -using namespace MathSpecial; #define MAXORDER 7 #define OFFSET 16384 diff --git a/src/KSPACE/pppm_disp.cpp b/src/KSPACE/pppm_disp.cpp index 22e570049c..d936025d04 100644 --- a/src/KSPACE/pppm_disp.cpp +++ b/src/KSPACE/pppm_disp.cpp @@ -19,8 +19,6 @@ #include "pppm_disp.h" #include #include -#include -#include #include #include "math_const.h" #include "atom.h" diff --git a/src/KSPACE/pppm_disp_tip4p.cpp b/src/KSPACE/pppm_disp_tip4p.cpp index 36e6159131..bc46152e2b 100644 --- a/src/KSPACE/pppm_disp_tip4p.cpp +++ b/src/KSPACE/pppm_disp_tip4p.cpp @@ -22,7 +22,6 @@ #include "atom.h" #include "domain.h" #include "force.h" -#include "memory.h" #include "error.h" #include "math_const.h" diff --git a/src/KSPACE/pppm_stagger.cpp b/src/KSPACE/pppm_stagger.cpp index 5c2e2a6098..7b708d0355 100644 --- a/src/KSPACE/pppm_stagger.cpp +++ b/src/KSPACE/pppm_stagger.cpp @@ -18,12 +18,9 @@ #include "pppm_stagger.h" #include #include -#include -#include #include #include "atom.h" #include "gridcomm.h" -#include "force.h" #include "domain.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pppm_tip4p.cpp b/src/KSPACE/pppm_tip4p.cpp index 52a1fb3787..f664a0dca3 100644 --- a/src/KSPACE/pppm_tip4p.cpp +++ b/src/KSPACE/pppm_tip4p.cpp @@ -16,11 +16,11 @@ ------------------------------------------------------------------------- */ #include "pppm_tip4p.h" +#include #include #include "atom.h" #include "domain.h" #include "force.h" -#include "memory.h" #include "error.h" #include "math_const.h" diff --git a/src/KSPACE/remap.cpp b/src/KSPACE/remap.cpp index 85fe78c9d7..d4cfdea2b0 100644 --- a/src/KSPACE/remap.cpp +++ b/src/KSPACE/remap.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include "remap.h" +#include #include #include -- GitLab From 35e2401099f2332e1a65d3a26c23fe685e1b06e5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 7 Jul 2019 03:56:44 -0400 Subject: [PATCH 137/236] clean up includes in MANYBODY package --- src/MANYBODY/fix_qeq_comb.cpp | 3 - src/MANYBODY/pair_adp.cpp | 2 +- src/MANYBODY/pair_airebo.cpp | 5 -- src/MANYBODY/pair_airebo.h | 1 - src/MANYBODY/pair_airebo_morse.cpp | 2 - src/MANYBODY/pair_atm.cpp | 1 + src/MANYBODY/pair_bop.cpp | 7 +- src/MANYBODY/pair_bop.h | 104 +++++++++++--------------- src/MANYBODY/pair_comb.cpp | 3 +- src/MANYBODY/pair_comb.h | 1 - src/MANYBODY/pair_comb3.cpp | 4 +- src/MANYBODY/pair_comb3.h | 1 - src/MANYBODY/pair_eam.cpp | 2 +- src/MANYBODY/pair_eam_alloy.cpp | 3 +- src/MANYBODY/pair_eam_cd.cpp | 3 +- src/MANYBODY/pair_eam_fs.cpp | 3 +- src/MANYBODY/pair_eim.cpp | 3 +- src/MANYBODY/pair_gw.cpp | 2 +- src/MANYBODY/pair_gw_zbl.cpp | 5 +- src/MANYBODY/pair_lcbop.cpp | 21 +----- src/MANYBODY/pair_lcbop.h | 1 - src/MANYBODY/pair_nb3b_harmonic.cpp | 4 +- src/MANYBODY/pair_polymorphic.cpp | 5 +- src/MANYBODY/pair_rebo.cpp | 2 +- src/MANYBODY/pair_sw.cpp | 10 +-- src/MANYBODY/pair_tersoff.cpp | 2 +- src/MANYBODY/pair_tersoff_mod.cpp | 8 +- src/MANYBODY/pair_tersoff_mod_c.cpp | 8 +- src/MANYBODY/pair_tersoff_zbl.cpp | 7 +- src/MANYBODY/pair_vashishta.cpp | 10 +-- src/MANYBODY/pair_vashishta_table.cpp | 9 +-- 31 files changed, 77 insertions(+), 165 deletions(-) diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index 9e9bbcc9d6..2f324bf097 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -18,13 +18,10 @@ #include "fix_qeq_comb.h" #include #include -#include #include #include "pair_comb.h" #include "pair_comb3.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/MANYBODY/pair_adp.cpp b/src/MANYBODY/pair_adp.cpp index 8051f97634..64c778659c 100644 --- a/src/MANYBODY/pair_adp.cpp +++ b/src/MANYBODY/pair_adp.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_adp.h" +#include #include -#include #include #include #include "atom.h" diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index fd2016b7a7..818663222f 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -22,26 +22,21 @@ #include "pair_airebo.h" #include -#include -#include #include #include #include "atom.h" #include "neighbor.h" #include "force.h" #include "comm.h" -#include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "my_page.h" -#include "math_const.h" #include "math_special.h" #include "memory.h" #include "error.h" #include "utils.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace MathSpecial; #define MAXLINE 1024 diff --git a/src/MANYBODY/pair_airebo.h b/src/MANYBODY/pair_airebo.h index 8e92807afb..04d3fc399f 100644 --- a/src/MANYBODY/pair_airebo.h +++ b/src/MANYBODY/pair_airebo.h @@ -21,7 +21,6 @@ PairStyle(airebo,PairAIREBO) #define LMP_PAIR_AIREBO_H #include "pair.h" -#include "my_page.h" #include #include "math_const.h" diff --git a/src/MANYBODY/pair_airebo_morse.cpp b/src/MANYBODY/pair_airebo_morse.cpp index a39f7df82e..121f9557fd 100644 --- a/src/MANYBODY/pair_airebo_morse.cpp +++ b/src/MANYBODY/pair_airebo_morse.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "pair_airebo_morse.h" -#include "force.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/MANYBODY/pair_atm.cpp b/src/MANYBODY/pair_atm.cpp index ba68033721..e604f44003 100644 --- a/src/MANYBODY/pair_atm.cpp +++ b/src/MANYBODY/pair_atm.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "pair_atm.h" +#include #include #include "atom.h" #include "citeme.h" diff --git a/src/MANYBODY/pair_bop.cpp b/src/MANYBODY/pair_bop.cpp index 27c24ce3d7..38c33e5963 100644 --- a/src/MANYBODY/pair_bop.cpp +++ b/src/MANYBODY/pair_bop.cpp @@ -34,22 +34,17 @@ #include "pair_bop.h" #include -#include -#include #include +#include #include #include "atom.h" #include "neighbor.h" #include "neigh_request.h" #include "force.h" #include "comm.h" -#include "domain.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" -#include using namespace LAMMPS_NS; diff --git a/src/MANYBODY/pair_bop.h b/src/MANYBODY/pair_bop.h index 3bd9b8cea9..eca0ec52b8 100644 --- a/src/MANYBODY/pair_bop.h +++ b/src/MANYBODY/pair_bop.h @@ -26,8 +26,6 @@ PairStyle(bop,PairBOP) #define LMP_PAIR_BOP_H #include "pair.h" -#include -#include "update.h" namespace LAMMPS_NS { @@ -44,20 +42,20 @@ class PairBOP : public Pair { private: int me; - int maxneigh; // maximum size of neighbor list on this processor - int maxneigh3; // maximum size of neighbor list on this processor - int update_list; // check for changing maximum size of neighbor list - int maxbopn; // maximum size of bop neighbor list for allocation - int maxnall; // maximum size of bop neighbor list for allocation - int *map; // mapping from atom types to elements - int nelements; // # of unique elments - int nr; // increments for the BOP pair potential - int ntheta; // increments for the angle function - int npower; // power of the angular function - int nBOt; // second BO increments - int bop_types; // number of elments in potential - int npairs; // number of element pairs - char **elements; // names of unique elements + int maxneigh; // maximum size of neighbor list on this processor + int maxneigh3; // maximum size of neighbor list on this processor + int update_list; // check for changing maximum size of neighbor list + int maxbopn; // maximum size of bop neighbor list for allocation + int maxnall; // maximum size of bop neighbor list for allocation + int *map; // mapping from atom types to elements + int nelements; // # of unique elments + int nr; // increments for the BOP pair potential + int ntheta; // increments for the angle function + int npower; // power of the angular function + int nBOt; // second BO increments + int bop_types; // number of elments in potential + int npairs; // number of element pairs + char **elements; // names of unique elements int ***elem2param; int nparams; int bop_step; @@ -66,23 +64,22 @@ class PairBOP : public Pair { int allocate_neigh; int nb_pi,nb_sg; int ago1; -// int cnt1; - - int *BOP_index; // index for neighbor list position - int *BOP_total; // index for neighbor list position - int *BOP_index3; // index for neighbor list position - int *BOP_total3; // index for neighbor list position - int *neigh_index; // index for neighbor list position - int *neigh_index3; // index for neighbor list position - int neigh_total; // total number of neighbors stored - int neigh_total3; // total number of neighbors stored - int *cos_index; // index for neighbor cosine if not using on the fly - int *neigh_flag; // index for neighbor cosine if not using on the fly - int *neigh_flag3; // index for neighbor cosine if not using on the fly - int cos_total; // number of cosines stored if not using on the fly - int neigh_ct; // limit for large arrays - -/*Parameters variables*/ + + int *BOP_index; // index for neighbor list position + int *BOP_total; // index for neighbor list position + int *BOP_index3; // index for neighbor list position + int *BOP_total3; // index for neighbor list position + int *neigh_index; // index for neighbor list position + int *neigh_index3; // index for neighbor list position + int neigh_total; // total number of neighbors stored + int neigh_total3; // total number of neighbors stored + int *cos_index; // index for neighbor cosine if not using on the fly + int *neigh_flag; // index for neighbor cosine if not using on the fly + int *neigh_flag3; // index for neighbor cosine if not using on the fly + int cos_total; // number of cosines stored if not using on the fly + int neigh_ct; // limit for large arrays + + // Parameters variables int ncutoff,nfunc; int a_flag; @@ -98,51 +95,50 @@ class PairBOP : public Pair { double beta3,rsmall,rbig,rcore; char **words; - double cutmax; //max cutoff for all elements - int otfly; //Defines whether to do on the fly - //calculations of angles and distances - //on the fly will slow down calculations - //but requires less memory on = 1, off=0 + double cutmax; // max cutoff for all elements + int otfly; // Defines whether to do on the fly + // calculations of angles and distances + // on the fly will slow down calculations + // but requires less memory on = 1, off=0 -/* Neigh variables */ + // Neigh variables double *rcut,*rcut3,*dr,*rdr,*dr3,*rdr3; double *rcutsq,*rcutsq3; double **disij,*rij; double rcutall,rctroot; -/*Triple variables */ + // Triple variables double *cosAng,***dcosAng,***dcAng; -/*Double variables */ + // Double variables double *betaS,*dBetaS,*betaP; double *dBetaP,*repul,*dRepul; -/*Sigma variables */ + // Sigma variables int *itypeSigBk,nSigBk; double sigB,sigB_0; double sigB1; - -/*Pi variables */ + // Pi variables int *itypePiBk,nPiBk; double piB,piB_0; -/*Grids1 variables */ + // Grids1 variables double **pBetaS,**pBetaS1,**pBetaS2,**pBetaS3; double **pBetaS4,**pBetaS5,**pBetaS6; -/*Grids2 variables */ + // Grids2 variables double **pBetaP,**pBetaP1,**pBetaP2,**pBetaP3; double **pBetaP4,**pBetaP5,**pBetaP6; -/*Grids3 variables */ + // Grids3 variables double **pRepul,**pRepul1,**pRepul2,**pRepul3; double **pRepul4,**pRepul5,**pRepul6; @@ -155,13 +151,13 @@ class PairBOP : public Pair { double ****gfunc4,****gfunc5,****gfunc6; double dtheta,rdtheta; -/*Grids4 variables */ + // Grids4 variables double **FsigBO,**FsigBO1,**FsigBO2,**FsigBO3; double **FsigBO4,**FsigBO5,**FsigBO6; double dBO,rdBO; -/* End of BOP variables */ + // End of BOP variables double **rcmin,**rcmax,**rcmaxp; struct B_PI{ @@ -211,14 +207,6 @@ class PairBOP : public Pair { void memory_theta_destroy(); void memory_theta_grow(); double cutoff(double, double, int, double); -/* - double betaSfunc(int, double); - double dBetaSfunc(int, double, double, double); - double betaPfunc(int, double); - double dBetaPfunc(int, double, double, double); - double repulfunc(int, double); - double dRepulfunc(int, double, double, double); -*/ void read_table(char *); void allocate(); @@ -229,9 +217,7 @@ class PairBOP : public Pair { void grow_pi(int,int); void grow_sigma(int,int); }; - } - #endif #endif diff --git a/src/MANYBODY/pair_comb.cpp b/src/MANYBODY/pair_comb.cpp index b9a17eeb35..2fc4caec7b 100644 --- a/src/MANYBODY/pair_comb.cpp +++ b/src/MANYBODY/pair_comb.cpp @@ -19,8 +19,8 @@ ------------------------------------------------------------------------- */ #include "pair_comb.h" +#include #include -#include #include #include #include "atom.h" @@ -30,7 +30,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "group.h" -#include "update.h" #include "my_page.h" #include "math_const.h" #include "memory.h" diff --git a/src/MANYBODY/pair_comb.h b/src/MANYBODY/pair_comb.h index c798d5f347..19788dfab1 100644 --- a/src/MANYBODY/pair_comb.h +++ b/src/MANYBODY/pair_comb.h @@ -21,7 +21,6 @@ PairStyle(comb,PairComb) #define LMP_PAIR_COMB_H #include "pair.h" -#include "my_page.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_comb3.cpp b/src/MANYBODY/pair_comb3.cpp index 846ef7d4b9..6f1732dbb7 100644 --- a/src/MANYBODY/pair_comb3.cpp +++ b/src/MANYBODY/pair_comb3.cpp @@ -18,18 +18,18 @@ ------------------------------------------------------------------------- */ #include "pair_comb3.h" +#include #include -#include #include #include #include "atom.h" #include "comm.h" #include "force.h" +#include "my_page.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "group.h" -#include "update.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/MANYBODY/pair_comb3.h b/src/MANYBODY/pair_comb3.h index 5d7e5d6beb..210f843139 100644 --- a/src/MANYBODY/pair_comb3.h +++ b/src/MANYBODY/pair_comb3.h @@ -21,7 +21,6 @@ PairStyle(comb3,PairComb3) #define LMP_PAIR_COMB3_H #include "pair.h" -#include "my_page.h" namespace LAMMPS_NS { diff --git a/src/MANYBODY/pair_eam.cpp b/src/MANYBODY/pair_eam.cpp index e6476b78c5..acb0e654d8 100644 --- a/src/MANYBODY/pair_eam.cpp +++ b/src/MANYBODY/pair_eam.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_eam.h" +#include #include -#include #include #include #include "atom.h" diff --git a/src/MANYBODY/pair_eam_alloy.cpp b/src/MANYBODY/pair_eam_alloy.cpp index 7aae786720..5b7f9877d7 100644 --- a/src/MANYBODY/pair_eam_alloy.cpp +++ b/src/MANYBODY/pair_eam_alloy.cpp @@ -16,8 +16,7 @@ ------------------------------------------------------------------------- */ #include "pair_eam_alloy.h" -#include -#include +#include #include #include "atom.h" #include "comm.h" diff --git a/src/MANYBODY/pair_eam_cd.cpp b/src/MANYBODY/pair_eam_cd.cpp index 55ad597cce..28004eae7f 100644 --- a/src/MANYBODY/pair_eam_cd.cpp +++ b/src/MANYBODY/pair_eam_cd.cpp @@ -18,14 +18,13 @@ ------------------------------------------------------------------------- */ #include "pair_eam_cd.h" +#include #include -#include #include #include #include "atom.h" #include "force.h" #include "comm.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/MANYBODY/pair_eam_fs.cpp b/src/MANYBODY/pair_eam_fs.cpp index 7b13988d0c..7e00783922 100644 --- a/src/MANYBODY/pair_eam_fs.cpp +++ b/src/MANYBODY/pair_eam_fs.cpp @@ -16,8 +16,7 @@ ------------------------------------------------------------------------- */ #include "pair_eam_fs.h" -#include -#include +#include #include #include "atom.h" #include "comm.h" diff --git a/src/MANYBODY/pair_eim.cpp b/src/MANYBODY/pair_eim.cpp index 58cb1fd2e0..dd65d92cdd 100644 --- a/src/MANYBODY/pair_eim.cpp +++ b/src/MANYBODY/pair_eim.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_eim.h" +#include #include -#include -#include #include #include "atom.h" #include "force.h" diff --git a/src/MANYBODY/pair_gw.cpp b/src/MANYBODY/pair_gw.cpp index 07e9201f94..667311812b 100644 --- a/src/MANYBODY/pair_gw.cpp +++ b/src/MANYBODY/pair_gw.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_gw.h" +#include #include -#include #include #include #include "atom.h" diff --git a/src/MANYBODY/pair_gw_zbl.cpp b/src/MANYBODY/pair_gw_zbl.cpp index cd83727ed3..d39bf53b99 100644 --- a/src/MANYBODY/pair_gw_zbl.cpp +++ b/src/MANYBODY/pair_gw_zbl.cpp @@ -17,15 +17,12 @@ ------------------------------------------------------------------------- */ #include "pair_gw_zbl.h" +#include #include -#include #include #include #include "atom.h" #include "update.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "force.h" #include "comm.h" #include "memory.h" diff --git a/src/MANYBODY/pair_lcbop.cpp b/src/MANYBODY/pair_lcbop.cpp index b0240978a9..873a675cd9 100644 --- a/src/MANYBODY/pair_lcbop.cpp +++ b/src/MANYBODY/pair_lcbop.cpp @@ -17,26 +17,20 @@ ------------------------------------------------------------------------- */ #include "pair_lcbop.h" +#include #include -#include -#include #include -#include #include "atom.h" -#include "neighbor.h" -#include "neigh_request.h" #include "force.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "my_page.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; #define MAXLINE 1024 #define TOL 1.0e-9 @@ -1099,19 +1093,6 @@ void PairLCBOP::read_file(char *filename) init coefficients for TF_conj ------------------------------------------------------------------------- */ -#include -#include -#include -template< class function > void print_function( double x_0, double x_1, size_t n, function f, std::ostream &stream ) { - double dx = (x_1-x_0)/n; - for( double x=x_0; x<=x_1+0.0001; x+=dx ) { - double f_val, df; - f_val = f(x, &df); - stream << x << " " << f_val << " " << df << std::endl; - } - stream << std::endl; -} - void PairLCBOP::spline_init() { for( size_t N_conj_ij=0; N_conj_ij<2; N_conj_ij++ ) // N_conj_ij for( size_t N_ij=0; N_ij<4-1; N_ij++ ) diff --git a/src/MANYBODY/pair_lcbop.h b/src/MANYBODY/pair_lcbop.h index 0d7c7a51b1..c7a7fab46d 100644 --- a/src/MANYBODY/pair_lcbop.h +++ b/src/MANYBODY/pair_lcbop.h @@ -21,7 +21,6 @@ PairStyle(lcbop,PairLCBOP) #define LMP_PAIR_LCBOP_H #include "pair.h" -#include "my_page.h" #include #include "math_const.h" diff --git a/src/MANYBODY/pair_nb3b_harmonic.cpp b/src/MANYBODY/pair_nb3b_harmonic.cpp index ac20c3e61f..92456790cc 100644 --- a/src/MANYBODY/pair_nb3b_harmonic.cpp +++ b/src/MANYBODY/pair_nb3b_harmonic.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_nb3b_harmonic.h" +#include #include -#include #include #include #include "atom.h" @@ -26,8 +26,6 @@ #include "neigh_request.h" #include "force.h" #include "comm.h" -#include "memory.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/MANYBODY/pair_polymorphic.cpp b/src/MANYBODY/pair_polymorphic.cpp index 0cca50823d..d3964b292c 100644 --- a/src/MANYBODY/pair_polymorphic.cpp +++ b/src/MANYBODY/pair_polymorphic.cpp @@ -17,8 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_polymorphic.h" +#include #include -#include #include #include #include "atom.h" @@ -30,10 +30,7 @@ #include "memory.h" #include "error.h" -#include "math_const.h" - using namespace LAMMPS_NS; -using namespace MathConst; #define MAXLINE 1024 #define DELTA 4 diff --git a/src/MANYBODY/pair_rebo.cpp b/src/MANYBODY/pair_rebo.cpp index e07a1b3495..06357d8368 100644 --- a/src/MANYBODY/pair_rebo.cpp +++ b/src/MANYBODY/pair_rebo.cpp @@ -26,7 +26,7 @@ PairREBO::PairREBO(LAMMPS *lmp) : PairAIREBO(lmp) { global settings ------------------------------------------------------------------------- */ -void PairREBO::settings(int narg, char **/*arg*/) +void PairREBO::settings(int narg, char ** /* arg */) { if (narg != 0) error->all(FLERR,"Illegal pair_style command"); diff --git a/src/MANYBODY/pair_sw.cpp b/src/MANYBODY/pair_sw.cpp index ea47fc97c3..f1d1a6fa9f 100644 --- a/src/MANYBODY/pair_sw.cpp +++ b/src/MANYBODY/pair_sw.cpp @@ -16,20 +16,18 @@ ------------------------------------------------------------------------- */ #include "pair_sw.h" +#include #include -#include #include #include #include "atom.h" -#include "neighbor.h" -#include "neigh_request.h" -#include "force.h" #include "comm.h" +#include "error.h" +#include "force.h" #include "memory.h" #include "neighbor.h" #include "neigh_list.h" -#include "memory.h" -#include "error.h" +#include "neigh_request.h" using namespace LAMMPS_NS; diff --git a/src/MANYBODY/pair_tersoff.cpp b/src/MANYBODY/pair_tersoff.cpp index 9d7f804f9a..62c74576e0 100644 --- a/src/MANYBODY/pair_tersoff.cpp +++ b/src/MANYBODY/pair_tersoff.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_tersoff.h" +#include #include -#include #include #include #include "atom.h" diff --git a/src/MANYBODY/pair_tersoff_mod.cpp b/src/MANYBODY/pair_tersoff_mod.cpp index df3c41fc33..698dd8fa03 100644 --- a/src/MANYBODY/pair_tersoff_mod.cpp +++ b/src/MANYBODY/pair_tersoff_mod.cpp @@ -17,21 +17,17 @@ ------------------------------------------------------------------------- */ #include "pair_tersoff_mod.h" +#include #include -#include #include #include #include "atom.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "force.h" #include "comm.h" +#include "math_const.h" #include "memory.h" #include "error.h" -#include "math_const.h" - using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/MANYBODY/pair_tersoff_mod_c.cpp b/src/MANYBODY/pair_tersoff_mod_c.cpp index d34291f6cd..6c2c4f4e7a 100644 --- a/src/MANYBODY/pair_tersoff_mod_c.cpp +++ b/src/MANYBODY/pair_tersoff_mod_c.cpp @@ -16,23 +16,17 @@ ------------------------------------------------------------------------- */ #include "pair_tersoff_mod_c.h" +#include #include -#include #include #include #include "atom.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "force.h" #include "comm.h" #include "memory.h" #include "error.h" -#include "math_const.h" - using namespace LAMMPS_NS; -using namespace MathConst; #define MAXLINE 1024 #define DELTA 4 diff --git a/src/MANYBODY/pair_tersoff_zbl.cpp b/src/MANYBODY/pair_tersoff_zbl.cpp index 6a8aa40782..ab06e6ec31 100644 --- a/src/MANYBODY/pair_tersoff_zbl.cpp +++ b/src/MANYBODY/pair_tersoff_zbl.cpp @@ -17,21 +17,18 @@ ------------------------------------------------------------------------- */ #include "pair_tersoff_zbl.h" +#include #include -#include #include #include #include "atom.h" #include "update.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "force.h" #include "comm.h" #include "memory.h" #include "error.h" - #include "math_const.h" + using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/MANYBODY/pair_vashishta.cpp b/src/MANYBODY/pair_vashishta.cpp index 5055dadfaf..13b44c58a4 100644 --- a/src/MANYBODY/pair_vashishta.cpp +++ b/src/MANYBODY/pair_vashishta.cpp @@ -17,20 +17,18 @@ ------------------------------------------------------------------------- */ #include "pair_vashishta.h" +#include #include -#include #include #include #include "atom.h" -#include "neighbor.h" -#include "neigh_request.h" -#include "force.h" #include "comm.h" +#include "error.h" +#include "force.h" #include "memory.h" #include "neighbor.h" #include "neigh_list.h" -#include "memory.h" -#include "error.h" +#include "neigh_request.h" using namespace LAMMPS_NS; diff --git a/src/MANYBODY/pair_vashishta_table.cpp b/src/MANYBODY/pair_vashishta_table.cpp index 726e0f83f1..bf39183b9d 100644 --- a/src/MANYBODY/pair_vashishta_table.cpp +++ b/src/MANYBODY/pair_vashishta_table.cpp @@ -16,20 +16,13 @@ ------------------------------------------------------------------------- */ #include "pair_vashishta_table.h" -#include #include -#include -#include #include "atom.h" -#include "neighbor.h" -#include "neigh_request.h" +#include "error.h" #include "force.h" #include "comm.h" #include "memory.h" -#include "neighbor.h" #include "neigh_list.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; -- GitLab From e5af9db84c7aee6f86e8cb1598fd99e65c4689d0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 7 Jul 2019 11:49:13 -0400 Subject: [PATCH 138/236] clean up includes in MC and MISC package --- src/MC/fix_atom_swap.cpp | 11 ++--------- src/MC/fix_bond_break.cpp | 4 ---- src/MC/fix_bond_create.cpp | 3 --- src/MC/fix_gcmc.cpp | 1 - src/MC/fix_tfmc.cpp | 1 - src/MC/pair_dsmc.cpp | 4 +--- src/MISC/compute_msd_nongauss.cpp | 3 +-- src/MISC/compute_ti.cpp | 1 - src/MISC/dump_xtc.cpp | 1 - src/MISC/fix_deposit.cpp | 2 +- src/MISC/fix_efield.cpp | 3 +-- src/MISC/fix_evaporate.cpp | 4 +--- src/MISC/fix_gld.cpp | 5 +---- src/MISC/fix_oneway.cpp | 1 - src/MISC/fix_orient_bcc.cpp | 1 - src/MISC/fix_orient_fcc.cpp | 1 - src/MISC/fix_thermal_conductivity.cpp | 2 -- src/MISC/fix_ttm.cpp | 2 -- src/MISC/fix_viscosity.cpp | 3 +-- src/MISC/pair_nm_cut.cpp | 3 +-- src/MISC/pair_nm_cut_coul_cut.cpp | 3 +-- src/MISC/pair_nm_cut_coul_long.cpp | 6 +----- src/MISC/xdr_compat.cpp | 1 - src/MISC/xdr_compat.h | 1 - 24 files changed, 12 insertions(+), 55 deletions(-) diff --git a/src/MC/fix_atom_swap.cpp b/src/MC/fix_atom_swap.cpp index c14efcca46..9a4a0b6a7f 100644 --- a/src/MC/fix_atom_swap.cpp +++ b/src/MC/fix_atom_swap.cpp @@ -17,13 +17,12 @@ ------------------------------------------------------------------------- */ #include "fix_atom_swap.h" +#include #include +#include #include -#include #include #include "atom.h" -#include "atom_vec.h" -#include "atom_vec_hybrid.h" #include "update.h" #include "modify.h" #include "fix.h" @@ -40,18 +39,12 @@ #include "dihedral.h" #include "improper.h" #include "kspace.h" -#include "math_const.h" #include "memory.h" #include "error.h" -#include "thermo.h" -#include "output.h" #include "neighbor.h" -#include -using namespace std; using namespace LAMMPS_NS; using namespace FixConst; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index 1b07395f1e..2ff0e4126f 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -12,18 +12,14 @@ ------------------------------------------------------------------------- */ #include "fix_bond_break.h" -#include #include #include -#include #include "update.h" #include "respa.h" #include "atom.h" -#include "atom_vec.h" #include "force.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "random_mars.h" #include "memory.h" #include "error.h" diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index d2d93b67f6..3f63a22d60 100644 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -12,14 +12,11 @@ ------------------------------------------------------------------------- */ #include "fix_bond_create.h" -#include #include #include -#include #include "update.h" #include "respa.h" #include "atom.h" -#include "atom_vec.h" #include "force.h" #include "pair.h" #include "comm.h" diff --git a/src/MC/fix_gcmc.cpp b/src/MC/fix_gcmc.cpp index 8fe6042c2e..1050fd4712 100644 --- a/src/MC/fix_gcmc.cpp +++ b/src/MC/fix_gcmc.cpp @@ -21,7 +21,6 @@ #include #include "atom.h" #include "atom_vec.h" -#include "atom_vec_hybrid.h" #include "molecule.h" #include "update.h" #include "modify.h" diff --git a/src/MC/fix_tfmc.cpp b/src/MC/fix_tfmc.cpp index 46c5e592ae..e57f1cdf4a 100644 --- a/src/MC/fix_tfmc.cpp +++ b/src/MC/fix_tfmc.cpp @@ -22,7 +22,6 @@ #include #include "atom.h" #include "force.h" -#include "update.h" #include "group.h" #include "random_mars.h" #include "comm.h" diff --git a/src/MC/pair_dsmc.cpp b/src/MC/pair_dsmc.cpp index cf48706133..43bffa7e8d 100644 --- a/src/MC/pair_dsmc.cpp +++ b/src/MC/pair_dsmc.cpp @@ -16,10 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_dsmc.h" +#include #include -#include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/MISC/compute_msd_nongauss.cpp b/src/MISC/compute_msd_nongauss.cpp index e02dd633cb..6123bf49af 100644 --- a/src/MISC/compute_msd_nongauss.cpp +++ b/src/MISC/compute_msd_nongauss.cpp @@ -16,13 +16,12 @@ ------------------------------------------------------------------------- */ #include "compute_msd_nongauss.h" -#include +#include #include "atom.h" #include "update.h" #include "group.h" #include "domain.h" #include "fix_store.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/MISC/compute_ti.cpp b/src/MISC/compute_ti.cpp index 266263785f..06188de238 100644 --- a/src/MISC/compute_ti.cpp +++ b/src/MISC/compute_ti.cpp @@ -20,7 +20,6 @@ #include #include "atom.h" #include "update.h" -#include "modify.h" #include "domain.h" #include "force.h" #include "pair.h" diff --git a/src/MISC/dump_xtc.cpp b/src/MISC/dump_xtc.cpp index 7abe4c4093..1a2b71ab6d 100644 --- a/src/MISC/dump_xtc.cpp +++ b/src/MISC/dump_xtc.cpp @@ -24,7 +24,6 @@ #include "dump_xtc.h" #include -#include #include #include #include diff --git a/src/MISC/fix_deposit.cpp b/src/MISC/fix_deposit.cpp index 22a144da60..c9d4958594 100644 --- a/src/MISC/fix_deposit.cpp +++ b/src/MISC/fix_deposit.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include "fix_deposit.h" +#include #include -#include #include #include "atom.h" #include "atom_vec.h" diff --git a/src/MISC/fix_efield.cpp b/src/MISC/fix_efield.cpp index 87ece82f57..5a13b93b91 100644 --- a/src/MISC/fix_efield.cpp +++ b/src/MISC/fix_efield.cpp @@ -17,9 +17,8 @@ ------------------------------------------------------------------------- */ #include "fix_efield.h" -#include +#include #include -#include #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/MISC/fix_evaporate.cpp b/src/MISC/fix_evaporate.cpp index e2c7844853..d868254c50 100644 --- a/src/MISC/fix_evaporate.cpp +++ b/src/MISC/fix_evaporate.cpp @@ -12,8 +12,7 @@ ------------------------------------------------------------------------- */ #include "fix_evaporate.h" -#include -#include +#include #include #include "atom.h" #include "atom_vec.h" @@ -25,7 +24,6 @@ #include "force.h" #include "group.h" #include "random_park.h" -#include "random_mars.h" #include "memory.h" #include "error.h" diff --git a/src/MISC/fix_gld.cpp b/src/MISC/fix_gld.cpp index 265ee4fb09..380c038e4a 100644 --- a/src/MISC/fix_gld.cpp +++ b/src/MISC/fix_gld.cpp @@ -17,17 +17,14 @@ ------------------------------------------------------------------------- */ #include "fix_gld.h" +#include #include -#include #include -#include "math_extra.h" #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "comm.h" -#include "input.h" -#include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" diff --git a/src/MISC/fix_oneway.cpp b/src/MISC/fix_oneway.cpp index fcf5a7a0bd..68a27b68be 100644 --- a/src/MISC/fix_oneway.cpp +++ b/src/MISC/fix_oneway.cpp @@ -22,7 +22,6 @@ #include "error.h" #include "force.h" #include "region.h" -#include "error.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/MISC/fix_orient_bcc.cpp b/src/MISC/fix_orient_bcc.cpp index a300631658..1453ceb317 100644 --- a/src/MISC/fix_orient_bcc.cpp +++ b/src/MISC/fix_orient_bcc.cpp @@ -30,7 +30,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "comm.h" -#include "output.h" #include "force.h" #include "math_const.h" #include "citeme.h" diff --git a/src/MISC/fix_orient_fcc.cpp b/src/MISC/fix_orient_fcc.cpp index d898f95d2c..082ecaf459 100644 --- a/src/MISC/fix_orient_fcc.cpp +++ b/src/MISC/fix_orient_fcc.cpp @@ -27,7 +27,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "comm.h" -#include "output.h" #include "force.h" #include "math_const.h" #include "citeme.h" diff --git a/src/MISC/fix_thermal_conductivity.cpp b/src/MISC/fix_thermal_conductivity.cpp index 8da303c8ab..d0add6fecb 100644 --- a/src/MISC/fix_thermal_conductivity.cpp +++ b/src/MISC/fix_thermal_conductivity.cpp @@ -17,10 +17,8 @@ ------------------------------------------------------------------------- */ #include "fix_thermal_conductivity.h" -#include #include #include -#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/MISC/fix_ttm.cpp b/src/MISC/fix_ttm.cpp index 06de732de6..eb9eb2620d 100644 --- a/src/MISC/fix_ttm.cpp +++ b/src/MISC/fix_ttm.cpp @@ -20,12 +20,10 @@ #include #include #include -#include #include "atom.h" #include "force.h" #include "update.h" #include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" #include "random_mars.h" diff --git a/src/MISC/fix_viscosity.cpp b/src/MISC/fix_viscosity.cpp index 52107954c2..d5a97cd4b0 100644 --- a/src/MISC/fix_viscosity.cpp +++ b/src/MISC/fix_viscosity.cpp @@ -17,10 +17,9 @@ ------------------------------------------------------------------------- */ #include "fix_viscosity.h" -#include #include +#include #include -#include #include "atom.h" #include "domain.h" #include "modify.h" diff --git a/src/MISC/pair_nm_cut.cpp b/src/MISC/pair_nm_cut.cpp index 9b8c36da3a..a084491a78 100644 --- a/src/MISC/pair_nm_cut.cpp +++ b/src/MISC/pair_nm_cut.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_nm_cut.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/MISC/pair_nm_cut_coul_cut.cpp b/src/MISC/pair_nm_cut_coul_cut.cpp index 069c363817..df8a34062a 100644 --- a/src/MISC/pair_nm_cut_coul_cut.cpp +++ b/src/MISC/pair_nm_cut_coul_cut.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_nm_cut_coul_cut.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/MISC/pair_nm_cut_coul_long.cpp b/src/MISC/pair_nm_cut_coul_long.cpp index b3d42b05f8..4109fb0d9e 100644 --- a/src/MISC/pair_nm_cut_coul_long.cpp +++ b/src/MISC/pair_nm_cut_coul_long.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "pair_nm_cut_coul_long.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" -#include "update.h" -#include "integrate.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/MISC/xdr_compat.cpp b/src/MISC/xdr_compat.cpp index e124d52d7b..9806b0bbd2 100644 --- a/src/MISC/xdr_compat.cpp +++ b/src/MISC/xdr_compat.cpp @@ -1,6 +1,5 @@ #include "xdr_compat.h" #include -#include #include /* This file is needed for systems, that do not provide XDR support diff --git a/src/MISC/xdr_compat.h b/src/MISC/xdr_compat.h index 3062235080..5dfa01e0e8 100644 --- a/src/MISC/xdr_compat.h +++ b/src/MISC/xdr_compat.h @@ -3,7 +3,6 @@ #include #include -#include #ifdef __cplusplus extern "C" { -- GitLab From 57a558854908efe838e9da312389b49080149862 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 7 Jul 2019 15:46:34 -0400 Subject: [PATCH 139/236] cleaning up include file handling in packages MOLECULE and PERI --- src/MOLECULE/angle_charmm.cpp | 2 +- src/MOLECULE/angle_cosine.cpp | 2 +- src/MOLECULE/angle_cosine_delta.cpp | 4 ---- src/MOLECULE/angle_cosine_periodic.cpp | 2 +- src/MOLECULE/angle_cosine_squared.cpp | 2 +- src/MOLECULE/angle_harmonic.cpp | 2 +- src/MOLECULE/angle_table.cpp | 1 + src/MOLECULE/atom_vec_template.cpp | 1 - src/MOLECULE/bond_fene.cpp | 3 +-- src/MOLECULE/bond_fene_expand.cpp | 3 +-- src/MOLECULE/bond_gromos.cpp | 4 +--- src/MOLECULE/bond_harmonic.cpp | 3 +-- src/MOLECULE/bond_morse.cpp | 3 +-- src/MOLECULE/bond_nonlinear.cpp | 3 +-- src/MOLECULE/bond_quartic.cpp | 4 +--- src/MOLECULE/bond_table.cpp | 2 +- src/MOLECULE/dihedral_charmm.cpp | 2 -- src/MOLECULE/dihedral_charmmfsw.cpp | 2 -- src/MOLECULE/dihedral_harmonic.cpp | 2 -- src/MOLECULE/dihedral_helix.cpp | 2 -- src/MOLECULE/dihedral_multi_harmonic.cpp | 3 +-- src/MOLECULE/dihedral_opls.cpp | 3 +-- src/MOLECULE/fix_cmap.cpp | 4 ---- src/MOLECULE/improper_cvff.cpp | 2 -- src/MOLECULE/improper_harmonic.cpp | 2 -- src/MOLECULE/improper_umbrella.cpp | 2 -- src/MOLECULE/pair_hbond_dreiding_lj.cpp | 3 --- src/MOLECULE/pair_hbond_dreiding_morse.cpp | 3 --- src/MOLECULE/pair_lj_charmm_coul_charmm.cpp | 3 +-- .../pair_lj_charmm_coul_charmm_implicit.cpp | 2 -- .../pair_lj_charmmfsw_coul_charmmfsh.cpp | 3 +-- src/MOLECULE/pair_lj_cut_tip4p_cut.cpp | 2 +- src/MOLECULE/pair_tip4p_cut.cpp | 4 +--- src/PERI/compute_damage_atom.cpp | 2 -- src/PERI/compute_dilatation_atom.cpp | 4 +--- src/PERI/compute_plasticity_atom.cpp | 3 +-- src/PERI/fix_peri_neigh.cpp | 3 +-- src/PERI/pair_peri_eps.cpp | 16 +++++++--------- src/PERI/pair_peri_lps.cpp | 4 +--- src/PERI/pair_peri_pmb.cpp | 4 +--- src/PERI/pair_peri_ves.cpp | 16 ++++++++-------- 41 files changed, 40 insertions(+), 97 deletions(-) diff --git a/src/MOLECULE/angle_charmm.cpp b/src/MOLECULE/angle_charmm.cpp index fb0afd78c3..8a45f29368 100644 --- a/src/MOLECULE/angle_charmm.cpp +++ b/src/MOLECULE/angle_charmm.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "angle_charmm.h" +#include #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_cosine.cpp b/src/MOLECULE/angle_cosine.cpp index aff5130323..645cf66ff2 100644 --- a/src/MOLECULE/angle_cosine.cpp +++ b/src/MOLECULE/angle_cosine.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include "angle_cosine.h" +#include #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_cosine_delta.cpp b/src/MOLECULE/angle_cosine_delta.cpp index 13ed00b327..679a8deb0e 100644 --- a/src/MOLECULE/angle_cosine_delta.cpp +++ b/src/MOLECULE/angle_cosine_delta.cpp @@ -17,14 +17,10 @@ #include "angle_cosine_delta.h" #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" -#include "comm.h" #include "force.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/MOLECULE/angle_cosine_periodic.cpp b/src/MOLECULE/angle_cosine_periodic.cpp index 9f7c02cabc..22c2f7ce8b 100644 --- a/src/MOLECULE/angle_cosine_periodic.cpp +++ b/src/MOLECULE/angle_cosine_periodic.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_periodic.h" +#include #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_cosine_squared.cpp b/src/MOLECULE/angle_cosine_squared.cpp index 789a536c98..56b3ee58cf 100644 --- a/src/MOLECULE/angle_cosine_squared.cpp +++ b/src/MOLECULE/angle_cosine_squared.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_squared.h" +#include #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_harmonic.cpp b/src/MOLECULE/angle_harmonic.cpp index b626bdfae5..2e96884c9d 100644 --- a/src/MOLECULE/angle_harmonic.cpp +++ b/src/MOLECULE/angle_harmonic.cpp @@ -12,8 +12,8 @@ ------------------------------------------------------------------------- */ #include "angle_harmonic.h" +#include #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/MOLECULE/angle_table.cpp b/src/MOLECULE/angle_table.cpp index ce7fcdcaf2..f05a8c6a4e 100644 --- a/src/MOLECULE/angle_table.cpp +++ b/src/MOLECULE/angle_table.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "angle_table.h" +#include #include #include #include diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index 6a12027b7b..4c5f576943 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "atom_vec_template.h" -#include #include #include "atom.h" #include "molecule.h" diff --git a/src/MOLECULE/bond_fene.cpp b/src/MOLECULE/bond_fene.cpp index d4f2a4010e..776291701b 100644 --- a/src/MOLECULE/bond_fene.cpp +++ b/src/MOLECULE/bond_fene.cpp @@ -12,11 +12,10 @@ ------------------------------------------------------------------------- */ #include "bond_fene.h" +#include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "update.h" #include "force.h" diff --git a/src/MOLECULE/bond_fene_expand.cpp b/src/MOLECULE/bond_fene_expand.cpp index 3e4ceab42c..d03dfd9125 100644 --- a/src/MOLECULE/bond_fene_expand.cpp +++ b/src/MOLECULE/bond_fene_expand.cpp @@ -12,11 +12,10 @@ ------------------------------------------------------------------------- */ #include "bond_fene_expand.h" +#include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "update.h" #include "force.h" diff --git a/src/MOLECULE/bond_gromos.cpp b/src/MOLECULE/bond_gromos.cpp index 44e99d8fe0..284c9202fd 100644 --- a/src/MOLECULE/bond_gromos.cpp +++ b/src/MOLECULE/bond_gromos.cpp @@ -16,12 +16,10 @@ ------------------------------------------------------------------------- */ #include "bond_gromos.h" -#include -#include +#include #include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/MOLECULE/bond_harmonic.cpp b/src/MOLECULE/bond_harmonic.cpp index bbbad4102d..7b19034629 100644 --- a/src/MOLECULE/bond_harmonic.cpp +++ b/src/MOLECULE/bond_harmonic.cpp @@ -12,12 +12,11 @@ ------------------------------------------------------------------------- */ #include "bond_harmonic.h" +#include #include -#include #include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/MOLECULE/bond_morse.cpp b/src/MOLECULE/bond_morse.cpp index af476d6fe8..6e16070cae 100644 --- a/src/MOLECULE/bond_morse.cpp +++ b/src/MOLECULE/bond_morse.cpp @@ -16,11 +16,10 @@ ------------------------------------------------------------------------- */ #include "bond_morse.h" +#include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/MOLECULE/bond_nonlinear.cpp b/src/MOLECULE/bond_nonlinear.cpp index 89ddb7b118..e06b1b9aac 100644 --- a/src/MOLECULE/bond_nonlinear.cpp +++ b/src/MOLECULE/bond_nonlinear.cpp @@ -12,11 +12,10 @@ ------------------------------------------------------------------------- */ #include "bond_nonlinear.h" +#include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/MOLECULE/bond_quartic.cpp b/src/MOLECULE/bond_quartic.cpp index 34b3ad8288..352b642bbe 100644 --- a/src/MOLECULE/bond_quartic.cpp +++ b/src/MOLECULE/bond_quartic.cpp @@ -16,13 +16,11 @@ ------------------------------------------------------------------------- */ #include "bond_quartic.h" +#include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" -#include "update.h" #include "force.h" #include "pair.h" #include "memory.h" diff --git a/src/MOLECULE/bond_table.cpp b/src/MOLECULE/bond_table.cpp index e80baee6e8..137690d002 100644 --- a/src/MOLECULE/bond_table.cpp +++ b/src/MOLECULE/bond_table.cpp @@ -16,12 +16,12 @@ ------------------------------------------------------------------------- */ #include "bond_table.h" +#include #include #include #include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index 1905c14358..8cc0713024 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -18,12 +18,10 @@ #include "dihedral_charmm.h" #include #include -#include #include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "pair.h" #include "update.h" diff --git a/src/MOLECULE/dihedral_charmmfsw.cpp b/src/MOLECULE/dihedral_charmmfsw.cpp index 9b02b908d6..f384c4cd36 100644 --- a/src/MOLECULE/dihedral_charmmfsw.cpp +++ b/src/MOLECULE/dihedral_charmmfsw.cpp @@ -21,12 +21,10 @@ #include "dihedral_charmmfsw.h" #include #include -#include #include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "pair.h" #include "update.h" diff --git a/src/MOLECULE/dihedral_harmonic.cpp b/src/MOLECULE/dihedral_harmonic.cpp index 159636ecd5..f1e5811a84 100644 --- a/src/MOLECULE/dihedral_harmonic.cpp +++ b/src/MOLECULE/dihedral_harmonic.cpp @@ -18,11 +18,9 @@ #include "dihedral_harmonic.h" #include #include -#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "memory.h" diff --git a/src/MOLECULE/dihedral_helix.cpp b/src/MOLECULE/dihedral_helix.cpp index a7d2aba1d6..56f7a3b5e8 100644 --- a/src/MOLECULE/dihedral_helix.cpp +++ b/src/MOLECULE/dihedral_helix.cpp @@ -19,10 +19,8 @@ #include "dihedral_helix.h" #include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "update.h" diff --git a/src/MOLECULE/dihedral_multi_harmonic.cpp b/src/MOLECULE/dihedral_multi_harmonic.cpp index ba98cf6ddf..eda7cede3e 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.cpp +++ b/src/MOLECULE/dihedral_multi_harmonic.cpp @@ -16,11 +16,10 @@ ------------------------------------------------------------------------- */ #include "dihedral_multi_harmonic.h" +#include #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "update.h" diff --git a/src/MOLECULE/dihedral_opls.cpp b/src/MOLECULE/dihedral_opls.cpp index d68eba0bec..556efd850a 100644 --- a/src/MOLECULE/dihedral_opls.cpp +++ b/src/MOLECULE/dihedral_opls.cpp @@ -16,12 +16,11 @@ ------------------------------------------------------------------------- */ #include "dihedral_opls.h" +#include #include -#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "memory.h" diff --git a/src/MOLECULE/fix_cmap.cpp b/src/MOLECULE/fix_cmap.cpp index 3d5bf90bdc..fb0a550898 100644 --- a/src/MOLECULE/fix_cmap.cpp +++ b/src/MOLECULE/fix_cmap.cpp @@ -32,15 +32,11 @@ #include #include #include -#include #include "atom.h" -#include "atom_vec.h" #include "update.h" #include "respa.h" -#include "modify.h" #include "domain.h" #include "force.h" -#include "group.h" #include "comm.h" #include "math_const.h" #include "memory.h" diff --git a/src/MOLECULE/improper_cvff.cpp b/src/MOLECULE/improper_cvff.cpp index fd24ab69c3..abd2d4e11e 100644 --- a/src/MOLECULE/improper_cvff.cpp +++ b/src/MOLECULE/improper_cvff.cpp @@ -14,11 +14,9 @@ #include "improper_cvff.h" #include #include -#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "memory.h" diff --git a/src/MOLECULE/improper_harmonic.cpp b/src/MOLECULE/improper_harmonic.cpp index 936c22e94a..778fe646e1 100644 --- a/src/MOLECULE/improper_harmonic.cpp +++ b/src/MOLECULE/improper_harmonic.cpp @@ -14,11 +14,9 @@ #include "improper_harmonic.h" #include #include -#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "math_const.h" diff --git a/src/MOLECULE/improper_umbrella.cpp b/src/MOLECULE/improper_umbrella.cpp index 2e41ac6493..d3adf19993 100644 --- a/src/MOLECULE/improper_umbrella.cpp +++ b/src/MOLECULE/improper_umbrella.cpp @@ -18,11 +18,9 @@ #include "improper_umbrella.h" #include #include -#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "math_const.h" diff --git a/src/MOLECULE/pair_hbond_dreiding_lj.cpp b/src/MOLECULE/pair_hbond_dreiding_lj.cpp index 58666f27d1..53c3101708 100644 --- a/src/MOLECULE/pair_hbond_dreiding_lj.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_lj.cpp @@ -17,13 +17,10 @@ #include "pair_hbond_dreiding_lj.h" #include -#include -#include #include #include "atom.h" #include "atom_vec.h" #include "molecule.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MOLECULE/pair_hbond_dreiding_morse.cpp b/src/MOLECULE/pair_hbond_dreiding_morse.cpp index 120a2d8d55..3039a662e6 100644 --- a/src/MOLECULE/pair_hbond_dreiding_morse.cpp +++ b/src/MOLECULE/pair_hbond_dreiding_morse.cpp @@ -17,13 +17,10 @@ #include "pair_hbond_dreiding_morse.h" #include -#include -#include #include #include "atom.h" #include "atom_vec.h" #include "molecule.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_request.h" diff --git a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp index c9becb75c3..5ebfe0a110 100644 --- a/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp +++ b/src/MOLECULE/pair_lj_charmm_coul_charmm.cpp @@ -16,9 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_charmm_coul_charmm.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp b/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp index a2be2936b2..ff7dbb290b 100644 --- a/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp +++ b/src/MOLECULE/pair_lj_charmm_coul_charmm_implicit.cpp @@ -12,8 +12,6 @@ ------------------------------------------------------------------------- */ #include "pair_lj_charmm_coul_charmm_implicit.h" -#include -#include #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp index f2f16c88ce..4fb7cc5229 100644 --- a/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp +++ b/src/MOLECULE/pair_lj_charmmfsw_coul_charmmfsh.cpp @@ -20,9 +20,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_charmmfsw_coul_charmmfsh.h" +#include #include -#include -#include #include #include "atom.h" #include "update.h" diff --git a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp index 5bb82d7635..e5f25a511b 100644 --- a/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp +++ b/src/MOLECULE/pair_lj_cut_tip4p_cut.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_tip4p_cut.h" +#include #include -#include #include #include "atom.h" #include "force.h" diff --git a/src/MOLECULE/pair_tip4p_cut.cpp b/src/MOLECULE/pair_tip4p_cut.cpp index 1511c09384..3a6702c9b2 100644 --- a/src/MOLECULE/pair_tip4p_cut.cpp +++ b/src/MOLECULE/pair_tip4p_cut.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_tip4p_cut.h" +#include #include -#include #include "atom.h" #include "force.h" #include "neighbor.h" @@ -26,12 +26,10 @@ #include "angle.h" #include "bond.h" #include "comm.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/PERI/compute_damage_atom.cpp b/src/PERI/compute_damage_atom.cpp index f5a532cd0b..230b766725 100644 --- a/src/PERI/compute_damage_atom.cpp +++ b/src/PERI/compute_damage_atom.cpp @@ -21,8 +21,6 @@ #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" -#include "pair_peri_pmb.h" #include "fix_peri_neigh.h" #include "memory.h" #include "error.h" diff --git a/src/PERI/compute_dilatation_atom.cpp b/src/PERI/compute_dilatation_atom.cpp index 7a6607d65c..095f619838 100644 --- a/src/PERI/compute_dilatation_atom.cpp +++ b/src/PERI/compute_dilatation_atom.cpp @@ -21,13 +21,11 @@ #include "update.h" #include "modify.h" #include "comm.h" +#include "fix.h" #include "force.h" -#include "pair.h" #include "pair_peri_lps.h" -#include "pair_peri_pmb.h" #include "pair_peri_ves.h" #include "pair_peri_eps.h" -#include "fix_peri_neigh.h" #include "memory.h" #include "error.h" diff --git a/src/PERI/compute_plasticity_atom.cpp b/src/PERI/compute_plasticity_atom.cpp index 0b20bc5075..e312630b62 100644 --- a/src/PERI/compute_plasticity_atom.cpp +++ b/src/PERI/compute_plasticity_atom.cpp @@ -21,9 +21,8 @@ #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" -#include "pair_peri_pmb.h" #include "fix_peri_neigh.h" +#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/PERI/fix_peri_neigh.cpp b/src/PERI/fix_peri_neigh.cpp index 297936577f..70f46dcdc1 100644 --- a/src/PERI/fix_peri_neigh.cpp +++ b/src/PERI/fix_peri_neigh.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "fix_peri_neigh.h" +#include #include -#include "pair_peri_pmb.h" #include "pair_peri_lps.h" #include "pair_peri_ves.h" #include "pair_peri_eps.h" @@ -25,7 +25,6 @@ #include "domain.h" #include "force.h" #include "comm.h" -#include "update.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/PERI/pair_peri_eps.cpp b/src/PERI/pair_peri_eps.cpp index 07314081da..2579a9b75a 100644 --- a/src/PERI/pair_peri_eps.cpp +++ b/src/PERI/pair_peri_eps.cpp @@ -16,14 +16,13 @@ ------------------------------------------------------------------------- */ #include "pair_peri_eps.h" +#include #include -#include #include #include "atom.h" #include "domain.h" #include "lattice.h" #include "force.h" -#include "update.h" #include "modify.h" #include "fix.h" #include "fix_peri_neigh.h" @@ -32,7 +31,6 @@ #include "neigh_list.h" #include "memory.h" #include "error.h" -#include "update.h" using namespace LAMMPS_NS; @@ -451,12 +449,12 @@ void PairPeriEPS::coeff(int narg, char **arg) force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi); force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi); - double bulkmodulus_one = atof(arg[2]); - double shearmodulus_one = atof(arg[3]); - double cut_one = atof(arg[4]); - double s00_one = atof(arg[5]); - double alpha_one = atof(arg[6]); - double myieldstress_one = atof(arg[7]); + double bulkmodulus_one = force->numeric(FLERR,arg[2]); + double shearmodulus_one = force->numeric(FLERR,arg[3]); + double cut_one = force->numeric(FLERR,arg[4]); + double s00_one = force->numeric(FLERR,arg[5]); + double alpha_one = force->numeric(FLERR,arg[6]); + double myieldstress_one = force->numeric(FLERR,arg[7]); int count = 0; for (int i = ilo; i <= ihi; i++) { diff --git a/src/PERI/pair_peri_lps.cpp b/src/PERI/pair_peri_lps.cpp index 660209f3f5..f32ce5fb1c 100644 --- a/src/PERI/pair_peri_lps.cpp +++ b/src/PERI/pair_peri_lps.cpp @@ -16,14 +16,13 @@ ------------------------------------------------------------------------- */ #include "pair_peri_lps.h" +#include #include -#include #include #include "atom.h" #include "domain.h" #include "lattice.h" #include "force.h" -#include "update.h" #include "modify.h" #include "fix.h" #include "fix_peri_neigh.h" @@ -32,7 +31,6 @@ #include "neigh_list.h" #include "memory.h" #include "error.h" -#include "update.h" #include "math_const.h" using namespace LAMMPS_NS; diff --git a/src/PERI/pair_peri_pmb.cpp b/src/PERI/pair_peri_pmb.cpp index fa53efc344..ceab40d88d 100644 --- a/src/PERI/pair_peri_pmb.cpp +++ b/src/PERI/pair_peri_pmb.cpp @@ -16,22 +16,20 @@ ------------------------------------------------------------------------- */ #include "pair_peri_pmb.h" +#include #include #include -#include #include #include "atom.h" #include "domain.h" #include "lattice.h" #include "force.h" -#include "update.h" #include "modify.h" #include "fix.h" #include "fix_peri_neigh.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" diff --git a/src/PERI/pair_peri_ves.cpp b/src/PERI/pair_peri_ves.cpp index 1687bed35d..930ecc6812 100644 --- a/src/PERI/pair_peri_ves.cpp +++ b/src/PERI/pair_peri_ves.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "pair_peri_ves.h" +#include #include #include #include @@ -23,7 +24,6 @@ #include "domain.h" #include "lattice.h" #include "force.h" -#include "update.h" #include "modify.h" #include "fix.h" #include "fix_peri_neigh.h" @@ -428,13 +428,13 @@ void PairPeriVES::coeff(int narg, char **arg) force->bounds(FLERR,arg[0],atom->ntypes,ilo,ihi); force->bounds(FLERR,arg[1],atom->ntypes,jlo,jhi); - double bulkmodulus_one = atof(arg[2]); - double shearmodulus_one = atof(arg[3]); - double cut_one = atof(arg[4]); - double s00_one = atof(arg[5]); - double alpha_one = atof(arg[6]); - double mlambdai_one = atof(arg[7]); - double mtaui_one = atof(arg[8]); + double bulkmodulus_one = force->numeric(FLERR,arg[2]); + double shearmodulus_one = force->numeric(FLERR,arg[3]); + double cut_one = force->numeric(FLERR,arg[4]); + double s00_one = force->numeric(FLERR,arg[5]); + double alpha_one = force->numeric(FLERR,arg[6]); + double mlambdai_one = force->numeric(FLERR,arg[7]); + double mtaui_one = force->numeric(FLERR,arg[8]); int count = 0; for (int i = ilo; i <= ihi; i++) { -- GitLab From 13d4fbdcfbad171fd83ac74d7dcc66170979cd05 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 7 Jul 2019 16:23:36 -0400 Subject: [PATCH 140/236] clean up includes in QEQ, REPLICA, and RIGID packages --- src/PERI/pair_peri_ves.cpp | 1 - src/QEQ/fix_qeq.cpp | 12 +----------- src/QEQ/fix_qeq_dynamic.cpp | 5 +---- src/QEQ/fix_qeq_fire.cpp | 5 +---- src/QEQ/fix_qeq_point.cpp | 3 --- src/QEQ/fix_qeq_shielded.cpp | 3 --- src/QEQ/fix_qeq_slater.cpp | 3 --- src/REPLICA/compute_event_displace.cpp | 3 --- src/REPLICA/fix_event.cpp | 8 +------- src/REPLICA/fix_event_hyper.cpp | 9 +-------- src/REPLICA/fix_event_prd.cpp | 9 +-------- src/REPLICA/fix_event_tad.cpp | 9 +-------- src/REPLICA/fix_hyper_global.cpp | 2 -- src/REPLICA/fix_hyper_local.cpp | 3 +-- src/REPLICA/fix_hyper_local.h | 1 - src/REPLICA/fix_neb.cpp | 1 - src/REPLICA/hyper.cpp | 4 +--- src/REPLICA/neb.cpp | 5 ----- src/REPLICA/prd.cpp | 9 --------- src/REPLICA/tad.cpp | 12 ------------ src/REPLICA/temper.cpp | 4 ---- src/REPLICA/verlet_split.cpp | 1 - src/RIGID/compute_erotate_rigid.cpp | 1 - src/RIGID/compute_ke_rigid.cpp | 1 - src/RIGID/compute_rigid_local.cpp | 1 - 25 files changed, 9 insertions(+), 106 deletions(-) diff --git a/src/PERI/pair_peri_ves.cpp b/src/PERI/pair_peri_ves.cpp index 930ecc6812..bd1eaa5fd2 100644 --- a/src/PERI/pair_peri_ves.cpp +++ b/src/PERI/pair_peri_ves.cpp @@ -18,7 +18,6 @@ #include "pair_peri_ves.h" #include #include -#include #include #include "atom.h" #include "domain.h" diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index 2e0b7edbe5..7768c01a41 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -17,28 +17,18 @@ ------------------------------------------------------------------------- */ #include "fix_qeq.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" -#include "domain.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "update.h" #include "force.h" -#include "kspace.h" -#include "group.h" -#include "pair.h" -#include "respa.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace FixConst; #define MAXLINE 1024 diff --git a/src/QEQ/fix_qeq_dynamic.cpp b/src/QEQ/fix_qeq_dynamic.cpp index fb5fd2ddac..a2cc683b56 100644 --- a/src/QEQ/fix_qeq_dynamic.cpp +++ b/src/QEQ/fix_qeq_dynamic.cpp @@ -16,23 +16,20 @@ ------------------------------------------------------------------------- */ #include "fix_qeq_dynamic.h" +#include #include -#include #include #include #include "atom.h" #include "comm.h" -#include "domain.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" #include "force.h" #include "group.h" -#include "pair.h" #include "kspace.h" #include "respa.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index 561a82b714..265528a089 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -16,25 +16,22 @@ ------------------------------------------------------------------------- */ #include "fix_qeq_fire.h" +#include #include -#include #include #include #include "atom.h" #include "comm.h" -#include "domain.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" #include "force.h" #include "group.h" -#include "pair.h" #include "pair_comb.h" #include "pair_comb3.h" #include "kspace.h" #include "respa.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/QEQ/fix_qeq_point.cpp b/src/QEQ/fix_qeq_point.cpp index bb3ce835fc..8fb9fd3273 100644 --- a/src/QEQ/fix_qeq_point.cpp +++ b/src/QEQ/fix_qeq_point.cpp @@ -17,12 +17,9 @@ #include "fix_qeq_point.h" #include -#include -#include #include #include "atom.h" #include "comm.h" -#include "domain.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/QEQ/fix_qeq_shielded.cpp b/src/QEQ/fix_qeq_shielded.cpp index 60ff62ca07..13e25475ae 100644 --- a/src/QEQ/fix_qeq_shielded.cpp +++ b/src/QEQ/fix_qeq_shielded.cpp @@ -17,12 +17,9 @@ #include "fix_qeq_shielded.h" #include -#include -#include #include #include "atom.h" #include "comm.h" -#include "domain.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/QEQ/fix_qeq_slater.cpp b/src/QEQ/fix_qeq_slater.cpp index 95105b5ef2..4f5369eb87 100644 --- a/src/QEQ/fix_qeq_slater.cpp +++ b/src/QEQ/fix_qeq_slater.cpp @@ -17,12 +17,10 @@ #include "fix_qeq_slater.h" #include -#include #include #include #include "atom.h" #include "comm.h" -#include "domain.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" @@ -33,7 +31,6 @@ #include "kspace.h" #include "respa.h" #include "math_const.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index 4c8d022d70..a6abcce85d 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -17,14 +17,11 @@ #include "compute_event_displace.h" #include -#include -#include #include #include "atom.h" #include "domain.h" #include "modify.h" #include "fix_event.h" -#include "memory.h" #include "error.h" #include "force.h" #include "update.h" diff --git a/src/REPLICA/fix_event.cpp b/src/REPLICA/fix_event.cpp index 8cf1acba94..41f91332cb 100644 --- a/src/REPLICA/fix_event.cpp +++ b/src/REPLICA/fix_event.cpp @@ -16,16 +16,10 @@ ------------------------------------------------------------------------- */ #include "fix_event.h" -#include -#include #include "atom.h" -#include "update.h" #include "domain.h" -#include "neighbor.h" -#include "comm.h" -#include "universe.h" -#include "memory.h" #include "error.h" +#include "memory.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/REPLICA/fix_event_hyper.cpp b/src/REPLICA/fix_event_hyper.cpp index 3dd1a03eb9..0d32516dee 100644 --- a/src/REPLICA/fix_event_hyper.cpp +++ b/src/REPLICA/fix_event_hyper.cpp @@ -12,16 +12,9 @@ ------------------------------------------------------------------------- */ #include "fix_event_hyper.h" -#include -#include -#include "atom.h" -#include "update.h" -#include "domain.h" -#include "neighbor.h" #include "comm.h" -#include "universe.h" -#include "memory.h" #include "error.h" +#include "update.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/REPLICA/fix_event_prd.cpp b/src/REPLICA/fix_event_prd.cpp index 63c9c2718b..19a89e988c 100644 --- a/src/REPLICA/fix_event_prd.cpp +++ b/src/REPLICA/fix_event_prd.cpp @@ -16,16 +16,9 @@ ------------------------------------------------------------------------- */ #include "fix_event_prd.h" -#include -#include -#include "atom.h" -#include "update.h" -#include "domain.h" -#include "neighbor.h" #include "comm.h" -#include "universe.h" -#include "memory.h" #include "error.h" +#include "update.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/REPLICA/fix_event_tad.cpp b/src/REPLICA/fix_event_tad.cpp index b92bc1fd73..d0b94a216b 100644 --- a/src/REPLICA/fix_event_tad.cpp +++ b/src/REPLICA/fix_event_tad.cpp @@ -16,16 +16,9 @@ ------------------------------------------------------------------------- */ #include "fix_event_tad.h" -#include -#include -#include "atom.h" -#include "update.h" -#include "domain.h" -#include "neighbor.h" #include "comm.h" -#include "universe.h" -#include "memory.h" #include "error.h" +#include "update.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/REPLICA/fix_hyper_global.cpp b/src/REPLICA/fix_hyper_global.cpp index a58798a63e..5e9da02768 100644 --- a/src/REPLICA/fix_hyper_global.cpp +++ b/src/REPLICA/fix_hyper_global.cpp @@ -14,7 +14,6 @@ #include "fix_hyper_global.h" #include #include -#include #include #include "atom.h" #include "update.h" @@ -24,7 +23,6 @@ #include "neighbor.h" #include "neigh_request.h" #include "neigh_list.h" -#include "modify.h" #include "math_extra.h" #include "memory.h" #include "error.h" diff --git a/src/REPLICA/fix_hyper_local.cpp b/src/REPLICA/fix_hyper_local.cpp index 555c5234f6..e8773095d1 100644 --- a/src/REPLICA/fix_hyper_local.cpp +++ b/src/REPLICA/fix_hyper_local.cpp @@ -14,7 +14,6 @@ #include "fix_hyper_local.h" #include #include -#include #include #include "atom.h" #include "update.h" @@ -22,10 +21,10 @@ #include "pair.h" #include "domain.h" #include "comm.h" +#include "my_page.h" #include "neighbor.h" #include "neigh_request.h" #include "neigh_list.h" -#include "modify.h" #include "math_extra.h" #include "memory.h" #include "error.h" diff --git a/src/REPLICA/fix_hyper_local.h b/src/REPLICA/fix_hyper_local.h index 6f13acb606..8fb3a445c2 100644 --- a/src/REPLICA/fix_hyper_local.h +++ b/src/REPLICA/fix_hyper_local.h @@ -21,7 +21,6 @@ FixStyle(hyper/local,FixHyperLocal) #define LMP_FIX_HYPER_LOCAL_H #include "fix_hyper.h" -#include "my_page.h" namespace LAMMPS_NS { diff --git a/src/REPLICA/fix_neb.cpp b/src/REPLICA/fix_neb.cpp index 2803c37b23..7b377ae9ec 100644 --- a/src/REPLICA/fix_neb.cpp +++ b/src/REPLICA/fix_neb.cpp @@ -19,7 +19,6 @@ #include "fix_neb.h" #include #include -#include #include #include "universe.h" #include "update.h" diff --git a/src/REPLICA/hyper.cpp b/src/REPLICA/hyper.cpp index c400ae097d..af2a963616 100644 --- a/src/REPLICA/hyper.cpp +++ b/src/REPLICA/hyper.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "hyper.h" -#include -#include +#include #include #include "update.h" -#include "atom.h" #include "domain.h" #include "region.h" #include "integrate.h" diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index b670f3d8f1..84337ce8ae 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -11,12 +11,7 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h -// due to OpenMPI bug which sets INT64_MAX via its mpi.h -// before lmptype.h can set flags to insure it is done correctly - #include "neb.h" -#include "lmptype.h" #include #include #include diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp index 19a12ddbbb..f631cc6a0a 100644 --- a/src/REPLICA/prd.cpp +++ b/src/REPLICA/prd.cpp @@ -15,15 +15,8 @@ Contributing author: Mike Brown (SNL) ------------------------------------------------------------------------- */ -// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h -// due to OpenMPI bug which sets INT64_MAX via its mpi.h -// before lmptype.h can set flags to insure it is done correctly - #include "prd.h" -#include "lmptype.h" #include -#include -#include #include #include "universe.h" #include "update.h" @@ -40,11 +33,9 @@ #include "fix.h" #include "fix_event_prd.h" #include "force.h" -#include "pair.h" #include "random_park.h" #include "random_mars.h" #include "output.h" -#include "dump.h" #include "finish.h" #include "timer.h" #include "memory.h" diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 90667b8865..8a51f6d00e 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -15,36 +15,24 @@ Contributing author: Aidan Thompson (SNL) ------------------------------------------------------------------------- */ -// lmptype.h must be first b/c this file uses MAXBIGINT and includes mpi.h -// due to OpenMPI bug which sets INT64_MAX via its mpi.h -// before lmptype.h can set flags to insure it is done correctly - #include "tad.h" -#include "lmptype.h" #include #include -#include #include #include "universe.h" #include "update.h" #include "atom.h" #include "domain.h" -#include "region.h" -#include "comm.h" -#include "velocity.h" #include "integrate.h" #include "min.h" #include "neighbor.h" #include "modify.h" #include "neb.h" #include "compute.h" -#include "fix.h" #include "fix_event_tad.h" #include "fix_store.h" #include "force.h" -#include "pair.h" #include "output.h" -#include "dump.h" #include "finish.h" #include "timer.h" #include "memory.h" diff --git a/src/REPLICA/temper.cpp b/src/REPLICA/temper.cpp index 6eb50c8d9f..46fc3af649 100644 --- a/src/REPLICA/temper.cpp +++ b/src/REPLICA/temper.cpp @@ -17,7 +17,6 @@ #include "temper.h" #include -#include #include #include "universe.h" #include "domain.h" @@ -27,13 +26,10 @@ #include "modify.h" #include "compute.h" #include "force.h" -#include "output.h" -#include "thermo.h" #include "fix.h" #include "random_park.h" #include "finish.h" #include "timer.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/REPLICA/verlet_split.cpp b/src/REPLICA/verlet_split.cpp index f268afe7f8..a5ed1a671d 100644 --- a/src/REPLICA/verlet_split.cpp +++ b/src/REPLICA/verlet_split.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include "verlet_split.h" -#include #include "universe.h" #include "neighbor.h" #include "domain.h" diff --git a/src/RIGID/compute_erotate_rigid.cpp b/src/RIGID/compute_erotate_rigid.cpp index 1a7236e263..e15c0deb82 100644 --- a/src/RIGID/compute_erotate_rigid.cpp +++ b/src/RIGID/compute_erotate_rigid.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "compute_erotate_rigid.h" -#include #include #include "update.h" #include "force.h" diff --git a/src/RIGID/compute_ke_rigid.cpp b/src/RIGID/compute_ke_rigid.cpp index 66b7a92566..031919b7a9 100644 --- a/src/RIGID/compute_ke_rigid.cpp +++ b/src/RIGID/compute_ke_rigid.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "compute_ke_rigid.h" -#include #include #include "update.h" #include "force.h" diff --git a/src/RIGID/compute_rigid_local.cpp b/src/RIGID/compute_rigid_local.cpp index 75334bb759..57f69a64e2 100644 --- a/src/RIGID/compute_rigid_local.cpp +++ b/src/RIGID/compute_rigid_local.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "compute_rigid_local.h" -#include #include #include "atom.h" #include "update.h" -- GitLab From 5b7ae3713b5722fc87871b716f6107885fd6cbe5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 7 Jul 2019 21:02:51 -0400 Subject: [PATCH 141/236] clean up include handling for VORONOI package --- src/VORONOI/compute_voronoi_atom.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/VORONOI/compute_voronoi_atom.cpp b/src/VORONOI/compute_voronoi_atom.cpp index 860126fa77..27252fae89 100644 --- a/src/VORONOI/compute_voronoi_atom.cpp +++ b/src/VORONOI/compute_voronoi_atom.cpp @@ -15,16 +15,14 @@ Contributing author: Daniel Schwen ------------------------------------------------------------------------- */ +#include "compute_voronoi_atom.h" #include #include #include -#include #include "voro++.hh" -#include "compute_voronoi_atom.h" #include "atom.h" #include "group.h" #include "update.h" -#include "modify.h" #include "domain.h" #include "memory.h" #include "error.h" -- GitLab From 60a808d25b61d57d68513d05cc5b99491610e53d Mon Sep 17 00:00:00 2001 From: jrgissing Date: Sun, 7 Jul 2019 21:17:23 -0600 Subject: [PATCH 142/236] bond/react: error->all vs. error->one also, correct several incorrect instances of error printing, which could cause code to hang without explanation --- src/USER-MISC/fix_bond_react.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp index c641912db6..7be8ec9f4f 100644 --- a/src/USER-MISC/fix_bond_react.cpp +++ b/src/USER-MISC/fix_bond_react.cpp @@ -1286,7 +1286,7 @@ void FixBondReact::make_a_guess() for (int i = 0; i < nxspecial[atom->map(glove[pion][1])][0]; i++) { if (atom->map(xspecial[atom->map(glove[pion][1])][i]) < 0) { - error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away1"); // parallel issues. + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); // parallel issues. } if (i_limit_tags[(int)atom->map(xspecial[atom->map(glove[pion][1])][i])] != 0) { status = GUESSFAIL; @@ -1397,7 +1397,7 @@ void FixBondReact::check_a_neighbor() //another check for ghost atoms. perhaps remove the one in make_a_guess if (atom->map(glove[(int)onemol_xspecial[pion][neigh]-1][1]) < 0) { - error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away2"); + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); } for (int j = 0; j < onemol_nxspecial[onemol_xspecial[pion][neigh]-1][0]; j++) { @@ -1449,7 +1449,7 @@ void FixBondReact::check_a_neighbor() //another check for ghost atoms. perhaps remove the one in make_a_guess if (atom->map(glove[(int)onemol_xspecial[pion][neigh]-1][1]) < 0) { - error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away3"); + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); } for (int ii = 0; ii < onemol_nxspecial[onemol_xspecial[pion][neigh]-1][0]; ii++) { @@ -1560,7 +1560,7 @@ void FixBondReact::inner_crosscheck_loop() //another check for ghost atoms. perhaps remove the one in make_a_guess if (atom->map(glove[(int)onemol_xspecial[pion][neigh]-1][1]) < 0) { - error->all(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away4"); + error->one(FLERR,"Bond/react: Fix bond/react needs ghost atoms from further away"); } if (guess_branch[avail_guesses-1] == 0) avail_guesses--; -- GitLab From 03418be6452b62299638122a183f016751c19cf3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 8 Jul 2019 15:43:57 -0400 Subject: [PATCH 143/236] minor tweaks to already processed files --- src/ASPHERE/pair_line_lj.cpp | 3 --- src/ASPHERE/pair_resquared.cpp | 5 +---- src/ASPHERE/pair_tri_lj.cpp | 3 --- src/CORESHELL/pair_born_coul_long_cs.cpp | 1 - src/GRANULAR/fix_wall_gran_region.cpp | 1 - src/KSPACE/msm.h | 3 --- src/KSPACE/pair_coul_msm.cpp | 1 - src/angle.h | 2 +- src/dump.h | 1 - src/kspace.h | 3 +-- src/mpiio.h | 2 +- src/region.h | 2 +- src/timer.cpp | 1 - src/write_restart.cpp | 1 - 14 files changed, 5 insertions(+), 24 deletions(-) diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index 0cb603c4fa..fdeb09aac4 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -13,9 +13,6 @@ #include "pair_line_lj.h" #include -#include -#include -#include #include "atom.h" #include "atom_vec_line.h" #include "force.h" diff --git a/src/ASPHERE/pair_resquared.cpp b/src/ASPHERE/pair_resquared.cpp index ba73c5ba0c..f139564320 100644 --- a/src/ASPHERE/pair_resquared.cpp +++ b/src/ASPHERE/pair_resquared.cpp @@ -16,10 +16,8 @@ ------------------------------------------------------------------------- */ #include "pair_resquared.h" +#include #include -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" @@ -27,7 +25,6 @@ #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "integrate.h" #include "memory.h" #include "error.h" diff --git a/src/ASPHERE/pair_tri_lj.cpp b/src/ASPHERE/pair_tri_lj.cpp index 3dde2a4f44..0984b0a30c 100644 --- a/src/ASPHERE/pair_tri_lj.cpp +++ b/src/ASPHERE/pair_tri_lj.cpp @@ -13,9 +13,6 @@ #include "pair_tri_lj.h" #include -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_tri.h" diff --git a/src/CORESHELL/pair_born_coul_long_cs.cpp b/src/CORESHELL/pair_born_coul_long_cs.cpp index f6262fa9e7..b56389e180 100644 --- a/src/CORESHELL/pair_born_coul_long_cs.cpp +++ b/src/CORESHELL/pair_born_coul_long_cs.cpp @@ -17,7 +17,6 @@ #include "pair_born_coul_long_cs.h" #include -#include #include "atom.h" #include "force.h" #include "neigh_list.h" diff --git a/src/GRANULAR/fix_wall_gran_region.cpp b/src/GRANULAR/fix_wall_gran_region.cpp index a4b798d6aa..95553b83b7 100644 --- a/src/GRANULAR/fix_wall_gran_region.cpp +++ b/src/GRANULAR/fix_wall_gran_region.cpp @@ -21,7 +21,6 @@ #include "atom.h" #include "domain.h" #include "update.h" -#include "pair.h" #include "memory.h" #include "error.h" #include "comm.h" diff --git a/src/KSPACE/msm.h b/src/KSPACE/msm.h index 0f81eb9c3f..bf393473e7 100644 --- a/src/KSPACE/msm.h +++ b/src/KSPACE/msm.h @@ -20,9 +20,6 @@ KSpaceStyle(msm,MSM) #ifndef LMP_MSM_H #define LMP_MSM_H -#include "lmptype.h" -#include - #include "kspace.h" namespace LAMMPS_NS { diff --git a/src/KSPACE/pair_coul_msm.cpp b/src/KSPACE/pair_coul_msm.cpp index 0917bb9275..5d42e1f046 100644 --- a/src/KSPACE/pair_coul_msm.cpp +++ b/src/KSPACE/pair_coul_msm.cpp @@ -22,7 +22,6 @@ #include "force.h" #include "kspace.h" #include "neigh_list.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/angle.h b/src/angle.h index 3e6812c4fd..7a008f7ca7 100644 --- a/src/angle.h +++ b/src/angle.h @@ -14,7 +14,7 @@ #ifndef LMP_ANGLE_H #define LMP_ANGLE_H -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/dump.h b/src/dump.h index 0173aa3112..bc7fd2d5a5 100644 --- a/src/dump.h +++ b/src/dump.h @@ -14,7 +14,6 @@ #ifndef LMP_DUMP_H #define LMP_DUMP_H -#include #include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/kspace.h b/src/kspace.h index 83ce19cd87..c04a0db989 100644 --- a/src/kspace.h +++ b/src/kspace.h @@ -14,8 +14,7 @@ #ifndef LMP_KSPACE_H #define LMP_KSPACE_H -#include -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export #ifdef FFT_SINGLE typedef float FFT_SCALAR; diff --git a/src/mpiio.h b/src/mpiio.h index 4953ade185..0098fca0e1 100644 --- a/src/mpiio.h +++ b/src/mpiio.h @@ -23,7 +23,7 @@ #error "The MPIIO package cannot be compiled in serial with MPI STUBS" #endif -#include "restart_mpiio.h" +#include "restart_mpiio.h" // IWYU pragma: export #else diff --git a/src/region.h b/src/region.h index 6a3806fed7..0dce004a5b 100644 --- a/src/region.h +++ b/src/region.h @@ -14,7 +14,7 @@ #ifndef LMP_REGION_H #define LMP_REGION_H -#include "pointers.h" +#include "pointers.h" // IWYU pragma: export namespace LAMMPS_NS { diff --git a/src/timer.cpp b/src/timer.cpp index 0dad8fb756..0a5e56ab35 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -18,7 +18,6 @@ #include "comm.h" #include "error.h" #include "force.h" -#include "memory.h" #ifdef _WIN32 #include diff --git a/src/write_restart.cpp b/src/write_restart.cpp index 5adb39067c..4b84e790b8 100644 --- a/src/write_restart.cpp +++ b/src/write_restart.cpp @@ -16,7 +16,6 @@ #include #include "atom.h" #include "atom_vec.h" -#include "atom_vec_hybrid.h" #include "group.h" #include "force.h" #include "pair.h" -- GitLab From 31e19e0824893165038f096313c5fe069c53c94a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 8 Jul 2019 16:23:49 -0400 Subject: [PATCH 144/236] complete cleaning includes in some more packages --- src/KSPACE/pair_buck_coul_msm.cpp | 6 ------ src/KSPACE/pair_lj_charmm_coul_msm.cpp | 1 - src/KSPACE/pair_lj_cut_coul_long.cpp | 1 + src/KSPACE/pair_lj_cut_coul_msm.cpp | 1 - src/MPIIO/dump_atom_mpiio.cpp | 4 ++-- src/MPIIO/dump_atom_mpiio.h | 1 - src/MPIIO/dump_cfg_mpiio.cpp | 6 ------ src/MPIIO/dump_custom_mpiio.cpp | 5 ----- src/MPIIO/dump_xyz_mpiio.cpp | 7 ------- src/USER-BOCS/fix_bocs.cpp | 1 - src/USER-CGDNA/bond_oxdna2_fene.cpp | 2 -- src/USER-CGDNA/bond_oxdna_fene.cpp | 2 -- src/USER-CGDNA/fix_nve_dot.cpp | 5 ----- src/USER-CGDNA/fix_nve_dotc_langevin.cpp | 2 -- src/USER-CGDNA/pair_oxdna2_coaxstk.cpp | 6 +----- src/USER-CGDNA/pair_oxdna2_dh.cpp | 10 +--------- src/USER-CGDNA/pair_oxdna2_excv.cpp | 4 ---- src/USER-CGDNA/pair_oxdna2_stk.cpp | 4 ---- src/USER-CGDNA/pair_oxdna_coaxstk.cpp | 6 +----- src/USER-CGDNA/pair_oxdna_excv.cpp | 8 +------- src/USER-CGDNA/pair_oxdna_hbond.cpp | 8 +------- src/USER-CGDNA/pair_oxdna_stk.cpp | 10 ++-------- src/USER-CGDNA/pair_oxdna_xstk.cpp | 6 +----- src/USER-DPD/pair_dpd_fdt_energy.cpp | 7 ++----- src/USER-DPD/pair_exp6_rx.cpp | 6 ++---- src/USER-MESO/atom_vec_tdpd.cpp | 1 - src/USER-MESO/compute_edpd_temp_atom.cpp | 3 +-- src/USER-MESO/fix_edpd_source.cpp | 11 ++--------- src/USER-MESO/fix_mvv_edpd.cpp | 4 +--- src/USER-MESO/fix_mvv_tdpd.cpp | 4 +--- src/VORONOI/compute_voronoi_atom.cpp | 2 +- 31 files changed, 21 insertions(+), 123 deletions(-) diff --git a/src/KSPACE/pair_buck_coul_msm.cpp b/src/KSPACE/pair_buck_coul_msm.cpp index 3d7687df90..1355a2f13a 100644 --- a/src/KSPACE/pair_buck_coul_msm.cpp +++ b/src/KSPACE/pair_buck_coul_msm.cpp @@ -13,21 +13,15 @@ #include "pair_buck_coul_msm.h" #include -#include -#include #include #include "atom.h" -#include "comm.h" #include "force.h" #include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/KSPACE/pair_lj_charmm_coul_msm.cpp b/src/KSPACE/pair_lj_charmm_coul_msm.cpp index 804ae5919d..a93a1275f4 100644 --- a/src/KSPACE/pair_lj_charmm_coul_msm.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_msm.cpp @@ -21,7 +21,6 @@ #include "atom.h" #include "force.h" #include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 7921c814c3..fb79451b37 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_coul_long.h" +#include #include #include #include "atom.h" diff --git a/src/KSPACE/pair_lj_cut_coul_msm.cpp b/src/KSPACE/pair_lj_cut_coul_msm.cpp index f8021cc180..4ebbcb9a3f 100644 --- a/src/KSPACE/pair_lj_cut_coul_msm.cpp +++ b/src/KSPACE/pair_lj_cut_coul_msm.cpp @@ -21,7 +21,6 @@ #include "atom.h" #include "force.h" #include "kspace.h" -#include "update.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/MPIIO/dump_atom_mpiio.cpp b/src/MPIIO/dump_atom_mpiio.cpp index cde5b6258b..2b663554cc 100644 --- a/src/MPIIO/dump_atom_mpiio.cpp +++ b/src/MPIIO/dump_atom_mpiio.cpp @@ -16,11 +16,11 @@ ------------------------------------------------------------------------- */ #include "dump_atom_mpiio.h" +#include +#include #include #include "domain.h" -#include "atom.h" #include "update.h" -#include "group.h" #include "memory.h" #include "error.h" diff --git a/src/MPIIO/dump_atom_mpiio.h b/src/MPIIO/dump_atom_mpiio.h index ad49fa1182..36b43e3f08 100644 --- a/src/MPIIO/dump_atom_mpiio.h +++ b/src/MPIIO/dump_atom_mpiio.h @@ -21,7 +21,6 @@ DumpStyle(atom/mpiio,DumpAtomMPIIO) #define LMP_DUMP_ATOM_MPIIO_H #include "dump_atom.h" -#include namespace LAMMPS_NS { diff --git a/src/MPIIO/dump_cfg_mpiio.cpp b/src/MPIIO/dump_cfg_mpiio.cpp index 90f92d094d..31848b550c 100644 --- a/src/MPIIO/dump_cfg_mpiio.cpp +++ b/src/MPIIO/dump_cfg_mpiio.cpp @@ -21,12 +21,6 @@ #include #include "atom.h" #include "domain.h" -#include "comm.h" -#include "modify.h" -#include "compute.h" -#include "input.h" -#include "fix.h" -#include "variable.h" #include "update.h" #include "memory.h" #include "error.h" diff --git a/src/MPIIO/dump_custom_mpiio.cpp b/src/MPIIO/dump_custom_mpiio.cpp index 5838c61124..dca5833c5b 100644 --- a/src/MPIIO/dump_custom_mpiio.cpp +++ b/src/MPIIO/dump_custom_mpiio.cpp @@ -19,16 +19,11 @@ #include #include #include -#include "atom.h" -#include "force.h" #include "domain.h" -#include "region.h" -#include "group.h" #include "input.h" #include "variable.h" #include "update.h" #include "modify.h" -#include "compute.h" #include "fix.h" #include "memory.h" #include "error.h" diff --git a/src/MPIIO/dump_xyz_mpiio.cpp b/src/MPIIO/dump_xyz_mpiio.cpp index 7b647561bf..ee0532399a 100644 --- a/src/MPIIO/dump_xyz_mpiio.cpp +++ b/src/MPIIO/dump_xyz_mpiio.cpp @@ -19,17 +19,10 @@ #include #include #include -#include "atom.h" -#include "force.h" #include "domain.h" -#include "region.h" -#include "group.h" -#include "input.h" -#include "variable.h" #include "update.h" #include "modify.h" #include "compute.h" -#include "fix.h" #include "memory.h" #include "error.h" diff --git a/src/USER-BOCS/fix_bocs.cpp b/src/USER-BOCS/fix_bocs.cpp index e0952086dd..936e5ff58e 100644 --- a/src/USER-BOCS/fix_bocs.cpp +++ b/src/USER-BOCS/fix_bocs.cpp @@ -18,7 +18,6 @@ #include #include #include -#include "math_extra.h" #include "atom.h" #include "force.h" #include "group.h" diff --git a/src/USER-CGDNA/bond_oxdna2_fene.cpp b/src/USER-CGDNA/bond_oxdna2_fene.cpp index 2cd7883600..97005ef5f9 100644 --- a/src/USER-CGDNA/bond_oxdna2_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna2_fene.cpp @@ -15,8 +15,6 @@ ------------------------------------------------------------------------- */ #include "bond_oxdna2_fene.h" -#include -#include using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/bond_oxdna_fene.cpp b/src/USER-CGDNA/bond_oxdna_fene.cpp index 8b94fd6a5a..8314576d63 100644 --- a/src/USER-CGDNA/bond_oxdna_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna_fene.cpp @@ -16,10 +16,8 @@ #include "bond_oxdna_fene.h" #include -#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "update.h" #include "force.h" diff --git a/src/USER-CGDNA/fix_nve_dot.cpp b/src/USER-CGDNA/fix_nve_dot.cpp index 3bf6757df7..ff8e1c0ee2 100644 --- a/src/USER-CGDNA/fix_nve_dot.cpp +++ b/src/USER-CGDNA/fix_nve_dot.cpp @@ -15,15 +15,10 @@ ------------------------------------------------------------------------- */ #include "fix_nve_dot.h" -#include -#include -#include #include "math_extra.h" #include "atom.h" #include "atom_vec_ellipsoid.h" -#include "force.h" #include "update.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/fix_nve_dotc_langevin.cpp b/src/USER-CGDNA/fix_nve_dotc_langevin.cpp index 61e3552f11..59def4c812 100644 --- a/src/USER-CGDNA/fix_nve_dotc_langevin.cpp +++ b/src/USER-CGDNA/fix_nve_dotc_langevin.cpp @@ -17,7 +17,6 @@ #include "fix_nve_dotc_langevin.h" #include -#include #include #include "math_extra.h" #include "atom.h" @@ -26,7 +25,6 @@ #include "update.h" #include "comm.h" #include "random_mars.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp b/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp index 1d0a2eb494..b96da3fa4a 100644 --- a/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp +++ b/src/USER-CGDNA/pair_oxdna2_coaxstk.cpp @@ -15,9 +15,8 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna2_coaxstk.h" +#include #include -#include -#include #include #include "mf_oxdna.h" #include "atom.h" @@ -25,9 +24,6 @@ #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/USER-CGDNA/pair_oxdna2_dh.cpp b/src/USER-CGDNA/pair_oxdna2_dh.cpp index 22fc79dae4..ea1f4f84f4 100644 --- a/src/USER-CGDNA/pair_oxdna2_dh.cpp +++ b/src/USER-CGDNA/pair_oxdna2_dh.cpp @@ -15,28 +15,20 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna2_dh.h" +#include #include -#include -#include #include -#include "mf_oxdna.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "atom_vec_ellipsoid.h" #include "math_extra.h" using namespace LAMMPS_NS; -using namespace MathConst; -using namespace MFOxdna; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-CGDNA/pair_oxdna2_excv.cpp b/src/USER-CGDNA/pair_oxdna2_excv.cpp index de4f8319b9..0a7da8e81a 100644 --- a/src/USER-CGDNA/pair_oxdna2_excv.cpp +++ b/src/USER-CGDNA/pair_oxdna2_excv.cpp @@ -15,10 +15,6 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna2_excv.h" -#include -#include -#include -#include using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/pair_oxdna2_stk.cpp b/src/USER-CGDNA/pair_oxdna2_stk.cpp index 3b9480bff6..26bae766e1 100644 --- a/src/USER-CGDNA/pair_oxdna2_stk.cpp +++ b/src/USER-CGDNA/pair_oxdna2_stk.cpp @@ -15,10 +15,6 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna2_stk.h" -#include -#include -#include -#include using namespace LAMMPS_NS; diff --git a/src/USER-CGDNA/pair_oxdna_coaxstk.cpp b/src/USER-CGDNA/pair_oxdna_coaxstk.cpp index 7310f60ec3..6e37352ef0 100644 --- a/src/USER-CGDNA/pair_oxdna_coaxstk.cpp +++ b/src/USER-CGDNA/pair_oxdna_coaxstk.cpp @@ -15,9 +15,8 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna_coaxstk.h" +#include #include -#include -#include #include #include "mf_oxdna.h" #include "atom.h" @@ -25,9 +24,6 @@ #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/USER-CGDNA/pair_oxdna_excv.cpp b/src/USER-CGDNA/pair_oxdna_excv.cpp index 68091f4190..9fb3dd041a 100644 --- a/src/USER-CGDNA/pair_oxdna_excv.cpp +++ b/src/USER-CGDNA/pair_oxdna_excv.cpp @@ -15,9 +15,8 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna_excv.h" +#include #include -#include -#include #include #include "mf_oxdna.h" #include "atom.h" @@ -25,17 +24,12 @@ #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "atom_vec_ellipsoid.h" #include "math_extra.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace MFOxdna; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-CGDNA/pair_oxdna_hbond.cpp b/src/USER-CGDNA/pair_oxdna_hbond.cpp index 2de05e66ae..12e4b08c46 100644 --- a/src/USER-CGDNA/pair_oxdna_hbond.cpp +++ b/src/USER-CGDNA/pair_oxdna_hbond.cpp @@ -15,9 +15,8 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna_hbond.h" +#include #include -#include -#include #include #include "mf_oxdna.h" #include "atom.h" @@ -25,17 +24,12 @@ #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "atom_vec_ellipsoid.h" #include "math_extra.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace MFOxdna; // sequence-specific base-pairing strength diff --git a/src/USER-CGDNA/pair_oxdna_stk.cpp b/src/USER-CGDNA/pair_oxdna_stk.cpp index aaa25039ef..022d94f935 100644 --- a/src/USER-CGDNA/pair_oxdna_stk.cpp +++ b/src/USER-CGDNA/pair_oxdna_stk.cpp @@ -15,27 +15,21 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna_stk.h" +#include #include -#include -#include #include +#include #include "mf_oxdna.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "atom_vec_ellipsoid.h" #include "math_extra.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace MFOxdna; // sequence-specific stacking strength diff --git a/src/USER-CGDNA/pair_oxdna_xstk.cpp b/src/USER-CGDNA/pair_oxdna_xstk.cpp index 806f8a42c6..384a7768bd 100644 --- a/src/USER-CGDNA/pair_oxdna_xstk.cpp +++ b/src/USER-CGDNA/pair_oxdna_xstk.cpp @@ -15,9 +15,8 @@ ------------------------------------------------------------------------- */ #include "pair_oxdna_xstk.h" +#include #include -#include -#include #include #include "mf_oxdna.h" #include "atom.h" @@ -25,9 +24,6 @@ #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/USER-DPD/pair_dpd_fdt_energy.cpp b/src/USER-DPD/pair_dpd_fdt_energy.cpp index 12e6989c00..22741a055d 100644 --- a/src/USER-DPD/pair_dpd_fdt_energy.cpp +++ b/src/USER-DPD/pair_dpd_fdt_energy.cpp @@ -15,23 +15,20 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ +#include "pair_dpd_fdt_energy.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "update.h" #include "fix.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "random_mars.h" #include "memory.h" #include "modify.h" -#include "pair_dpd_fdt_energy.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-DPD/pair_exp6_rx.cpp b/src/USER-DPD/pair_exp6_rx.cpp index 13521b52b1..5cf2859ae3 100644 --- a/src/USER-DPD/pair_exp6_rx.cpp +++ b/src/USER-DPD/pair_exp6_rx.cpp @@ -11,17 +11,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_exp6_rx.h" +#include #include -#include #include #include #include -#include "pair_exp6_rx.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neigh_list.h" -#include "math_const.h" #include "math_special.h" #include "memory.h" #include "error.h" @@ -29,7 +28,6 @@ #include "fix.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace MathSpecial; #define MAXLINE 1024 diff --git a/src/USER-MESO/atom_vec_tdpd.cpp b/src/USER-MESO/atom_vec_tdpd.cpp index aa0dc93809..0db5437c4a 100644 --- a/src/USER-MESO/atom_vec_tdpd.cpp +++ b/src/USER-MESO/atom_vec_tdpd.cpp @@ -23,7 +23,6 @@ #include "update.h" #include "memory.h" #include "error.h" -#include "input.h" using namespace LAMMPS_NS; diff --git a/src/USER-MESO/compute_edpd_temp_atom.cpp b/src/USER-MESO/compute_edpd_temp_atom.cpp index 119e0079d1..9eb6e9752b 100644 --- a/src/USER-MESO/compute_edpd_temp_atom.cpp +++ b/src/USER-MESO/compute_edpd_temp_atom.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_edpd_temp_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MESO/fix_edpd_source.cpp b/src/USER-MESO/fix_edpd_source.cpp index 24bef2b1f7..e62d9a8a79 100644 --- a/src/USER-MESO/fix_edpd_source.cpp +++ b/src/USER-MESO/fix_edpd_source.cpp @@ -11,17 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "fix_edpd_source.h" +#include +#include #include "atom.h" -#include "comm.h" -#include "update.h" -#include "modify.h" -#include "domain.h" -#include "lattice.h" -#include "input.h" -#include "variable.h" #include "error.h" #include "force.h" diff --git a/src/USER-MESO/fix_mvv_edpd.cpp b/src/USER-MESO/fix_mvv_edpd.cpp index 8719d0d262..bd9cd9cc2a 100644 --- a/src/USER-MESO/fix_mvv_edpd.cpp +++ b/src/USER-MESO/fix_mvv_edpd.cpp @@ -29,13 +29,11 @@ Communications, 2015, 51: 11038-11040. ------------------------------------------------------------------------- */ -#include -#include #include "fix_mvv_edpd.h" +#include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-MESO/fix_mvv_tdpd.cpp b/src/USER-MESO/fix_mvv_tdpd.cpp index 24b1bbcf48..b7fe37d7ee 100644 --- a/src/USER-MESO/fix_mvv_tdpd.cpp +++ b/src/USER-MESO/fix_mvv_tdpd.cpp @@ -25,13 +25,11 @@ -reaction problems". The Journal of Chemical Physics, 2015, 143: 014101. ------------------------------------------------------------------------- */ -#include -#include #include "fix_mvv_tdpd.h" +#include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/VORONOI/compute_voronoi_atom.cpp b/src/VORONOI/compute_voronoi_atom.cpp index 27252fae89..d5976f85d3 100644 --- a/src/VORONOI/compute_voronoi_atom.cpp +++ b/src/VORONOI/compute_voronoi_atom.cpp @@ -19,7 +19,7 @@ #include #include #include -#include "voro++.hh" +#include #include "atom.h" #include "group.h" #include "update.h" -- GitLab From 1f47da6c51deaac5f29f56bc532a683965d85a82 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 8 Jul 2019 17:46:47 -0500 Subject: [PATCH 145/236] Add fixed_types to kim_init & split to kim_query --- examples/kim/in.query | 7 ++- src/KIM/kim_interactions.cpp | 106 ++++++++++++++++++++--------------- src/KIM/kim_query.cpp | 32 +++++++++-- 3 files changed, 94 insertions(+), 51 deletions(-) diff --git a/examples/kim/in.query b/examples/kim/in.query index 33272dc298..72e739fb52 100644 --- a/examples/kim/in.query +++ b/examples/kim/in.query @@ -4,8 +4,9 @@ # lattice constant for a specific test used for a specific model and then # assigns it to the variable 'latconst' -units metal +kim_init EAM_CubicNaturalSpline_ErcolessiAdams_1994_Al__MO_800509458712_002 metal info variables out log -kim_query latconst get_test_result test=TE_156715955670 species=["Al"] model=MO_800509458712 prop=structure-cubic-crystal-npt keys=["a"] units=["angstrom"] +kim_query latconst split get_test_result test=TE_156715955670 species=["Al"] prop=structure-cubic-crystal-npt keys=["a","a"] units=["angstrom","angstrom"] info variables out log -lattice fcc ${latconst} +lattice fcc ${latconst_1} +lattice fcc ${latconst_2} diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp index 355df9c3be..d0fbb809d2 100644 --- a/src/KIM/kim_interactions.cpp +++ b/src/KIM/kim_interactions.cpp @@ -115,8 +115,16 @@ void KimInteractions::kim_interactions_log_delimiter( void KimInteractions::do_setup(int narg, char **arg) { - if (narg != atom->ntypes) + bool fixed_types; + if ((narg == 1) && (0 == strcmp("fixed_types",arg[0]))) { + fixed_types = true; + } + else if (narg != atom->ntypes) { error->all(FLERR,"Illegal kim_interactions command"); + } + else { + fixed_types = false; + } char *model_name = NULL; KIM_SimulatorModel *simulatorModel(NULL); @@ -137,53 +145,59 @@ void KimInteractions::do_setup(int narg, char **arg) if (simulatorModel) { - std::string delimiter(""); - std::string atom_type_sym_list; - std::string atom_type_num_list; + if (!fixed_types) { + std::string delimiter(""); + std::string atom_type_sym_list; + std::string atom_type_num_list; - for (int i = 0; i < narg; i++) - { - atom_type_sym_list += delimiter + arg[i]; - atom_type_num_list += delimiter + SNUM(species_to_atomic_no(arg[i])); - delimiter = " "; - } - - KIM_SimulatorModel_AddTemplateMap( - simulatorModel,"atom-type-sym-list",atom_type_sym_list.c_str()); - KIM_SimulatorModel_AddTemplateMap( - simulatorModel,"atom-type-num-list",atom_type_num_list.c_str()); - KIM_SimulatorModel_CloseTemplateMap(simulatorModel); - - int len = strlen(atom_type_sym_list.c_str())+1; - char *strbuf = new char[len]; - char *strword; - - // validate species selection - - int sim_num_species; - bool species_is_supported; - char const *sim_species; - KIM_SimulatorModel_GetNumberOfSupportedSpecies( - simulatorModel,&sim_num_species); - strcpy(strbuf,atom_type_sym_list.c_str()); - strword = strtok(strbuf," \t"); - while (strword) { - species_is_supported = false; - if (strcmp(strword,"NULL") == 0) continue; - for (int i=0; i < sim_num_species; ++i) { - KIM_SimulatorModel_GetSupportedSpecies(simulatorModel,i,&sim_species); - if (strcmp(sim_species,strword) == 0) - species_is_supported = true; + for (int i = 0; i < narg; i++) + { + atom_type_sym_list += delimiter + arg[i]; + atom_type_num_list += delimiter + SNUM(species_to_atomic_no(arg[i])); + delimiter = " "; } - if (!species_is_supported) { - std::string msg("Species '"); - msg += strword; - msg += "' is not supported by this KIM Simulator Model"; - error->all(FLERR,msg.c_str()); + + KIM_SimulatorModel_AddTemplateMap( + simulatorModel,"atom-type-sym-list",atom_type_sym_list.c_str()); + KIM_SimulatorModel_AddTemplateMap( + simulatorModel,"atom-type-num-list",atom_type_num_list.c_str()); + KIM_SimulatorModel_CloseTemplateMap(simulatorModel); + + int len = strlen(atom_type_sym_list.c_str())+1; + char *strbuf = new char[len]; + char *strword; + + // validate species selection + + int sim_num_species; + bool species_is_supported; + char const *sim_species; + KIM_SimulatorModel_GetNumberOfSupportedSpecies( + simulatorModel,&sim_num_species); + strcpy(strbuf,atom_type_sym_list.c_str()); + strword = strtok(strbuf," \t"); + while (strword) { + species_is_supported = false; + if (strcmp(strword,"NULL") == 0) continue; + for (int i=0; i < sim_num_species; ++i) { + KIM_SimulatorModel_GetSupportedSpecies(simulatorModel,i,&sim_species); + if (strcmp(sim_species,strword) == 0) + species_is_supported = true; + } + if (!species_is_supported) { + std::string msg("Species '"); + msg += strword; + msg += "' is not supported by this KIM Simulator Model"; + error->all(FLERR,msg.c_str()); + } + strword = strtok(NULL," \t"); } - strword = strtok(NULL," \t"); + delete[] strbuf; + } + else + { + KIM_SimulatorModel_CloseTemplateMap(simulatorModel); } - delete[] strbuf; // check if units are unchanged @@ -223,6 +237,10 @@ void KimInteractions::do_setup(int narg, char **arg) } else { // not a simulator model. issue pair_style and pair_coeff commands. + + if (fixed_types) + error->all(FLERR,"fixed_types cannot be used with a KIM Portable Model"); + // NOTE: all references to arg must appear before calls to input->one() // as that will reset the argument vector. diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index 2bb404ec26..cf4efc2b12 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -57,6 +57,7 @@ #include #include #include +#include #include "kim_query.h" #include "comm.h" #include "error.h" @@ -104,6 +105,13 @@ void KimQuery::command(int narg, char **arg) varname = arg[0]; + bool split = false; + if (0 == strcmp("split",arg[1])) { + if (narg == 2) error->all(FLERR,"Illegal kim_query command"); + split = true; + arg++; + narg--; + } function = arg[1]; #if defined(LMP_KIM_CURL) @@ -123,11 +131,27 @@ void KimQuery::command(int narg, char **arg) } char **varcmd = new char*[3]; - varcmd[0] = varname; - varcmd[1] = (char *) "string"; - varcmd[2] = value; + if (split) { + int counter = 1; + std::stringstream ss(value); + std::string token; + varcmd[1] = (char *) "string"; + + while(std::getline(ss, token, ',')) { + std::stringstream splitname; + splitname << varname << "_" << counter++; + varcmd[0] = const_cast(splitname.str().c_str()); + varcmd[2] = const_cast(token.c_str()); + input->variable->set(3,varcmd); + } + } + else { + varcmd[0] = varname; + varcmd[1] = (char *) "string"; + varcmd[2] = value; - input->variable->set(3,varcmd); + input->variable->set(3,varcmd); + } delete[] varcmd; delete[] value; -- GitLab From 39c8a7de6e8f4e36f5dc87b775445e7c1c93fd0d Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Tue, 9 Jul 2019 07:35:50 -0400 Subject: [PATCH 146/236] Updated kim_commands doc to descript kim_query split mode --- doc/src/kim_commands.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 66319d7a08..16d8ea785d 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -14,13 +14,14 @@ kim_query command :h3 kim_init model user_units unitarg kim_interactions typeargs -kim_query variable query_function queryargs :pre +kim_query variable formatarg query_function queryargs :pre model = name of the KIM interatomic model (the KIM ID for models archived in OpenKIM) user_units = the LAMMPS "units"_units.html style assumed in the LAMMPS input script unitarg = {unit_conversion_mode} (optional) typeargs = atom type to species mapping (one entry per atom type) variable = name of a (string style) variable where the result of the query is stored +formatarg = {split} (optional) query_function = name of the OpenKIM web API query function to be used queryargs = a series of {keyword=value} pairs that represent the web query; supported keywords depend on the query function :ul @@ -377,7 +378,7 @@ changed to: "lattice fcc $\{a0\}*$\{_u_distance\}". kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal boundary p p p -kim_query latconst get_lattice_constant_hcp species=\["Zr"\] units=\["angstrom"\] +kim_query latconst split get_lattice_constant_hcp species=\["Zr"\] units=\["angstrom"\] variable a0 equal latconst_1 variable c0 equal latconst_2 variable c_to_a equal $\{c0\}/$\{a0\} @@ -387,6 +388,13 @@ lattice custom $\{a0\} a1 0.5 -0.866025 0 a2 0.5 0.866025 0 a3 0 0 $\{c In this case the {kim_query} returns two arguments (since the hexagonal close packed (hcp) structure has two independent lattice constants). +The default behavior of {kim_query} returns the result as a string +with the values separated by commas. The optional keyword {split} +separates the result values into individual variables of the form +{prefix_I}, where {prefix} is set to the the {kim_query} {variable} argument +and {I} ranges from 1 to the number of returned values. The number and order of +the returned values is determined by the type of query performed. + In the case where a query returns multiple results, the default behavior for {kim_query} is to split these into individual variables of the form {prefix_I}, where {prefix} is set to the the {kim_query} {variable} argument -- GitLab From 30086950b87ccb019b2a723b6c684fce7fd6fe7f Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Tue, 9 Jul 2019 09:43:34 -0400 Subject: [PATCH 147/236] Added preliminary doc for kim_interactions fixed_types --- doc/src/kim_commands.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 16d8ea785d..437b768df6 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -19,7 +19,7 @@ kim_query variable formatarg query_function queryargs :pre model = name of the KIM interatomic model (the KIM ID for models archived in OpenKIM) user_units = the LAMMPS "units"_units.html style assumed in the LAMMPS input script unitarg = {unit_conversion_mode} (optional) -typeargs = atom type to species mapping (one entry per atom type) +typeargs = atom type to species mapping (one entry per atom type) or {fixed_types} for models with a preset fixed mapping variable = name of a (string style) variable where the result of the query is stored formatarg = {split} (optional) query_function = name of the OpenKIM web API query function to be used @@ -33,6 +33,8 @@ kim_interactions Si kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode kim_interactions C H O +kim_init Sim_LAMMPS_IFF_OtherInfo_AuthorList_Year_Species__SM_064312669787_000 real +kim_interactions fixed_types kim_query a0 get_lattice_constant_fcc species=\["Al"] units=\["angstrom"\] :pre @@ -272,8 +274,13 @@ The second and final step in using an OpenKIM IM is to execute the command and a "create_box"_create_box.html command, which defines the number of atom types {N}. The {kim_interactions} command has one argument {typeargs}. This argument -contains a list of {N} chemical species, which defines a mapping between -atom types in LAMMPS to the available species in the OpenKIM IM. +contains either a list of {N} chemical species, which defines a mapping between +atom types in LAMMPS to the available species in the OpenKIM IM, or the +keyword {fixed_types} for models that have a preset fixed mapping (i.e. +the mapping between LAMMPS atom types and chemical species is defined by +the model and cannot be changed). In the latter case, the user must consult +the model documentation to see how many atom types there are and how they +map to the chemcial species. For example, consider an OpenKIM IM that supports Si and C species. If the LAMMPS simulation has four atom types, where the first three are Si, @@ -282,6 +289,11 @@ and the fourth is C, the following {kim_interactions} command would be used: kim_interactions Si Si Si C :pre +Alternatively, for a model with a fixed mapping the command would be: + +kim_interactions fixed_types +:pre + The {kim_interactions} command performs all the necessary steps to set up the OpenKIM IM selected in the {kim_init} command. The specific actions depend on whether the IM is a KIM PM or a KIM SM. For a KIM PM, -- GitLab From c2dc624ec90575027328f0b3b9ab52fff2b00631 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 9 Jul 2019 15:04:41 -0400 Subject: [PATCH 148/236] update packages USER-SPH, USER-SMTBQ, USER-SDPD, USER-TALLY, USER-UEF, USER-YAFF --- src/USER-SDPD/pair_sdpd_taitwater_isothermal.cpp | 3 +-- src/USER-SMTBQ/pair_smtbq.cpp | 7 +++---- src/USER-SPH/compute_meso_e_atom.cpp | 3 +-- src/USER-SPH/compute_meso_rho_atom.cpp | 3 +-- src/USER-SPH/compute_meso_t_atom.cpp | 3 +-- src/USER-SPH/fix_meso.cpp | 12 ------------ src/USER-SPH/fix_meso_stationary.cpp | 12 ------------ src/USER-SPH/pair_sph_heatconduction.cpp | 4 +--- src/USER-SPH/pair_sph_idealgas.cpp | 4 +--- src/USER-SPH/pair_sph_lj.cpp | 4 +--- src/USER-SPH/pair_sph_rhosum.cpp | 2 -- src/USER-SPH/pair_sph_taitwater.cpp | 3 +-- src/USER-SPH/pair_sph_taitwater_morris.cpp | 3 +-- src/USER-TALLY/compute_force_tally.cpp | 4 ++-- src/USER-TALLY/compute_heat_flux_tally.cpp | 2 +- src/USER-TALLY/compute_pe_mol_tally.cpp | 3 +-- src/USER-TALLY/compute_pe_tally.cpp | 2 +- src/USER-TALLY/compute_stress_tally.cpp | 2 +- src/USER-UEF/compute_pressure_uef.cpp | 9 +-------- src/USER-UEF/compute_temp_uef.cpp | 4 +--- src/USER-UEF/dump_cfg_uef.cpp | 6 +----- src/USER-UEF/fix_nh_uef.cpp | 5 +---- src/USER-YAFF/angle_cross.cpp | 4 +--- src/USER-YAFF/angle_cross.h | 1 - src/USER-YAFF/angle_mm3.cpp | 5 ++--- src/USER-YAFF/angle_mm3.h | 1 - src/USER-YAFF/bond_mm3.cpp | 5 ++--- src/USER-YAFF/bond_mm3.h | 1 - src/USER-YAFF/improper_distharm.cpp | 6 ++---- src/USER-YAFF/improper_distharm.h | 1 - src/USER-YAFF/improper_sqdistharm.cpp | 6 ++---- src/USER-YAFF/improper_sqdistharm.h | 1 - src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp | 8 +++----- src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp | 8 +++----- 34 files changed, 37 insertions(+), 110 deletions(-) diff --git a/src/USER-SDPD/pair_sdpd_taitwater_isothermal.cpp b/src/USER-SDPD/pair_sdpd_taitwater_isothermal.cpp index db80debe51..d799869db3 100644 --- a/src/USER-SDPD/pair_sdpd_taitwater_isothermal.cpp +++ b/src/USER-SDPD/pair_sdpd_taitwater_isothermal.cpp @@ -18,9 +18,8 @@ references: Espanol and Revenga, Phys Rev E 67, 026705 (2003) ------------------------------------------------------------------------- */ -#include -#include #include "pair_sdpd_taitwater_isothermal.h" +#include #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/USER-SMTBQ/pair_smtbq.cpp b/src/USER-SMTBQ/pair_smtbq.cpp index ba7f8eb88c..f61fc1a72e 100644 --- a/src/USER-SMTBQ/pair_smtbq.cpp +++ b/src/USER-SMTBQ/pair_smtbq.cpp @@ -38,25 +38,24 @@ . ------------------------------------------------------------------------- */ +#include "pair_smtbq.h" +#include #include -#include #include #include +#include #include -#include "pair_smtbq.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "group.h" #include "update.h" #include "math_const.h" #include "math_special.h" #include "memory.h" #include "error.h" -#include "domain.h" #include #include diff --git a/src/USER-SPH/compute_meso_e_atom.cpp b/src/USER-SPH/compute_meso_e_atom.cpp index e39dee2b5f..c56243e5ed 100644 --- a/src/USER-SPH/compute_meso_e_atom.cpp +++ b/src/USER-SPH/compute_meso_e_atom.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_meso_e_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SPH/compute_meso_rho_atom.cpp b/src/USER-SPH/compute_meso_rho_atom.cpp index eeb3f987bc..b2fbd2d70a 100644 --- a/src/USER-SPH/compute_meso_rho_atom.cpp +++ b/src/USER-SPH/compute_meso_rho_atom.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_meso_rho_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SPH/compute_meso_t_atom.cpp b/src/USER-SPH/compute_meso_t_atom.cpp index dc4f3407f1..bab96468dd 100644 --- a/src/USER-SPH/compute_meso_t_atom.cpp +++ b/src/USER-SPH/compute_meso_t_atom.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_meso_t_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SPH/fix_meso.cpp b/src/USER-SPH/fix_meso.cpp index b688eccfea..4f4e532291 100644 --- a/src/USER-SPH/fix_meso.cpp +++ b/src/USER-SPH/fix_meso.cpp @@ -11,23 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "fix_meso.h" #include "atom.h" -#include "comm.h" #include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "update.h" -#include "integrate.h" -#include "respa.h" -#include "memory.h" #include "error.h" -#include "pair.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-SPH/fix_meso_stationary.cpp b/src/USER-SPH/fix_meso_stationary.cpp index 29e8a1554c..b7f0675ef8 100644 --- a/src/USER-SPH/fix_meso_stationary.cpp +++ b/src/USER-SPH/fix_meso_stationary.cpp @@ -11,23 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "fix_meso_stationary.h" #include "atom.h" -#include "comm.h" #include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "update.h" -#include "integrate.h" -#include "respa.h" -#include "memory.h" #include "error.h" -#include "pair.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-SPH/pair_sph_heatconduction.cpp b/src/USER-SPH/pair_sph_heatconduction.cpp index bafa26be89..cff9009015 100644 --- a/src/USER-SPH/pair_sph_heatconduction.cpp +++ b/src/USER-SPH/pair_sph_heatconduction.cpp @@ -11,12 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "pair_sph_heatconduction.h" +#include #include "atom.h" #include "force.h" -#include "comm.h" #include "memory.h" #include "error.h" #include "neigh_list.h" diff --git a/src/USER-SPH/pair_sph_idealgas.cpp b/src/USER-SPH/pair_sph_idealgas.cpp index db5ec964bc..f206bf68f5 100644 --- a/src/USER-SPH/pair_sph_idealgas.cpp +++ b/src/USER-SPH/pair_sph_idealgas.cpp @@ -11,12 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "pair_sph_idealgas.h" +#include #include "atom.h" #include "force.h" -#include "comm.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SPH/pair_sph_lj.cpp b/src/USER-SPH/pair_sph_lj.cpp index 7d315c975c..3173e2a47d 100644 --- a/src/USER-SPH/pair_sph_lj.cpp +++ b/src/USER-SPH/pair_sph_lj.cpp @@ -11,12 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "pair_sph_lj.h" +#include #include "atom.h" #include "force.h" -#include "comm.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SPH/pair_sph_rhosum.cpp b/src/USER-SPH/pair_sph_rhosum.cpp index 842dddc744..fa51dc3781 100644 --- a/src/USER-SPH/pair_sph_rhosum.cpp +++ b/src/USER-SPH/pair_sph_rhosum.cpp @@ -11,8 +11,6 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "pair_sph_rhosum.h" #include "atom.h" #include "force.h" diff --git a/src/USER-SPH/pair_sph_taitwater.cpp b/src/USER-SPH/pair_sph_taitwater.cpp index cf3c0e914b..f2a34d4edd 100644 --- a/src/USER-SPH/pair_sph_taitwater.cpp +++ b/src/USER-SPH/pair_sph_taitwater.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "pair_sph_taitwater.h" +#include #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/USER-SPH/pair_sph_taitwater_morris.cpp b/src/USER-SPH/pair_sph_taitwater_morris.cpp index 5cbaa5959f..9ca03e3476 100644 --- a/src/USER-SPH/pair_sph_taitwater_morris.cpp +++ b/src/USER-SPH/pair_sph_taitwater_morris.cpp @@ -11,9 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "pair_sph_taitwater_morris.h" +#include #include "atom.h" #include "force.h" #include "comm.h" diff --git a/src/USER-TALLY/compute_force_tally.cpp b/src/USER-TALLY/compute_force_tally.cpp index 3339e0555b..9d15fbc441 100644 --- a/src/USER-TALLY/compute_force_tally.cpp +++ b/src/USER-TALLY/compute_force_tally.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "compute_force_tally.h" +#include +#include #include "atom.h" #include "group.h" #include "pair.h" diff --git a/src/USER-TALLY/compute_heat_flux_tally.cpp b/src/USER-TALLY/compute_heat_flux_tally.cpp index 2a5f724953..350bc4b4b6 100644 --- a/src/USER-TALLY/compute_heat_flux_tally.cpp +++ b/src/USER-TALLY/compute_heat_flux_tally.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_heat_flux_tally.h" +#include #include "atom.h" #include "group.h" #include "pair.h" diff --git a/src/USER-TALLY/compute_pe_mol_tally.cpp b/src/USER-TALLY/compute_pe_mol_tally.cpp index 5fabd4a77b..ce647a04c3 100644 --- a/src/USER-TALLY/compute_pe_mol_tally.cpp +++ b/src/USER-TALLY/compute_pe_mol_tally.cpp @@ -11,13 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_pe_mol_tally.h" +#include #include "atom.h" #include "group.h" #include "pair.h" #include "update.h" -#include "memory.h" #include "error.h" #include "force.h" #include "comm.h" diff --git a/src/USER-TALLY/compute_pe_tally.cpp b/src/USER-TALLY/compute_pe_tally.cpp index 8e6703bde1..edfa49b1b1 100644 --- a/src/USER-TALLY/compute_pe_tally.cpp +++ b/src/USER-TALLY/compute_pe_tally.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_pe_tally.h" +#include #include "atom.h" #include "group.h" #include "pair.h" diff --git a/src/USER-TALLY/compute_stress_tally.cpp b/src/USER-TALLY/compute_stress_tally.cpp index 07d685a9c2..1ea096e286 100644 --- a/src/USER-TALLY/compute_stress_tally.cpp +++ b/src/USER-TALLY/compute_stress_tally.cpp @@ -11,8 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_stress_tally.h" +#include #include "atom.h" #include "group.h" #include "pair.h" diff --git a/src/USER-UEF/compute_pressure_uef.cpp b/src/USER-UEF/compute_pressure_uef.cpp index 8b62853042..adb9970c12 100644 --- a/src/USER-UEF/compute_pressure_uef.cpp +++ b/src/USER-UEF/compute_pressure_uef.cpp @@ -13,21 +13,14 @@ Contributing author: David Nicholson (MIT) ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_pressure_uef.h" +#include #include "fix_nh_uef.h" #include "update.h" #include "domain.h" #include "modify.h" #include "fix.h" #include "force.h" -#include "pair.h" -#include "bond.h" -#include "angle.h" -#include "dihedral.h" -#include "improper.h" #include "kspace.h" #include "error.h" diff --git a/src/USER-UEF/compute_temp_uef.cpp b/src/USER-UEF/compute_temp_uef.cpp index 999296ec7e..698c4452c2 100644 --- a/src/USER-UEF/compute_temp_uef.cpp +++ b/src/USER-UEF/compute_temp_uef.cpp @@ -13,11 +13,9 @@ Contributing author: David Nicholson (MIT) ------------------------------------------------------------------------- */ -#include -#include #include "compute_temp_uef.h" +#include #include "fix_nh_uef.h" -#include "update.h" #include "modify.h" #include "fix.h" #include "error.h" diff --git a/src/USER-UEF/dump_cfg_uef.cpp b/src/USER-UEF/dump_cfg_uef.cpp index 58b3ec5a1f..5e3733f422 100644 --- a/src/USER-UEF/dump_cfg_uef.cpp +++ b/src/USER-UEF/dump_cfg_uef.cpp @@ -13,15 +13,11 @@ Contributing Author: David Nicholson (MIT) ------------------------------------------------------------------------- */ - +#include "dump_cfg.h" #include -#include #include -#include "dump_cfg.h" #include "atom.h" -#include "domain.h" #include "modify.h" -#include "compute.h" #include "fix.h" #include "error.h" #include "uef_utils.h" diff --git a/src/USER-UEF/fix_nh_uef.cpp b/src/USER-UEF/fix_nh_uef.cpp index bffcd7849f..8873688eb7 100644 --- a/src/USER-UEF/fix_nh_uef.cpp +++ b/src/USER-UEF/fix_nh_uef.cpp @@ -13,19 +13,16 @@ Contributing author: David Nicholson (MIT) ------------------------------------------------------------------------- */ +#include "fix_nh_uef.h" #include -#include #include -#include "fix_nh_uef.h" #include "atom.h" #include "force.h" -#include "group.h" #include "comm.h" #include "citeme.h" #include "irregular.h" #include "modify.h" #include "compute.h" -#include "kspace.h" #include "update.h" #include "domain.h" #include "error.h" diff --git a/src/USER-YAFF/angle_cross.cpp b/src/USER-YAFF/angle_cross.cpp index 2e6731f494..2ebb08f56b 100644 --- a/src/USER-YAFF/angle_cross.cpp +++ b/src/USER-YAFF/angle_cross.cpp @@ -15,10 +15,8 @@ Contributing author: Steven Vandenbrande ------------------------------------------------------------------------- */ -#include -#include -#include #include "angle_cross.h" +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-YAFF/angle_cross.h b/src/USER-YAFF/angle_cross.h index 7709c10414..ba958f98ec 100644 --- a/src/USER-YAFF/angle_cross.h +++ b/src/USER-YAFF/angle_cross.h @@ -20,7 +20,6 @@ AngleStyle(cross,AngleCross) #ifndef LMP_ANGLE_CROSS_H #define LMP_ANGLE_CROSS_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-YAFF/angle_mm3.cpp b/src/USER-YAFF/angle_mm3.cpp index 53cb11b5df..24ce8229ba 100644 --- a/src/USER-YAFF/angle_mm3.cpp +++ b/src/USER-YAFF/angle_mm3.cpp @@ -15,10 +15,9 @@ Contributing author: Steven Vandenbrande ------------------------------------------------------------------------- */ -#include -#include -#include #include "angle_mm3.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-YAFF/angle_mm3.h b/src/USER-YAFF/angle_mm3.h index 2d19b4d1b4..985c4bb9b4 100644 --- a/src/USER-YAFF/angle_mm3.h +++ b/src/USER-YAFF/angle_mm3.h @@ -20,7 +20,6 @@ AngleStyle(mm3,AngleMM3) #ifndef LMP_ANGLE_MM3_H #define LMP_ANGLE_MM3_H -#include #include "angle.h" namespace LAMMPS_NS { diff --git a/src/USER-YAFF/bond_mm3.cpp b/src/USER-YAFF/bond_mm3.cpp index ee1ebcdd61..2a7d5d1843 100644 --- a/src/USER-YAFF/bond_mm3.cpp +++ b/src/USER-YAFF/bond_mm3.cpp @@ -15,12 +15,11 @@ Contributing author: Steven Vandenbrande ------------------------------------------------------------------------- */ -#include -#include #include "bond_mm3.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/USER-YAFF/bond_mm3.h b/src/USER-YAFF/bond_mm3.h index 9711d89529..56f3136ea8 100644 --- a/src/USER-YAFF/bond_mm3.h +++ b/src/USER-YAFF/bond_mm3.h @@ -20,7 +20,6 @@ BondStyle(mm3,BondMM3) #ifndef LMP_BOND_MM3_H #define LMP_BOND_MM3_H -#include #include "bond.h" namespace LAMMPS_NS { diff --git a/src/USER-YAFF/improper_distharm.cpp b/src/USER-YAFF/improper_distharm.cpp index b45087a9ab..2b62f827e7 100644 --- a/src/USER-YAFF/improper_distharm.cpp +++ b/src/USER-YAFF/improper_distharm.cpp @@ -16,16 +16,14 @@ improper_distance code by Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ -#include -#include -#include #include "improper_distharm.h" +#include +#include #include "atom.h" #include "comm.h" #include "neighbor.h" #include "domain.h" #include "force.h" -#include "update.h" #include "memory.h" #include "error.h" diff --git a/src/USER-YAFF/improper_distharm.h b/src/USER-YAFF/improper_distharm.h index b8b9ae780e..0a8d34ac44 100644 --- a/src/USER-YAFF/improper_distharm.h +++ b/src/USER-YAFF/improper_distharm.h @@ -20,7 +20,6 @@ ImproperStyle(distharm,ImproperDistHarm) #ifndef LMP_IMPROPER_DISTHARM_H #define LMP_IMPROPER_DISTHARM_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-YAFF/improper_sqdistharm.cpp b/src/USER-YAFF/improper_sqdistharm.cpp index ae702820cb..bcc0549f7e 100644 --- a/src/USER-YAFF/improper_sqdistharm.cpp +++ b/src/USER-YAFF/improper_sqdistharm.cpp @@ -16,16 +16,14 @@ improper_distance code by Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ -#include -#include -#include #include "improper_sqdistharm.h" +#include +#include #include "atom.h" #include "comm.h" #include "neighbor.h" #include "domain.h" #include "force.h" -#include "update.h" #include "memory.h" #include "error.h" diff --git a/src/USER-YAFF/improper_sqdistharm.h b/src/USER-YAFF/improper_sqdistharm.h index 301b5066cb..3aceb01a03 100644 --- a/src/USER-YAFF/improper_sqdistharm.h +++ b/src/USER-YAFF/improper_sqdistharm.h @@ -20,7 +20,6 @@ ImproperStyle(sqdistharm,ImproperSQDistHarm) #ifndef LMP_IMPROPER_SQDISTHARM_H #define LMP_IMPROPER_SQDISTHARM_H -#include #include "improper.h" namespace LAMMPS_NS { diff --git a/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp b/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp index f37dcc3ed1..ab983a78bc 100644 --- a/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp +++ b/src/USER-YAFF/pair_lj_switch3_coulgauss_long.cpp @@ -15,17 +15,15 @@ Contributing author: Steven Vandenbrande ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "pair_lj_switch3_coulgauss_long.h" +#include +#include +#include #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp b/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp index 931ed1d116..4175ef915d 100644 --- a/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp +++ b/src/USER-YAFF/pair_mm3_switch3_coulgauss_long.cpp @@ -15,17 +15,15 @@ Contributing author: Steven Vandenbrande ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "pair_mm3_switch3_coulgauss_long.h" +#include +#include +#include #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" -- GitLab From 5236497932c7b775480123d6e11516158796f035 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Tue, 9 Jul 2019 18:36:51 -0400 Subject: [PATCH 149/236] Changed 'bohr_per_atu_si' to 'bohr_per_atu_electron_si' --- src/KIM/kim_units.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/KIM/kim_units.cpp b/src/KIM/kim_units.cpp index 40f4917601..45f9b81a35 100644 --- a/src/KIM/kim_units.cpp +++ b/src/KIM/kim_units.cpp @@ -175,7 +175,7 @@ double const nanometer_per_nanosecond_si = nanometer_si/nanosecond_si; // [m/s] nanometer/nanosecond double const centimeter_per_second_si = centimeter_si; // [m/s] centimeter/second -double const bohr_per_atu_si = +double const bohr_per_atu_electron_si = bohr_si/atu_electron_si; // [m/s] bohr/atu /*---------------------- @@ -803,7 +803,7 @@ double get_velocity_conversion_factor(units from_unit_enum, units to_unit_enum) conv[meter_per_second][angstrom_per_femtosecond] = 1.0/angstrom_per_femtosecond_si; conv[meter_per_second][angstrom_per_picosecond] = 1.0/angstrom_per_picosecond_si; conv[meter_per_second][centimeter_per_second] = 1.0/centimeter_per_second_si; - conv[meter_per_second][bohr_per_atu] = 1.0/bohr_per_atu_si; + conv[meter_per_second][bohr_per_atu] = 1.0/bohr_per_atu_electron_si; conv[meter_per_second][micrometer_per_microsecond] = 1.0/micrometer_per_microsecond_si; conv[meter_per_second][nanometer_per_nanosecond] = 1.0/nanometer_per_nanosecond_si; -- GitLab From 39315268e885fba886a0ff30eccc619ffaa64c5f Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Tue, 9 Jul 2019 16:53:19 -0600 Subject: [PATCH 150/236] new versions of jacobi() method --- src/math_extra.cpp | 229 +++++++++++++++++++++++++++++++++------------ src/math_extra.h | 9 +- 2 files changed, 175 insertions(+), 63 deletions(-) diff --git a/src/math_extra.cpp b/src/math_extra.cpp index f7e5bb646b..e72b3d3997 100644 --- a/src/math_extra.cpp +++ b/src/math_extra.cpp @@ -13,6 +13,7 @@ /* ---------------------------------------------------------------------- Contributing author: Mike Brown (SNL) + Arno Mayrhofer (DCS Computing), jacobi() functions ------------------------------------------------------------------------- */ #include @@ -95,83 +96,189 @@ int mldivide3(const double m[3][3], const double *v, double *ans) /* ---------------------------------------------------------------------- compute evalues and evectors of 3x3 real symmetric matrix based on Jacobi rotations - adapted from Numerical Recipes jacobi() function + two variants for passing in matrix + + procedure jacobi(S ∈ Rn×n; out e ∈ Rn; out E ∈ Rn×n) + var + i, k, l, m, state ∈ N + s, c, t, p, y, d, r ∈ R + ind ∈ Nn + changed ∈ Ln + ! init e, E, and arrays ind, changed + E := I; state := n + for k := 1 to n do indk := maxind(k); ek := Skk; changedk := true endfor + while state≠0 do ! next rotation + m := 1 ! find index (k,l) of pivot p + for k := 2 to n−1 do + if │Sk indk│ > │Sm indm│ then m := k endif + endfor + k := m; l := indm; p := Skl + ! calculate c = cos φ, s = sin φ + y := (el−ek)/2; d := │y│+√(p2+y2) + r := √(p2+d2); c := d/r; s := p/r; t := p2/d + if y<0 then s := −s; t := −t endif + Skl := 0.0; update(k,−t); update(l,t) + ! rotate rows and columns k and l + for i := 1 to k−1 do rotate(i,k,i,l) endfor + for i := k+1 to l−1 do rotate(k,i,i,l) endfor + for i := l+1 to n do rotate(k,i,l,i) endfor + ! rotate eigenvectors + for i := 1 to n do + ┌ ┐ ┌ ┐┌ ┐ + │Eik│ │c −s││Eik│ + │ │ := │ ││ │ + │Eil│ │s c││Eil│ + └ ┘ └ ┘└ ┘ + endfor + ! rows k, l have changed, update rows indk, indl + indk := maxind(k); indl := maxind(l) + loop + endproc ------------------------------------------------------------------------- */ int jacobi(double matrix[3][3], double *evalues, double evectors[3][3]) { - int i,j,k; - double tresh,theta,tau,t,sm,s,h,g,c,b[3],z[3]; - - for (i = 0; i < 3; i++) { - for (j = 0; j < 3; j++) evectors[i][j] = 0.0; - evectors[i][i] = 1.0; - } - for (i = 0; i < 3; i++) { - b[i] = evalues[i] = matrix[i][i]; - z[i] = 0.0; - } - - for (int iter = 1; iter <= MAXJACOBI; iter++) { - sm = 0.0; - for (i = 0; i < 2; i++) - for (j = i+1; j < 3; j++) - sm += fabs(matrix[i][j]); - if (sm == 0.0) return 0; - - if (iter < 4) tresh = 0.2*sm/(3*3); - else tresh = 0.0; - - for (i = 0; i < 2; i++) { - for (j = i+1; j < 3; j++) { - g = 100.0*fabs(matrix[i][j]); - if (iter > 4 && fabs(evalues[i])+g == fabs(evalues[i]) - && fabs(evalues[j])+g == fabs(evalues[j])) - matrix[i][j] = 0.0; - else if (fabs(matrix[i][j]) > tresh) { - h = evalues[j]-evalues[i]; - if (fabs(h)+g == fabs(h)) t = (matrix[i][j])/h; - else { - theta = 0.5*h/(matrix[i][j]); - t = 1.0/(fabs(theta)+sqrt(1.0+theta*theta)); - if (theta < 0.0) t = -t; - } - c = 1.0/sqrt(1.0+t*t); - s = t*c; - tau = s/(1.0+c); - h = t*matrix[i][j]; - z[i] -= h; - z[j] += h; - evalues[i] -= h; - evalues[j] += h; - matrix[i][j] = 0.0; - for (k = 0; k < i; k++) rotate(matrix,k,i,k,j,s,tau); - for (k = i+1; k < j; k++) rotate(matrix,i,k,k,j,s,tau); - for (k = j+1; k < 3; k++) rotate(matrix,i,k,j,k,s,tau); - for (k = 0; k < 3; k++) rotate(evectors,k,i,k,j,s,tau); + evectors[0][0] = 1.0; evectors[0][1] = 0.0; evectors[0][2] = 0.0; + evectors[1][0] = 0.0; evectors[1][1] = 1.0; evectors[1][2] = 0.0; + evectors[2][0] = 0.0; evectors[2][1] = 0.0; evectors[2][2] = 1.0; + evalues[0] = 0.0; evalues[1] = 0.0; evalues[2] = 0.0; + double threshold = 0.0; + + for (int i = 0; i < 3; i++) + for (int j = i; j < 3; j++) + threshold += fabs(matrix[i][j]); + + if (threshold < 1.0e-200) return 0; + threshold *= 1.0e-12; + int state = 2; + bool changed[3] = {true, true, true}; + + int iteration = 0; + while (state > 0 && iteration < MAXJACOBI) { + for (int k = 0; k < 2; k++) { + for (int l = k+1; l < 3; l++) { + const double p = matrix[k][l]; + const double y = (matrix[l][l]-matrix[k][k])*0.5; + const double d = fabs(y)+sqrt(p*p + y*y); + const double r = sqrt(p*p + d*d); + const double c = r > threshold ? d/r : 1.0; + double s = r > threshold ? p/r : 0.0; + double t = d > threshold ? p*p/d : 0.0; + if (y < 0.0) { + s *= -1.0; + t *= -1.0; } + matrix[k][l] = 0.0; + update_eigenvalue(matrix[k][k], changed[k], state, -t, threshold); + update_eigenvalue(matrix[l][l], changed[l], state, t, threshold); + for (int i = 0; i < k; i++) + rotate(matrix[i][k], matrix[i][l],c,s); + for (int i = k+1; i < l; i++) + rotate(matrix[k][i], matrix[i][l],c,s); + for (int i = l+1; i < 3; i++) + rotate(matrix[k][i], matrix[l][i],c,s); + for (int i = 0; i < 3; i++) + rotate(evectors[i][k], evectors[i][l],c,s); } } + iteration++; + } + + for (int i = 0; i < 3; i++) + evalues[i] = matrix[i][i]; - for (i = 0; i < 3; i++) { - evalues[i] = b[i] += z[i]; - z[i] = 0.0; + if (iteration == MAXJACOBI) return 1; + return 0; +} + +int jacobi(double **matrix, double *evalues, double **evectors) +{ + evectors[0][0] = 1.0; evectors[0][1] = 0.0; evectors[0][2] = 0.0; + evectors[1][0] = 0.0; evectors[1][1] = 1.0; evectors[1][2] = 0.0; + evectors[2][0] = 0.0; evectors[2][1] = 0.0; evectors[2][2] = 1.0; + evalues[0] = 0.0; evalues[1] = 0.0; evalues[2] = 0.0; + double threshold = 0.0; + + for (int i = 0; i < 3; i++) + for (int j = i; j < 3; j++) + threshold += fabs(matrix[i][j]); + + if (threshold < 1.0e-200) return 0; + threshold *= 1.0e-12; + int state = 2; + bool changed[3] = {true, true, true}; + + int iteration = 0; + while (state > 0 && iteration < MAXJACOBI) { + for (int k = 0; k < 2; k++) { + for (int l = k+1; l < 3; l++) { + const double p = matrix[k][l]; + const double y = (matrix[l][l]-matrix[k][k])*0.5; + const double d = fabs(y)+sqrt(p*p + y*y); + const double r = sqrt(p*p + d*d); + const double c = r > threshold ? d/r : 1.0; + double s = r > threshold ? p/r : 0.0; + double t = d > threshold ? p*p/d : 0.0; + if (y < 0.0) { + s *= -1.0; + t *= -1.0; + } + matrix[k][l] = 0.0; + update_eigenvalue(matrix[k][k], changed[k], state, -t, threshold); + update_eigenvalue(matrix[l][l], changed[l], state, t, threshold); + for (int i = 0; i < k; i++) + rotate(matrix[i][k], matrix[i][l],c,s); + for (int i = k+1; i < l; i++) + rotate(matrix[k][i], matrix[i][l],c,s); + for (int i = l+1; i < 3; i++) + rotate(matrix[k][i], matrix[l][i],c,s); + for (int i = 0; i < 3; i++) + rotate(evectors[i][k], evectors[i][l],c,s); + } } + iteration++; } - return 1; + + for (int i = 0; i < 3; i++) + evalues[i] = matrix[i][i]; + + if (iteration == MAXJACOBI) return 1; + return 0; } /* ---------------------------------------------------------------------- - perform a single Jacobi rotation + perform a single Jacobi rotation of Sij, Skl + ┌ ┐ ┌ ┐┌ ┐ + │Skl│ │c −s││Skl│ + │ │ := │ ││ │ + │Sij│ │s c││Sij│ + └ ┘ └ ┘└ ┘ ------------------------------------------------------------------------- */ -void rotate(double matrix[3][3], int i, int j, int k, int l, - double s, double tau) +void rotate(double &matrix_kl, double &matrix_ij, + const double c, const double s) { - double g = matrix[i][j]; - double h = matrix[k][l]; - matrix[i][j] = g-s*(h+g*tau); - matrix[k][l] = h+s*(g-h*tau); + const double tmp_kl = matrix_kl; + matrix_kl = c*matrix_kl - s*matrix_ij; + matrix_ij = s*tmp_kl + c*matrix_ij; +} + +/* ---------------------------------------------------------------------- + update eigenvalue and its status +------------------------------------------------------------------------- */ + +void update_eigenvalue(double &eigenvalue, bool &changed, int &state, + const double t, const double threshold) +{ + eigenvalue += t; + + if (changed && fabs(t) < threshold) { + changed = false; + state--; + } else if (!changed && fabs(t) > threshold) { + changed = true; + state++; + } } /* ---------------------------------------------------------------------- diff --git a/src/math_extra.h b/src/math_extra.h index 85f57224cf..2befc7ee97 100644 --- a/src/math_extra.h +++ b/src/math_extra.h @@ -77,9 +77,14 @@ namespace MathExtra { void write3(const double mat[3][3]); int mldivide3(const double mat[3][3], const double *vec, double *ans); + int jacobi(double matrix[3][3], double *evalues, double evectors[3][3]); - void rotate(double matrix[3][3], int i, int j, int k, int l, - double s, double tau); + int jacobi(double **matrix, double *evalues, double **evectors); + void rotate(double &matrix_kl, double &matrix_ij, + const double c, const double s); + void update_eigenvalue(double &eigenvalue, bool &changed, int &state, + const double t, const double threshold); + void richardson(double *q, double *m, double *w, double *moments, double dtq); void no_squish_rotate(int k, double *p, double *q, double *inertia, double dt); -- GitLab From 93748a18ae4fd370e43244fed4c5e3b07eae4e4f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 10 Jul 2019 00:22:03 -0400 Subject: [PATCH 151/236] further clean up of AtomVec classes after merging PR #1552 to master --- src/DIPOLE/atom_vec_dipole.cpp | 2 -- src/KOKKOS/atom_vec_angle_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_atomic_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_bond_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_charge_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_dpd_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_full_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_hybrid_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_molecular_kokkos.cpp | 2 -- src/KOKKOS/atom_vec_sphere_kokkos.cpp | 2 -- src/MOLECULE/atom_vec_angle.cpp | 2 -- src/MOLECULE/atom_vec_bond.cpp | 2 -- src/MOLECULE/atom_vec_full.cpp | 2 -- src/MOLECULE/atom_vec_molecular.cpp | 2 -- src/MOLECULE/atom_vec_template.cpp | 2 -- src/PERI/atom_vec_peri.cpp | 2 -- src/SPIN/atom_vec_spin.cpp | 2 -- src/USER-AWPMD/atom_vec_wavepacket.cpp | 2 -- src/USER-DPD/atom_vec_dpd.cpp | 2 -- src/USER-EFF/atom_vec_electron.cpp | 3 +-- src/USER-MESO/atom_vec_edpd.cpp | 4 +--- src/USER-MESO/atom_vec_mdpd.cpp | 4 +--- src/USER-MESO/atom_vec_tdpd.cpp | 8 +++----- src/USER-SMD/atom_vec_smd.cpp | 4 +--- src/USER-SPH/atom_vec_meso.cpp | 4 +--- src/atom_vec.cpp | 1 - src/atom_vec_atomic.cpp | 2 -- src/atom_vec_body.cpp | 1 - src/atom_vec_charge.cpp | 2 -- src/atom_vec_ellipsoid.cpp | 1 - src/atom_vec_hybrid.cpp | 2 -- src/atom_vec_line.cpp | 1 - src/atom_vec_sphere.cpp | 1 - src/atom_vec_tri.cpp | 1 - 34 files changed, 8 insertions(+), 69 deletions(-) diff --git a/src/DIPOLE/atom_vec_dipole.cpp b/src/DIPOLE/atom_vec_dipole.cpp index 945732f74b..a3ff3fd0f5 100644 --- a/src/DIPOLE/atom_vec_dipole.cpp +++ b/src/DIPOLE/atom_vec_dipole.cpp @@ -13,11 +13,9 @@ #include "atom_vec_dipole.h" #include -#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/KOKKOS/atom_vec_angle_kokkos.cpp b/src/KOKKOS/atom_vec_angle_kokkos.cpp index b8f5634fa0..736e1c1fca 100644 --- a/src/KOKKOS/atom_vec_angle_kokkos.cpp +++ b/src/KOKKOS/atom_vec_angle_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_angle_kokkos.h" -#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "atom_masks.h" diff --git a/src/KOKKOS/atom_vec_atomic_kokkos.cpp b/src/KOKKOS/atom_vec_atomic_kokkos.cpp index f65f34419a..4fec5740d6 100644 --- a/src/KOKKOS/atom_vec_atomic_kokkos.cpp +++ b/src/KOKKOS/atom_vec_atomic_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_atomic_kokkos.h" -#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "atom_masks.h" diff --git a/src/KOKKOS/atom_vec_bond_kokkos.cpp b/src/KOKKOS/atom_vec_bond_kokkos.cpp index c36b084637..74c05a506c 100644 --- a/src/KOKKOS/atom_vec_bond_kokkos.cpp +++ b/src/KOKKOS/atom_vec_bond_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_bond_kokkos.h" -#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "atom_masks.h" diff --git a/src/KOKKOS/atom_vec_charge_kokkos.cpp b/src/KOKKOS/atom_vec_charge_kokkos.cpp index 631c4b237c..3f26b1e9ea 100644 --- a/src/KOKKOS/atom_vec_charge_kokkos.cpp +++ b/src/KOKKOS/atom_vec_charge_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_charge_kokkos.h" -#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "atom_masks.h" diff --git a/src/KOKKOS/atom_vec_dpd_kokkos.cpp b/src/KOKKOS/atom_vec_dpd_kokkos.cpp index e7123037ca..4162b71374 100644 --- a/src/KOKKOS/atom_vec_dpd_kokkos.cpp +++ b/src/KOKKOS/atom_vec_dpd_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_dpd_kokkos.h" -#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "atom_masks.h" diff --git a/src/KOKKOS/atom_vec_full_kokkos.cpp b/src/KOKKOS/atom_vec_full_kokkos.cpp index 4b6e413b64..1fdbcbec8c 100644 --- a/src/KOKKOS/atom_vec_full_kokkos.cpp +++ b/src/KOKKOS/atom_vec_full_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_full_kokkos.h" -#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "atom_masks.h" diff --git a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp index 630648b3a6..318e79d955 100644 --- a/src/KOKKOS/atom_vec_hybrid_kokkos.cpp +++ b/src/KOKKOS/atom_vec_hybrid_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_hybrid_kokkos.h" -#include #include #include "atom_kokkos.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory_kokkos.h" diff --git a/src/KOKKOS/atom_vec_molecular_kokkos.cpp b/src/KOKKOS/atom_vec_molecular_kokkos.cpp index 8790f0bdbc..f3b4ae98ca 100644 --- a/src/KOKKOS/atom_vec_molecular_kokkos.cpp +++ b/src/KOKKOS/atom_vec_molecular_kokkos.cpp @@ -12,13 +12,11 @@ ------------------------------------------------------------------------- */ #include "atom_vec_molecular_kokkos.h" -#include #include "atom_kokkos.h" #include "comm_kokkos.h" #include "domain.h" #include "modify.h" #include "fix.h" -#include "force.h" #include "atom_masks.h" #include "memory_kokkos.h" #include "error.h" diff --git a/src/KOKKOS/atom_vec_sphere_kokkos.cpp b/src/KOKKOS/atom_vec_sphere_kokkos.cpp index 0f69cc9c5a..d93b98a4b0 100644 --- a/src/KOKKOS/atom_vec_sphere_kokkos.cpp +++ b/src/KOKKOS/atom_vec_sphere_kokkos.cpp @@ -13,14 +13,12 @@ #include "atom_vec_sphere_kokkos.h" #include -#include #include #include "atom_kokkos.h" #include "atom_masks.h" #include "comm_kokkos.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "fix_adapt.h" #include "math_const.h" diff --git a/src/MOLECULE/atom_vec_angle.cpp b/src/MOLECULE/atom_vec_angle.cpp index c8053266ca..b6f5a013cb 100644 --- a/src/MOLECULE/atom_vec_angle.cpp +++ b/src/MOLECULE/atom_vec_angle.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_angle.h" -#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/MOLECULE/atom_vec_bond.cpp b/src/MOLECULE/atom_vec_bond.cpp index 0d267d10cc..b9d4177b4f 100644 --- a/src/MOLECULE/atom_vec_bond.cpp +++ b/src/MOLECULE/atom_vec_bond.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_bond.h" -#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/MOLECULE/atom_vec_full.cpp b/src/MOLECULE/atom_vec_full.cpp index 167edde18f..e71e23a661 100644 --- a/src/MOLECULE/atom_vec_full.cpp +++ b/src/MOLECULE/atom_vec_full.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_full.h" -#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/MOLECULE/atom_vec_molecular.cpp b/src/MOLECULE/atom_vec_molecular.cpp index 5ccf5529b4..1bafb6dc43 100644 --- a/src/MOLECULE/atom_vec_molecular.cpp +++ b/src/MOLECULE/atom_vec_molecular.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_molecular.h" -#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/MOLECULE/atom_vec_template.cpp b/src/MOLECULE/atom_vec_template.cpp index ae31870fd0..27c6ab4183 100644 --- a/src/MOLECULE/atom_vec_template.cpp +++ b/src/MOLECULE/atom_vec_template.cpp @@ -12,10 +12,8 @@ ------------------------------------------------------------------------- */ #include "atom_vec_template.h" -#include #include "atom.h" #include "molecule.h" -#include "force.h" #include "comm.h" #include "domain.h" #include "modify.h" diff --git a/src/PERI/atom_vec_peri.cpp b/src/PERI/atom_vec_peri.cpp index 0829dfb1c0..47b88995b8 100644 --- a/src/PERI/atom_vec_peri.cpp +++ b/src/PERI/atom_vec_peri.cpp @@ -17,12 +17,10 @@ #include "atom_vec_peri.h" #include -#include #include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "citeme.h" diff --git a/src/SPIN/atom_vec_spin.cpp b/src/SPIN/atom_vec_spin.cpp index 345a2d6c04..f5560b6ee9 100644 --- a/src/SPIN/atom_vec_spin.cpp +++ b/src/SPIN/atom_vec_spin.cpp @@ -25,14 +25,12 @@ #include "atom_vec_spin.h" #include -#include #include #include "atom.h" #include "comm.h" #include "domain.h" #include "error.h" #include "fix.h" -#include "force.h" #include "memory.h" #include "modify.h" #include "utils.h" diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index bafd172254..c12798688e 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -17,13 +17,11 @@ #include "atom_vec_wavepacket.h" #include -#include #include #include "atom.h" #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "memory.h" #include "error.h" diff --git a/src/USER-DPD/atom_vec_dpd.cpp b/src/USER-DPD/atom_vec_dpd.cpp index 2aef55ff9f..bf11840d1e 100644 --- a/src/USER-DPD/atom_vec_dpd.cpp +++ b/src/USER-DPD/atom_vec_dpd.cpp @@ -15,12 +15,10 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include #include "atom_vec_dpd.h" #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/USER-EFF/atom_vec_electron.cpp b/src/USER-EFF/atom_vec_electron.cpp index cca71545f4..707a75c7c1 100644 --- a/src/USER-EFF/atom_vec_electron.cpp +++ b/src/USER-EFF/atom_vec_electron.cpp @@ -15,9 +15,8 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include #include "atom_vec_electron.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-MESO/atom_vec_edpd.cpp b/src/USER-MESO/atom_vec_edpd.cpp index ff8515abc6..dccc8b9efa 100644 --- a/src/USER-MESO/atom_vec_edpd.cpp +++ b/src/USER-MESO/atom_vec_edpd.cpp @@ -10,13 +10,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "atom_vec_edpd.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "update.h" diff --git a/src/USER-MESO/atom_vec_mdpd.cpp b/src/USER-MESO/atom_vec_mdpd.cpp index 965891a283..0aa6aedcee 100644 --- a/src/USER-MESO/atom_vec_mdpd.cpp +++ b/src/USER-MESO/atom_vec_mdpd.cpp @@ -11,13 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "atom_vec_mdpd.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "update.h" diff --git a/src/USER-MESO/atom_vec_tdpd.cpp b/src/USER-MESO/atom_vec_tdpd.cpp index f19758f884..278baa2024 100644 --- a/src/USER-MESO/atom_vec_tdpd.cpp +++ b/src/USER-MESO/atom_vec_tdpd.cpp @@ -11,12 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "atom_vec_tdpd.h" +#include #include "atom.h" #include "comm.h" -#include "force.h" #include "domain.h" #include "modify.h" #include "fix.h" @@ -65,7 +63,7 @@ void AtomVecTDPD::process_args(int narg, char **arg) { if (narg < 1) error->all(FLERR,"Invalid atom_style tdpd command"); - atom->cc_species = force->inumeric(FLERR,arg[0]); + atom->cc_species = utils::inumeric(FLERR,arg[0],false,lmp); cc_species = atom->cc_species; // reset sizes that depend on cc_species @@ -801,7 +799,7 @@ void AtomVecTDPD::data_atom(double *coord, imageint imagetmp, char **values) x[nlocal][2] = coord[2]; for(int k = 0; k < cc_species; k++) - cc[nlocal][k] = atof( values[5+k] ); + cc[nlocal][k] = utils::numeric(FLERR,values[5+k],true,lmp); image[nlocal] = imagetmp; diff --git a/src/USER-SMD/atom_vec_smd.cpp b/src/USER-SMD/atom_vec_smd.cpp index 278652bf43..5cc411a832 100644 --- a/src/USER-SMD/atom_vec_smd.cpp +++ b/src/USER-SMD/atom_vec_smd.cpp @@ -22,15 +22,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "atom_vec_smd.h" #include -#include #include -#include "atom_vec_smd.h" #include "atom.h" #include "comm.h" #include "domain.h" #include "modify.h" -#include "force.h" #include "fix.h" #include "fix_adapt.h" #include "math_const.h" diff --git a/src/USER-SPH/atom_vec_meso.cpp b/src/USER-SPH/atom_vec_meso.cpp index 0960141ae2..59e6638f16 100644 --- a/src/USER-SPH/atom_vec_meso.cpp +++ b/src/USER-SPH/atom_vec_meso.cpp @@ -11,13 +11,11 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "atom_vec_meso.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/atom_vec.cpp b/src/atom_vec.cpp index 146a503221..1ea085b869 100644 --- a/src/atom_vec.cpp +++ b/src/atom_vec.cpp @@ -13,7 +13,6 @@ #include "atom_vec.h" #include -#include #include "atom.h" #include "force.h" #include "domain.h" diff --git a/src/atom_vec_atomic.cpp b/src/atom_vec_atomic.cpp index f1583ab8cc..3cf037f182 100644 --- a/src/atom_vec_atomic.cpp +++ b/src/atom_vec_atomic.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_atomic.h" -#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/atom_vec_body.cpp b/src/atom_vec_body.cpp index 622b698bd9..53ed708c4e 100644 --- a/src/atom_vec_body.cpp +++ b/src/atom_vec_body.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "atom_vec_body.h" -#include #include #include #include "my_pool_chunk.h" diff --git a/src/atom_vec_charge.cpp b/src/atom_vec_charge.cpp index da863f0949..923d892acd 100644 --- a/src/atom_vec_charge.cpp +++ b/src/atom_vec_charge.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_charge.h" -#include #include "atom.h" #include "comm.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/atom_vec_ellipsoid.cpp b/src/atom_vec_ellipsoid.cpp index 44cd818c9d..586e6a80ff 100644 --- a/src/atom_vec_ellipsoid.cpp +++ b/src/atom_vec_ellipsoid.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include "atom_vec_ellipsoid.h" -#include #include #include "math_extra.h" #include "atom.h" diff --git a/src/atom_vec_hybrid.cpp b/src/atom_vec_hybrid.cpp index 25c85b2e3d..9ad07b9032 100644 --- a/src/atom_vec_hybrid.cpp +++ b/src/atom_vec_hybrid.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "atom_vec_hybrid.h" -#include #include #include "atom.h" #include "domain.h" -#include "force.h" #include "modify.h" #include "fix.h" #include "memory.h" diff --git a/src/atom_vec_line.cpp b/src/atom_vec_line.cpp index f9feb9b046..30736c02c9 100644 --- a/src/atom_vec_line.cpp +++ b/src/atom_vec_line.cpp @@ -13,7 +13,6 @@ #include "atom_vec_line.h" #include -#include #include #include "atom.h" #include "comm.h" diff --git a/src/atom_vec_sphere.cpp b/src/atom_vec_sphere.cpp index 1defcf8d01..9d52d005ba 100644 --- a/src/atom_vec_sphere.cpp +++ b/src/atom_vec_sphere.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "atom_vec_sphere.h" -#include #include #include "atom.h" #include "comm.h" diff --git a/src/atom_vec_tri.cpp b/src/atom_vec_tri.cpp index 8835255591..640e0fcb34 100644 --- a/src/atom_vec_tri.cpp +++ b/src/atom_vec_tri.cpp @@ -13,7 +13,6 @@ #include "atom_vec_tri.h" #include -#include #include #include "math_extra.h" #include "atom.h" -- GitLab From 0f691de031b8000f91e451172d72f329c937c428 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 10 Jul 2019 00:50:34 -0400 Subject: [PATCH 152/236] include file cleanup in some more packages --- src/SPIN/fix_setforce_spin.cpp | 1 - src/USER-CGDNA/bond_oxdna_fene.cpp | 1 + src/USER-CGSDK/angle_sdk.cpp | 2 +- src/USER-CGSDK/pair_lj_sdk.cpp | 7 +------ src/USER-CGSDK/pair_lj_sdk_coul_long.cpp | 8 +------- src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp | 9 --------- src/USER-DIFFRACTION/compute_saed.cpp | 3 +-- src/USER-DIFFRACTION/compute_xrd.cpp | 3 +-- src/USER-DIFFRACTION/fix_saed_vtk.cpp | 5 +---- src/USER-DPD/compute_dpd.cpp | 5 +---- src/USER-DPD/compute_dpd_atom.cpp | 8 +------- src/USER-DPD/fix_dpd_energy.cpp | 4 ---- src/USER-DPD/fix_eos_cv.cpp | 2 -- src/USER-DPD/fix_eos_table.cpp | 3 ++- src/USER-DPD/fix_eos_table_rx.cpp | 3 ++- src/USER-DPD/fix_rx.cpp | 4 ++-- src/USER-DPD/fix_shardlow.cpp | 5 +---- src/USER-DPD/nbin_ssa.cpp | 2 -- src/USER-DPD/npair_half_bin_newton_ssa.cpp | 2 -- src/USER-DPD/nstencil_half_bin_2d_newton_ssa.cpp | 2 -- src/USER-DPD/nstencil_half_bin_3d_newton_ssa.cpp | 2 -- src/USER-DPD/pair_dpd_fdt.cpp | 7 ++----- src/USER-DPD/pair_table_rx.cpp | 4 +--- src/USER-DRUDE/compute_temp_drude.cpp | 8 ++------ src/USER-DRUDE/compute_temp_drude.h | 3 +-- src/USER-DRUDE/fix_drude.cpp | 5 +++-- src/USER-DRUDE/fix_drude_transform.cpp | 4 ++-- src/USER-DRUDE/fix_drude_transform.h | 3 +-- src/USER-DRUDE/fix_langevin_drude.cpp | 5 ++--- src/USER-DRUDE/fix_langevin_drude.h | 3 +-- src/USER-DRUDE/pair_lj_cut_thole_long.cpp | 9 +++------ src/USER-DRUDE/pair_lj_cut_thole_long.h | 3 +-- src/USER-DRUDE/pair_thole.cpp | 7 +++---- src/USER-DRUDE/pair_thole.h | 3 +-- src/USER-EFF/compute_temp_eff.cpp | 3 +-- src/USER-FEP/compute_fep.cpp | 3 +-- src/USER-FEP/fix_adapt_fep.cpp | 4 +--- src/USER-FEP/pair_coul_cut_soft.cpp | 5 ++--- src/USER-FEP/pair_coul_long_soft.cpp | 7 ++----- src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp | 6 ++---- src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp | 5 ++--- src/USER-FEP/pair_lj_class2_coul_long_soft.cpp | 5 ++--- src/USER-FEP/pair_lj_class2_soft.cpp | 5 ++--- src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp | 5 ++--- src/USER-FEP/pair_lj_cut_coul_long_soft.cpp | 6 ++---- src/USER-FEP/pair_lj_cut_soft.cpp | 6 ++---- src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp | 9 ++------- src/USER-FEP/pair_morse_soft.cpp | 5 ++--- src/USER-FEP/pair_tip4p_long_soft.cpp | 9 ++------- src/USER-MESO/fix_mvv_dpd.cpp | 4 +--- src/USER-MESO/fix_tdpd_source.cpp | 11 ++--------- src/USER-MESO/pair_edpd.cpp | 6 ++---- src/USER-MESO/pair_mdpd.cpp | 6 ++---- src/USER-MESO/pair_mdpd_rhosum.cpp | 5 +---- src/USER-MESO/pair_tdpd.cpp | 5 +---- 55 files changed, 75 insertions(+), 190 deletions(-) diff --git a/src/SPIN/fix_setforce_spin.cpp b/src/SPIN/fix_setforce_spin.cpp index 15e5aacfb6..e36a9d260d 100644 --- a/src/SPIN/fix_setforce_spin.cpp +++ b/src/SPIN/fix_setforce_spin.cpp @@ -22,7 +22,6 @@ ------------------------------------------------------------------------- */ #include "fix_setforce_spin.h" -#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-CGDNA/bond_oxdna_fene.cpp b/src/USER-CGDNA/bond_oxdna_fene.cpp index 8314576d63..2f76e67ef4 100644 --- a/src/USER-CGDNA/bond_oxdna_fene.cpp +++ b/src/USER-CGDNA/bond_oxdna_fene.cpp @@ -15,6 +15,7 @@ ------------------------------------------------------------------------- */ #include "bond_oxdna_fene.h" +#include #include #include "atom.h" #include "neighbor.h" diff --git a/src/USER-CGSDK/angle_sdk.cpp b/src/USER-CGSDK/angle_sdk.cpp index 575b0fae69..862c165bbd 100644 --- a/src/USER-CGSDK/angle_sdk.cpp +++ b/src/USER-CGSDK/angle_sdk.cpp @@ -19,8 +19,8 @@ ------------------------------------------------------------------------- */ #include "angle_sdk.h" +#include #include -#include #include "atom.h" #include "neighbor.h" #include "pair.h" diff --git a/src/USER-CGSDK/pair_lj_sdk.cpp b/src/USER-CGSDK/pair_lj_sdk.cpp index b22469566e..6ad77a6183 100644 --- a/src/USER-CGSDK/pair_lj_sdk.cpp +++ b/src/USER-CGSDK/pair_lj_sdk.cpp @@ -17,18 +17,13 @@ ------------------------------------------------------------------------- */ #include "pair_lj_sdk.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp index 5fba8cde66..62acf00d27 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_long.cpp @@ -17,9 +17,8 @@ ------------------------------------------------------------------------- */ #include "pair_lj_sdk_coul_long.h" +#include #include -#include -#include #include #include "atom.h" #include "comm.h" @@ -27,10 +26,6 @@ #include "kspace.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "math_const.h" #include "memory.h" #include "error.h" @@ -38,7 +33,6 @@ #include "lj_sdk_common.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace LJSDKParms; #define EWALD_F 1.12837917 diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp index b61ed5528f..1095521de3 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp @@ -18,26 +18,17 @@ #include "pair_lj_sdk_coul_msm.h" #include -#include -#include #include #include "atom.h" -#include "comm.h" #include "force.h" #include "kspace.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "lj_sdk_common.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace LJSDKParms; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-DIFFRACTION/compute_saed.cpp b/src/USER-DIFFRACTION/compute_saed.cpp index dcafe57ba8..971d9bd380 100644 --- a/src/USER-DIFFRACTION/compute_saed.cpp +++ b/src/USER-DIFFRACTION/compute_saed.cpp @@ -15,13 +15,12 @@ Contributing authors: Shawn Coleman & Douglas Spearot (Arkansas) ------------------------------------------------------------------------- */ +#include "compute_saed.h" #include #include #include -#include #include #include "math_const.h" -#include "compute_saed.h" #include "compute_saed_consts.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-DIFFRACTION/compute_xrd.cpp b/src/USER-DIFFRACTION/compute_xrd.cpp index d6b7549272..f48951f1ff 100644 --- a/src/USER-DIFFRACTION/compute_xrd.cpp +++ b/src/USER-DIFFRACTION/compute_xrd.cpp @@ -16,13 +16,12 @@ Updated: 06/17/2015-2 ------------------------------------------------------------------------- */ +#include "compute_xrd.h" #include #include #include -#include #include #include "math_const.h" -#include "compute_xrd.h" #include "compute_xrd_consts.h" #include "atom.h" #include "comm.h" diff --git a/src/USER-DIFFRACTION/fix_saed_vtk.cpp b/src/USER-DIFFRACTION/fix_saed_vtk.cpp index 4d9af66818..c3a72e494b 100644 --- a/src/USER-DIFFRACTION/fix_saed_vtk.cpp +++ b/src/USER-DIFFRACTION/fix_saed_vtk.cpp @@ -16,17 +16,14 @@ Incorporating SAED: Shawn Coleman (Arkansas) ------------------------------------------------------------------------- */ +#include "fix_saed_vtk.h" #include #include #include -#include "fix_saed_vtk.h" #include "update.h" #include "modify.h" #include "compute.h" #include "compute_saed.h" -#include "group.h" -#include "input.h" -#include "variable.h" #include "memory.h" #include "error.h" #include "force.h" diff --git a/src/USER-DPD/compute_dpd.cpp b/src/USER-DPD/compute_dpd.cpp index 08aa19bcdf..0ef7868164 100644 --- a/src/USER-DPD/compute_dpd.cpp +++ b/src/USER-DPD/compute_dpd.cpp @@ -15,13 +15,10 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include #include "compute_dpd.h" +#include #include "atom.h" #include "update.h" -#include "force.h" -#include "domain.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-DPD/compute_dpd_atom.cpp b/src/USER-DPD/compute_dpd_atom.cpp index 78f842a68f..0fd732f669 100644 --- a/src/USER-DPD/compute_dpd_atom.cpp +++ b/src/USER-DPD/compute_dpd_atom.cpp @@ -15,21 +15,15 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_dpd_atom.h" +#include #include "atom.h" #include "update.h" #include "modify.h" -#include "domain.h" -#include "group.h" #include "memory.h" #include "error.h" #include "comm.h" -#include - using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-DPD/fix_dpd_energy.cpp b/src/USER-DPD/fix_dpd_energy.cpp index 5759a164f5..6ee88ea88a 100644 --- a/src/USER-DPD/fix_dpd_energy.cpp +++ b/src/USER-DPD/fix_dpd_energy.cpp @@ -11,14 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "fix_dpd_energy.h" #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" -#include "modify.h" #include "error.h" #include "pair_dpd_fdt_energy.h" diff --git a/src/USER-DPD/fix_eos_cv.cpp b/src/USER-DPD/fix_eos_cv.cpp index 919e6829f3..5b25519a40 100644 --- a/src/USER-DPD/fix_eos_cv.cpp +++ b/src/USER-DPD/fix_eos_cv.cpp @@ -15,8 +15,6 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ -#include -#include #include "fix_eos_cv.h" #include "atom.h" #include "error.h" diff --git a/src/USER-DPD/fix_eos_table.cpp b/src/USER-DPD/fix_eos_table.cpp index 7d701f5fb8..ff9a186c47 100644 --- a/src/USER-DPD/fix_eos_table.cpp +++ b/src/USER-DPD/fix_eos_table.cpp @@ -15,9 +15,10 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ +#include "fix_eos_table.h" +#include #include #include -#include "fix_eos_table.h" #include "atom.h" #include "error.h" #include "force.h" diff --git a/src/USER-DPD/fix_eos_table_rx.cpp b/src/USER-DPD/fix_eos_table_rx.cpp index 779cee0e8b..9f1bd6a3bb 100644 --- a/src/USER-DPD/fix_eos_table_rx.cpp +++ b/src/USER-DPD/fix_eos_table_rx.cpp @@ -15,10 +15,11 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ +#include "fix_eos_table_rx.h" +#include #include #include #include -#include "fix_eos_table_rx.h" #include "atom.h" #include "error.h" #include "force.h" diff --git a/src/USER-DPD/fix_rx.cpp b/src/USER-DPD/fix_rx.cpp index cb8349786f..03e8ae49a4 100644 --- a/src/USER-DPD/fix_rx.cpp +++ b/src/USER-DPD/fix_rx.cpp @@ -11,12 +11,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include "fix_rx.h" +#include #include #include #include #include // DBL_EPSILON -#include "fix_rx.h" #include "atom.h" #include "error.h" #include "group.h" diff --git a/src/USER-DPD/fix_shardlow.cpp b/src/USER-DPD/fix_shardlow.cpp index 4e133480ad..f181436f91 100644 --- a/src/USER-DPD/fix_shardlow.cpp +++ b/src/USER-DPD/fix_shardlow.cpp @@ -33,15 +33,13 @@ 135, 204105. ------------------------------------------------------------------------- */ -#include +#include "fix_shardlow.h" #include #include #include -#include "fix_shardlow.h" #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" #include "atom_vec.h" #include "comm.h" @@ -53,7 +51,6 @@ #include "modify.h" #include "pair_dpd_fdt.h" #include "pair_dpd_fdt_energy.h" -#include "pair.h" #include "npair_half_bin_newton_ssa.h" #include "citeme.h" diff --git a/src/USER-DPD/nbin_ssa.cpp b/src/USER-DPD/nbin_ssa.cpp index dcd434cb4a..e3fa71aedf 100644 --- a/src/USER-DPD/nbin_ssa.cpp +++ b/src/USER-DPD/nbin_ssa.cpp @@ -21,8 +21,6 @@ #include "update.h" #include "group.h" #include "domain.h" -#include "memory.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-DPD/npair_half_bin_newton_ssa.cpp b/src/USER-DPD/npair_half_bin_newton_ssa.cpp index ba90ebc465..2139173d47 100644 --- a/src/USER-DPD/npair_half_bin_newton_ssa.cpp +++ b/src/USER-DPD/npair_half_bin_newton_ssa.cpp @@ -17,7 +17,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_bin_newton_ssa.h" -#include "neighbor.h" #include "nstencil_ssa.h" #include "nbin_ssa.h" #include "neigh_list.h" @@ -25,7 +24,6 @@ #include "atom_vec.h" #include "molecule.h" #include "domain.h" -#include "group.h" #include "memory.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-DPD/nstencil_half_bin_2d_newton_ssa.cpp b/src/USER-DPD/nstencil_half_bin_2d_newton_ssa.cpp index 451381c104..9953fca62c 100644 --- a/src/USER-DPD/nstencil_half_bin_2d_newton_ssa.cpp +++ b/src/USER-DPD/nstencil_half_bin_2d_newton_ssa.cpp @@ -17,8 +17,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_2d_newton_ssa.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/USER-DPD/nstencil_half_bin_3d_newton_ssa.cpp b/src/USER-DPD/nstencil_half_bin_3d_newton_ssa.cpp index cdd3b8856f..4dd3c4a5fe 100644 --- a/src/USER-DPD/nstencil_half_bin_3d_newton_ssa.cpp +++ b/src/USER-DPD/nstencil_half_bin_3d_newton_ssa.cpp @@ -17,8 +17,6 @@ ------------------------------------------------------------------------- */ #include "nstencil_half_bin_3d_newton_ssa.h" -#include "neighbor.h" -#include "neigh_list.h" using namespace LAMMPS_NS; diff --git a/src/USER-DPD/pair_dpd_fdt.cpp b/src/USER-DPD/pair_dpd_fdt.cpp index 07ef8190f0..1cb9d68d06 100644 --- a/src/USER-DPD/pair_dpd_fdt.cpp +++ b/src/USER-DPD/pair_dpd_fdt.cpp @@ -15,23 +15,20 @@ Contributing author: James Larentzos (U.S. Army Research Laboratory) ------------------------------------------------------------------------- */ +#include "pair_dpd_fdt.h" +#include #include -#include -#include #include #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "update.h" #include "fix.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "random_mars.h" #include "memory.h" #include "modify.h" -#include "pair_dpd_fdt.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-DPD/pair_table_rx.cpp b/src/USER-DPD/pair_table_rx.cpp index f2d0d7b1fb..e767f93367 100644 --- a/src/USER-DPD/pair_table_rx.cpp +++ b/src/USER-DPD/pair_table_rx.cpp @@ -15,14 +15,12 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_table_rx.h" #include #include -#include #include -#include "pair_table_rx.h" #include "atom.h" #include "force.h" -#include "comm.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/USER-DRUDE/compute_temp_drude.cpp b/src/USER-DRUDE/compute_temp_drude.cpp index 4830e950d0..a12c248680 100644 --- a/src/USER-DRUDE/compute_temp_drude.cpp +++ b/src/USER-DRUDE/compute_temp_drude.cpp @@ -11,19 +11,15 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_temp_drude.h" #include -#include #include -#include "compute_temp_drude.h" #include "atom.h" #include "update.h" #include "force.h" -#include "group.h" #include "modify.h" -#include "fix.h" +#include "fix_drude.h" #include "domain.h" -#include "lattice.h" -#include "memory.h" #include "error.h" #include "comm.h" diff --git a/src/USER-DRUDE/compute_temp_drude.h b/src/USER-DRUDE/compute_temp_drude.h index 88d767f8b7..530c84ce3d 100644 --- a/src/USER-DRUDE/compute_temp_drude.h +++ b/src/USER-DRUDE/compute_temp_drude.h @@ -21,7 +21,6 @@ ComputeStyle(temp/drude,ComputeTempDrude) #define LMP_COMPUTE_TEMP_DRUDE_H #include "compute.h" -#include "fix_drude.h" namespace LAMMPS_NS { @@ -37,7 +36,7 @@ class ComputeTempDrude : public Compute { private: int fix_dof; - FixDrude * fix_drude; + class FixDrude * fix_drude; char *id_temp; class Compute *temperature; bigint dof_core, dof_drude; diff --git a/src/USER-DRUDE/fix_drude.cpp b/src/USER-DRUDE/fix_drude.cpp index 7800efe7ff..080408459c 100644 --- a/src/USER-DRUDE/fix_drude.cpp +++ b/src/USER-DRUDE/fix_drude.cpp @@ -11,9 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "fix_drude.h" +#include +#include +#include #include "atom.h" #include "comm.h" #include "modify.h" diff --git a/src/USER-DRUDE/fix_drude_transform.cpp b/src/USER-DRUDE/fix_drude_transform.cpp index 34742a0683..8e85f1dffd 100644 --- a/src/USER-DRUDE/fix_drude_transform.cpp +++ b/src/USER-DRUDE/fix_drude_transform.cpp @@ -12,15 +12,15 @@ ------------------------------------------------------------------------- */ /** Fix Drude Transform ******************************************************/ +#include "fix_drude_transform.h" #include #include -#include "fix_drude_transform.h" +#include "fix_drude.h" #include "atom.h" #include "domain.h" #include "comm.h" #include "error.h" #include "modify.h" -#include "force.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-DRUDE/fix_drude_transform.h b/src/USER-DRUDE/fix_drude_transform.h index 41f4e147ed..b74a500c95 100644 --- a/src/USER-DRUDE/fix_drude_transform.h +++ b/src/USER-DRUDE/fix_drude_transform.h @@ -22,7 +22,6 @@ FixStyle(drude/transform/inverse,FixDrudeTransform) #define LMP_FIX_DRUDE_TRANSFORM_H #include "fix.h" -#include "fix_drude.h" namespace LAMMPS_NS { @@ -42,7 +41,7 @@ class FixDrudeTransform : public Fix { void unpack_forward_comm(int n, int first, double *buf); protected: double * mcoeff; - FixDrude * fix_drude; + class FixDrude * fix_drude; }; } diff --git a/src/USER-DRUDE/fix_langevin_drude.cpp b/src/USER-DRUDE/fix_langevin_drude.cpp index b9d1139f83..1a16c3df96 100644 --- a/src/USER-DRUDE/fix_langevin_drude.cpp +++ b/src/USER-DRUDE/fix_langevin_drude.cpp @@ -11,17 +11,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_langevin_drude.h" #include -#include #include -#include "fix_langevin_drude.h" +#include "fix_drude.h" #include "atom.h" #include "force.h" #include "comm.h" #include "input.h" #include "variable.h" #include "random_mars.h" -#include "group.h" #include "update.h" #include "modify.h" #include "compute.h" diff --git a/src/USER-DRUDE/fix_langevin_drude.h b/src/USER-DRUDE/fix_langevin_drude.h index d65440582c..9437883ba3 100644 --- a/src/USER-DRUDE/fix_langevin_drude.h +++ b/src/USER-DRUDE/fix_langevin_drude.h @@ -21,7 +21,6 @@ FixStyle(langevin/drude,FixLangevinDrude) #define LMP_FIX_LANGEVIN_DRUDE_H #include "fix.h" -#include "fix_drude.h" namespace LAMMPS_NS { @@ -51,7 +50,7 @@ class FixLangevinDrude : public Fix { class RanMars *random_core, *random_drude; int zero; bigint ncore; - FixDrude * fix_drude; + class FixDrude * fix_drude; class Compute *temperature; char *id_temp; }; diff --git a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp index 1ebe4a4c2d..851effd89c 100644 --- a/src/USER-DRUDE/pair_lj_cut_thole_long.cpp +++ b/src/USER-DRUDE/pair_lj_cut_thole_long.cpp @@ -15,20 +15,17 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_thole_long.h" +#include #include -#include -#include #include -#include "pair_lj_cut_thole_long.h" +#include "fix_drude.h" #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" -#include "update.h" -#include "integrate.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/USER-DRUDE/pair_lj_cut_thole_long.h b/src/USER-DRUDE/pair_lj_cut_thole_long.h index 27a917c737..4c3a883064 100644 --- a/src/USER-DRUDE/pair_lj_cut_thole_long.h +++ b/src/USER-DRUDE/pair_lj_cut_thole_long.h @@ -21,7 +21,6 @@ PairStyle(lj/cut/thole/long,PairLJCutTholeLong) #define LMP_PAIR_LJ_CUT_THOLE_LONG_H #include "pair.h" -#include "fix_drude.h" namespace LAMMPS_NS { @@ -58,7 +57,7 @@ class PairLJCutTholeLong : public Pair { double cut_global; double **cut,**scale; double **polar,**thole,**ascreen; - FixDrude *fix_drude; + class FixDrude *fix_drude; virtual void allocate(); }; diff --git a/src/USER-DRUDE/pair_thole.cpp b/src/USER-DRUDE/pair_thole.cpp index 1bb75af825..1f81263e95 100644 --- a/src/USER-DRUDE/pair_thole.cpp +++ b/src/USER-DRUDE/pair_thole.cpp @@ -11,11 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_thole.h" +#include #include -#include -#include #include -#include "pair_thole.h" #include "atom.h" #include "comm.h" #include "force.h" @@ -24,7 +23,7 @@ #include "memory.h" #include "error.h" #include "fix.h" -#include "fix_store.h" +#include "fix_drude.h" #include "domain.h" #include "modify.h" diff --git a/src/USER-DRUDE/pair_thole.h b/src/USER-DRUDE/pair_thole.h index 2c462b431a..88c00b6d20 100644 --- a/src/USER-DRUDE/pair_thole.h +++ b/src/USER-DRUDE/pair_thole.h @@ -21,7 +21,6 @@ PairStyle(thole,PairThole) #define LMP_PAIR_THOLE_H #include "pair.h" -#include "fix_drude.h" namespace LAMMPS_NS { @@ -46,7 +45,7 @@ class PairThole : public Pair { double cut_global; double **cut,**scale; double **polar,**thole,**ascreen; - FixDrude * fix_drude; + class FixDrude * fix_drude; virtual void allocate(); }; diff --git a/src/USER-EFF/compute_temp_eff.cpp b/src/USER-EFF/compute_temp_eff.cpp index d745269ff5..8e07e390fa 100644 --- a/src/USER-EFF/compute_temp_eff.cpp +++ b/src/USER-EFF/compute_temp_eff.cpp @@ -15,9 +15,8 @@ Contributing author: Andres Jaramillo-Botero (Caltech) ------------------------------------------------------------------------- */ -#include -#include #include "compute_temp_eff.h" +#include #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/USER-FEP/compute_fep.cpp b/src/USER-FEP/compute_fep.cpp index dc0b71e71b..1853828db3 100644 --- a/src/USER-FEP/compute_fep.cpp +++ b/src/USER-FEP/compute_fep.cpp @@ -15,7 +15,7 @@ Contributing author: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include +#include "compute_fep.h" #include #include #include @@ -34,7 +34,6 @@ #include "timer.h" #include "memory.h" #include "error.h" -#include "compute_fep.h" using namespace LAMMPS_NS; diff --git a/src/USER-FEP/fix_adapt_fep.cpp b/src/USER-FEP/fix_adapt_fep.cpp index 7304bc4ef6..46cf32cf0b 100644 --- a/src/USER-FEP/fix_adapt_fep.cpp +++ b/src/USER-FEP/fix_adapt_fep.cpp @@ -15,10 +15,8 @@ Charges by type and after option: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_adapt_fep.h" +#include #include "atom.h" #include "update.h" #include "group.h" diff --git a/src/USER-FEP/pair_coul_cut_soft.cpp b/src/USER-FEP/pair_coul_cut_soft.cpp index 86a6d02819..a4ff3ca846 100644 --- a/src/USER-FEP/pair_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_coul_cut_soft.cpp @@ -15,11 +15,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_coul_cut_soft.h" +#include #include -#include -#include #include -#include "pair_coul_cut_soft.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-FEP/pair_coul_long_soft.cpp b/src/USER-FEP/pair_coul_long_soft.cpp index 9d3ffc0da1..c0030f8935 100644 --- a/src/USER-FEP/pair_coul_long_soft.cpp +++ b/src/USER-FEP/pair_coul_long_soft.cpp @@ -16,19 +16,16 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_coul_long_soft.h" +#include #include -#include -#include #include -#include "pair_coul_long_soft.h" #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "neighbor.h" #include "neigh_list.h" -#include "update.h" -#include "integrate.h" #include "memory.h" #include "error.h" diff --git a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp index ac6f1e6384..4c3be6addb 100644 --- a/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_charmm_coul_long_soft.cpp @@ -16,17 +16,15 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_lj_charmm_coul_long_soft.h" +#include #include -#include -#include #include -#include "pair_lj_charmm_coul_long_soft.h" #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp b/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp index ae79515488..bbe67e4ff3 100644 --- a/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_class2_coul_cut_soft.cpp @@ -11,11 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2_coul_cut_soft.h" +#include #include -#include -#include #include -#include "pair_lj_class2_coul_cut_soft.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-FEP/pair_lj_class2_coul_long_soft.cpp b/src/USER-FEP/pair_lj_class2_coul_long_soft.cpp index 275486d1e2..a3e0f732a2 100644 --- a/src/USER-FEP/pair_lj_class2_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_class2_coul_long_soft.cpp @@ -11,11 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2_coul_long_soft.h" +#include #include -#include -#include #include -#include "pair_lj_class2_coul_long_soft.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-FEP/pair_lj_class2_soft.cpp b/src/USER-FEP/pair_lj_class2_soft.cpp index d22cd53883..d98a5db5f3 100644 --- a/src/USER-FEP/pair_lj_class2_soft.cpp +++ b/src/USER-FEP/pair_lj_class2_soft.cpp @@ -11,11 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_lj_class2_soft.h" +#include #include -#include -#include #include -#include "pair_lj_class2_soft.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp index 35c9162dbc..38fcb6fc07 100644 --- a/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_cut_soft.cpp @@ -15,11 +15,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_cut_soft.h" +#include #include -#include -#include #include -#include "pair_lj_cut_coul_cut_soft.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp index 79253d2b9c..740daabf62 100644 --- a/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_coul_long_soft.cpp @@ -16,17 +16,15 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_coul_long_soft.h" +#include #include -#include -#include #include -#include "pair_lj_cut_coul_long_soft.h" #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-FEP/pair_lj_cut_soft.cpp b/src/USER-FEP/pair_lj_cut_soft.cpp index 4192d6546b..5e9a77877e 100644 --- a/src/USER-FEP/pair_lj_cut_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_soft.cpp @@ -16,11 +16,10 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_soft.h" +#include #include -#include -#include #include -#include "pair_lj_cut_soft.h" #include "atom.h" #include "comm.h" #include "force.h" @@ -28,7 +27,6 @@ #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory.h" diff --git a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp index 8ac28f9fa9..d4f6dcb910 100644 --- a/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp +++ b/src/USER-FEP/pair_lj_cut_tip4p_long_soft.cpp @@ -17,23 +17,18 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_tip4p_long_soft.h" +#include #include -#include -#include #include -#include "pair_lj_cut_tip4p_long_soft.h" #include "angle.h" #include "atom.h" #include "bond.h" #include "comm.h" #include "domain.h" #include "force.h" -#include "kspace.h" -#include "update.h" -#include "respa.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" diff --git a/src/USER-FEP/pair_morse_soft.cpp b/src/USER-FEP/pair_morse_soft.cpp index 21f616a082..2803e7df49 100644 --- a/src/USER-FEP/pair_morse_soft.cpp +++ b/src/USER-FEP/pair_morse_soft.cpp @@ -11,11 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_morse_soft.h" +#include #include -#include -#include #include -#include "pair_morse_soft.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-FEP/pair_tip4p_long_soft.cpp b/src/USER-FEP/pair_tip4p_long_soft.cpp index 9b6a6841fe..9cea5b54c5 100644 --- a/src/USER-FEP/pair_tip4p_long_soft.cpp +++ b/src/USER-FEP/pair_tip4p_long_soft.cpp @@ -17,23 +17,18 @@ Soft-core version: Agilio Padua (Univ Blaise Pascal & CNRS) ------------------------------------------------------------------------- */ +#include "pair_tip4p_long_soft.h" +#include #include -#include -#include #include -#include "pair_tip4p_long_soft.h" #include "angle.h" #include "atom.h" #include "bond.h" #include "comm.h" #include "domain.h" #include "force.h" -#include "kspace.h" -#include "update.h" -#include "respa.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MESO/fix_mvv_dpd.cpp b/src/USER-MESO/fix_mvv_dpd.cpp index f663165f78..116bbf506a 100644 --- a/src/USER-MESO/fix_mvv_dpd.cpp +++ b/src/USER-MESO/fix_mvv_dpd.cpp @@ -20,13 +20,11 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ -#include -#include #include "fix_mvv_dpd.h" +#include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-MESO/fix_tdpd_source.cpp b/src/USER-MESO/fix_tdpd_source.cpp index 89e8005b43..990f6a5b78 100644 --- a/src/USER-MESO/fix_tdpd_source.cpp +++ b/src/USER-MESO/fix_tdpd_source.cpp @@ -11,17 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "fix_tdpd_source.h" +#include +#include #include "atom.h" -#include "comm.h" -#include "update.h" -#include "modify.h" -#include "domain.h" -#include "lattice.h" -#include "input.h" -#include "variable.h" #include "error.h" #include "force.h" diff --git a/src/USER-MESO/pair_edpd.cpp b/src/USER-MESO/pair_edpd.cpp index e428b02822..f72b6d6b93 100644 --- a/src/USER-MESO/pair_edpd.cpp +++ b/src/USER-MESO/pair_edpd.cpp @@ -16,14 +16,12 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ +#include "pair_edpd.h" +#include #include -#include -#include #include #include -#include "pair_edpd.h" #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "update.h" #include "force.h" diff --git a/src/USER-MESO/pair_mdpd.cpp b/src/USER-MESO/pair_mdpd.cpp index 4102499d46..56adad26ce 100644 --- a/src/USER-MESO/pair_mdpd.cpp +++ b/src/USER-MESO/pair_mdpd.cpp @@ -16,13 +16,11 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ +#include "pair_mdpd.h" +#include #include -#include -#include #include -#include "pair_mdpd.h" #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "update.h" #include "force.h" diff --git a/src/USER-MESO/pair_mdpd_rhosum.cpp b/src/USER-MESO/pair_mdpd_rhosum.cpp index 2fd238088c..05cb123f61 100644 --- a/src/USER-MESO/pair_mdpd_rhosum.cpp +++ b/src/USER-MESO/pair_mdpd_rhosum.cpp @@ -19,9 +19,8 @@ Contributing author: Zhen Li (Brown University) ------------------------------------------------------------------------- */ -#include -#include #include "pair_mdpd_rhosum.h" +#include #include "atom.h" #include "force.h" #include "comm.h" @@ -30,8 +29,6 @@ #include "memory.h" #include "error.h" #include "neighbor.h" -#include "update.h" -#include "domain.h" using namespace LAMMPS_NS; diff --git a/src/USER-MESO/pair_tdpd.cpp b/src/USER-MESO/pair_tdpd.cpp index 7df9d6d163..346401b1ba 100644 --- a/src/USER-MESO/pair_tdpd.cpp +++ b/src/USER-MESO/pair_tdpd.cpp @@ -16,13 +16,10 @@ Email: zhen_li@brown.edu ------------------------------------------------------------------------- */ +#include "pair_tdpd.h" #include -#include -#include #include -#include "pair_tdpd.h" #include "atom.h" -#include "atom_vec.h" #include "comm.h" #include "update.h" #include "force.h" -- GitLab From 872d43f02f8e9cc274344baba158366106c338c0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 10 Jul 2019 07:29:29 -0400 Subject: [PATCH 153/236] recover compilation of USER-OMP package --- src/USER-OMP/pair_lj_cut_thole_long_omp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp index 85cab4fe7b..d0db6262b1 100644 --- a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp @@ -15,13 +15,14 @@ Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "pair_lj_cut_thole_long_omp.h" #include #include #include #include -#include "pair_lj_cut_thole_long_omp.h" #include "atom.h" #include "comm.h" +#include "fix_drude.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" -- GitLab From c5044d648463ae307bcbd1aa90565077489442df Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 10 Jul 2019 08:49:16 -0400 Subject: [PATCH 154/236] continuing include file handling cleanup --- src/USER-MANIFOLD/fix_manifoldforce.cpp | 5 +- src/USER-MANIFOLD/fix_manifoldforce.h | 2 +- src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp | 10 +- src/USER-MANIFOLD/fix_nve_manifold_rattle.h | 6 +- src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp | 9 +- src/USER-MANIFOLD/manifold_factory.h | 11 +- src/USER-MANIFOLD/manifold_thylakoid.cpp | 2 +- src/USER-MANIFOLD/manifold_thylakoid.h | 4 +- src/USER-MEAMC/meam.h | 2 +- src/USER-MEAMC/meam_dens_final.cpp | 1 - src/USER-MEAMC/meam_dens_init.cpp | 2 + src/USER-MEAMC/meam_force.cpp | 3 +- src/USER-MEAMC/meam_impl.cpp | 1 + src/USER-MEAMC/meam_setup_done.cpp | 6 +- src/USER-MEAMC/pair_meamc.cpp | 6 +- src/USER-MEAMC/pair_meamc.h | 1 - src/USER-MGPT/mgpt_linalg.cpp | 2 - src/USER-MGPT/mgpt_readpot.h | 4 +- src/USER-MGPT/pair_mgpt.cpp | 5 +- src/USER-MGPT/pair_mgpt.h | 381 +++++++++--------- src/USER-MISC/angle_cosine_shift.cpp | 4 +- src/USER-MISC/angle_cosine_shift_exp.cpp | 4 +- src/USER-MISC/angle_dipole.cpp | 4 +- src/USER-MISC/angle_fourier.cpp | 4 +- src/USER-MISC/angle_fourier_simple.cpp | 4 +- src/USER-MISC/angle_quartic.cpp | 4 +- src/USER-MISC/bond_harmonic_shift.cpp | 5 +- src/USER-MISC/bond_harmonic_shift_cut.cpp | 5 +- src/USER-MISC/compute_cnp_atom.cpp | 5 +- src/USER-MISC/compute_entropy_atom.cpp | 5 +- src/USER-MISC/compute_pressure_cylinder.cpp | 6 +- src/USER-MISC/compute_pressure_grem.cpp | 6 +- src/USER-MISC/compute_stress_mop.cpp | 6 +- src/USER-MISC/compute_stress_mop_profile.cpp | 6 +- src/USER-MISC/compute_temp_rotate.cpp | 5 +- src/USER-MISC/dihedral_cosine_shift_exp.cpp | 4 +- src/USER-MISC/dihedral_fourier.cpp | 5 +- src/USER-MISC/dihedral_nharmonic.cpp | 5 +- src/USER-MISC/dihedral_quadratic.cpp | 5 +- src/USER-MISC/dihedral_spherical.cpp | 5 +- src/USER-MISC/dihedral_table.cpp | 9 +- src/USER-MISC/dihedral_table_cut.cpp | 14 +- src/USER-MISC/fix_addtorque.cpp | 5 +- src/USER-MISC/fix_ave_correlate_long.cpp | 3 +- src/USER-MISC/fix_bond_react.cpp | 3 +- src/USER-MISC/fix_electron_stopping.cpp | 4 +- src/USER-MISC/fix_ffl.cpp | 14 +- src/USER-MISC/fix_filter_corotate.cpp | 17 +- src/USER-MISC/fix_flow_gauss.cpp | 5 +- src/USER-MISC/fix_gle.cpp | 11 +- src/USER-MISC/fix_grem.cpp | 7 +- src/USER-MISC/fix_ipi.cpp | 7 +- src/USER-MISC/fix_nvk.cpp | 6 +- src/USER-MISC/fix_pimd.cpp | 3 +- src/USER-MISC/fix_rhok.cpp | 5 +- src/USER-MISC/fix_smd.cpp | 4 +- src/USER-MISC/fix_srp.cpp | 9 +- src/USER-MISC/fix_ti_spring.cpp | 4 +- src/USER-MISC/fix_ttm_mod.cpp | 5 +- src/USER-MISC/fix_wall_ees.cpp | 10 +- src/USER-MISC/fix_wall_region_ees.cpp | 7 +- 61 files changed, 302 insertions(+), 410 deletions(-) diff --git a/src/USER-MANIFOLD/fix_manifoldforce.cpp b/src/USER-MANIFOLD/fix_manifoldforce.cpp index 00293bfec7..74a9a1833f 100644 --- a/src/USER-MANIFOLD/fix_manifoldforce.cpp +++ b/src/USER-MANIFOLD/fix_manifoldforce.cpp @@ -11,9 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include "fix_manifoldforce.h" // For stuff +#include #include -#include #include "atom.h" #include "update.h" #include "respa.h" @@ -21,7 +21,6 @@ #include "force.h" #include "manifold.h" -#include "fix_manifoldforce.h" // For stuff #include "manifold_factory.h" // For constructing manifold diff --git a/src/USER-MANIFOLD/fix_manifoldforce.h b/src/USER-MANIFOLD/fix_manifoldforce.h index 527bee3f86..1d5afc7afc 100644 --- a/src/USER-MANIFOLD/fix_manifoldforce.h +++ b/src/USER-MANIFOLD/fix_manifoldforce.h @@ -43,9 +43,9 @@ FixStyle(manifoldforce,FixManifoldForce) #define LMP_FIX_MANIFOLDFORCE_H #include "fix.h" -#include "manifold.h" namespace LAMMPS_NS { +namespace user_manifold { class manifold; } class FixManifoldForce : public Fix { public: diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp index de134e32ed..7f8d9d5675 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.cpp @@ -32,24 +32,18 @@ ------------------------------------------------------------------------- */ -#include -#include +#include "fix_nve_manifold_rattle.h" +#include #include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" -#include "group.h" -#include #include "input.h" #include "variable.h" #include "citeme.h" -#include "memory.h" #include "comm.h" - -#include "fix_nve_manifold_rattle.h" #include "manifold_factory.h" #include "manifold.h" diff --git a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h index 2bc821ab04..581ecf36d3 100644 --- a/src/USER-MANIFOLD/fix_nve_manifold_rattle.h +++ b/src/USER-MANIFOLD/fix_nve_manifold_rattle.h @@ -42,12 +42,10 @@ FixStyle(nve/manifold/rattle,FixNVEManifoldRattle) #define LMP_FIX_NVE_MANIFOLD_RATTLE_H #include "fix.h" -#include "manifold.h" - namespace LAMMPS_NS { -// namespace user_manifold { +namespace user_manifold { class manifold; } class FixNVEManifoldRattle : public Fix { public: @@ -98,9 +96,7 @@ namespace LAMMPS_NS { user_manifold::manifold *ptr_m; - void print_stats( const char * ); - int was_var( const char * ); virtual void update_var_params(); diff --git a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp index a4eed66336..2789f8738a 100644 --- a/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp +++ b/src/USER-MANIFOLD/fix_nvt_manifold_rattle.cpp @@ -32,25 +32,18 @@ ------------------------------------------------------------------------- */ -#include -#include +#include "fix_nvt_manifold_rattle.h" #include #include #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" #include "group.h" -#include "input.h" -#include "variable.h" #include "citeme.h" -#include "memory.h" -#include "comm.h" #include "modify.h" #include "compute.h" -#include "fix_nvt_manifold_rattle.h" #include "manifold.h" diff --git a/src/USER-MANIFOLD/manifold_factory.h b/src/USER-MANIFOLD/manifold_factory.h index cc3e1245bf..ac2aee8a26 100644 --- a/src/USER-MANIFOLD/manifold_factory.h +++ b/src/USER-MANIFOLD/manifold_factory.h @@ -35,8 +35,7 @@ #ifndef LMP_MANIFOLD_FACTORY_H #define LMP_MANIFOLD_FACTORY_H - -#include "manifold.h" +#include #include /* @@ -79,14 +78,16 @@ static FILE *screen = fopen("/dev/stdout","w"); #define FLERR __FILE__,__LINE__ // Equivalent to definition in pointers.h #endif // USE_PHONY_LAMMPS - - /* Here the actual implementation of LAMMPS-related functions begins. */ namespace LAMMPS_NS { +class LAMMPS; namespace user_manifold { +// forward declaration +class manifold; + // Templated, so needs to be in header. template void make_manifold_if( manifold **man_ptr, const char *name, @@ -103,8 +104,6 @@ namespace user_manifold { int , char ** ); } // namespace user_manifold - } // namespace LAMMPS_NS - #endif // LMP_MANIFOLD_FACTORY_H diff --git a/src/USER-MANIFOLD/manifold_thylakoid.cpp b/src/USER-MANIFOLD/manifold_thylakoid.cpp index 530e0a876d..e4ef039832 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid.cpp +++ b/src/USER-MANIFOLD/manifold_thylakoid.cpp @@ -1,6 +1,6 @@ #include "manifold_thylakoid.h" #include - +#include "manifold_thylakoid_shared.h" #include "comm.h" #include "domain.h" // For some checks regarding the simulation box. #include "error.h" diff --git a/src/USER-MANIFOLD/manifold_thylakoid.h b/src/USER-MANIFOLD/manifold_thylakoid.h index d8ebe2e94f..35ad4dfd9c 100644 --- a/src/USER-MANIFOLD/manifold_thylakoid.h +++ b/src/USER-MANIFOLD/manifold_thylakoid.h @@ -4,12 +4,10 @@ #include "manifold.h" #include -#include "manifold_thylakoid_shared.h" - namespace LAMMPS_NS { namespace user_manifold { - + struct thyla_part; class manifold_thylakoid : public manifold { public: diff --git a/src/USER-MEAMC/meam.h b/src/USER-MEAMC/meam.h index 74b1eb0e54..da55805790 100644 --- a/src/USER-MEAMC/meam.h +++ b/src/USER-MEAMC/meam.h @@ -1,12 +1,12 @@ #ifndef LMP_MEAM_H #define LMP_MEAM_H -#include "memory.h" #include #define maxelt 5 namespace LAMMPS_NS { +class Memory; typedef enum { FCC, BCC, HCP, DIM, DIA, B1, C11, L12, B2 } lattice_t; diff --git a/src/USER-MEAMC/meam_dens_final.cpp b/src/USER-MEAMC/meam_dens_final.cpp index c55b1b45c4..867106df88 100644 --- a/src/USER-MEAMC/meam_dens_final.cpp +++ b/src/USER-MEAMC/meam_dens_final.cpp @@ -1,5 +1,4 @@ #include "meam.h" -#include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_dens_init.cpp b/src/USER-MEAMC/meam_dens_init.cpp index 3bb9328142..155941422c 100644 --- a/src/USER-MEAMC/meam_dens_init.cpp +++ b/src/USER-MEAMC/meam_dens_init.cpp @@ -1,4 +1,6 @@ #include "meam.h" +#include +#include "memory.h" #include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_force.cpp b/src/USER-MEAMC/meam_force.cpp index 06fbb57adb..09aad90111 100644 --- a/src/USER-MEAMC/meam_force.cpp +++ b/src/USER-MEAMC/meam_force.cpp @@ -1,6 +1,7 @@ #include "meam.h" -#include "math_special.h" +#include #include +#include "math_special.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_impl.cpp b/src/USER-MEAMC/meam_impl.cpp index b099ead8d5..3b40a2b612 100644 --- a/src/USER-MEAMC/meam_impl.cpp +++ b/src/USER-MEAMC/meam_impl.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "meam.h" +#include #include "memory.h" using namespace LAMMPS_NS; diff --git a/src/USER-MEAMC/meam_setup_done.cpp b/src/USER-MEAMC/meam_setup_done.cpp index 2a762d1204..7000eac6ae 100644 --- a/src/USER-MEAMC/meam_setup_done.cpp +++ b/src/USER-MEAMC/meam_setup_done.cpp @@ -1,6 +1,10 @@ #include "meam.h" -#include "math_special.h" +#include +#include #include +#include "math_special.h" +#include "memory.h" + using namespace LAMMPS_NS; void diff --git a/src/USER-MEAMC/pair_meamc.cpp b/src/USER-MEAMC/pair_meamc.cpp index 7c96fadb44..a9034a1af3 100644 --- a/src/USER-MEAMC/pair_meamc.cpp +++ b/src/USER-MEAMC/pair_meamc.cpp @@ -15,16 +15,14 @@ Contributing author: Greg Wagner (SNL) ------------------------------------------------------------------------- */ -#include -#include +#include "pair_meamc.h" +#include #include #include #include "meam.h" -#include "pair_meamc.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "memory.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/USER-MEAMC/pair_meamc.h b/src/USER-MEAMC/pair_meamc.h index a006e70bdb..31dd8ba022 100644 --- a/src/USER-MEAMC/pair_meamc.h +++ b/src/USER-MEAMC/pair_meamc.h @@ -24,7 +24,6 @@ PairStyle(meam,PairMEAMC) #include "pair.h" namespace LAMMPS_NS { -class MEAM; class PairMEAMC : public Pair { public: diff --git a/src/USER-MGPT/mgpt_linalg.cpp b/src/USER-MGPT/mgpt_linalg.cpp index 68701037f4..bc15873739 100644 --- a/src/USER-MGPT/mgpt_linalg.cpp +++ b/src/USER-MGPT/mgpt_linalg.cpp @@ -20,8 +20,6 @@ #include #include -#include -#include #define restrict __restrict__ diff --git a/src/USER-MGPT/mgpt_readpot.h b/src/USER-MGPT/mgpt_readpot.h index 62f66883b6..8f46592e8a 100644 --- a/src/USER-MGPT/mgpt_readpot.h +++ b/src/USER-MGPT/mgpt_readpot.h @@ -19,7 +19,9 @@ #ifndef READPOT__ #define READPOT__ - +#include +#include +#include #include "mgpt_splinetab.h" struct potdata { diff --git a/src/USER-MGPT/pair_mgpt.cpp b/src/USER-MGPT/pair_mgpt.cpp index 91c624eec5..0634872c70 100644 --- a/src/USER-MGPT/pair_mgpt.cpp +++ b/src/USER-MGPT/pair_mgpt.cpp @@ -21,17 +21,16 @@ (2011). See LLNL copyright notice at bottom of this file. ------------------------------------------------------------------------- */ +#include "pair_mgpt.h" +#include #include -#include #include #include #include -#include "pair_mgpt.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "memory.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/USER-MGPT/pair_mgpt.h b/src/USER-MGPT/pair_mgpt.h index 70b36364b1..3e861a0198 100644 --- a/src/USER-MGPT/pair_mgpt.h +++ b/src/USER-MGPT/pair_mgpt.h @@ -32,6 +32,7 @@ PairStyle(mgpt,PairMGPT) #include #include +#include #include #include "pair.h" @@ -77,29 +78,29 @@ public: Link(const K &k,Link *n) : next(n),key(k),hits(1) {} static void *operator new(std::size_t sz) { - const size_t align = 32; - size_t x = (size_t) (void *) ::operator new(sz+align); - size_t y = (x + align) - ((x+align)&(align-1)); - assert(sizeof(void *) <= align); - assert((x & (sizeof(void *)-1)) == 0); - ((void **) y)[-1] = (void *) x; - return (void *) y; + const size_t align = 32; + size_t x = (size_t) (void *) ::operator new(sz+align); + size_t y = (x + align) - ((x+align)&(align-1)); + assert(sizeof(void *) <= align); + assert((x & (sizeof(void *)-1)) == 0); + ((void **) y)[-1] = (void *) x; + return (void *) y; } static void operator delete(void *ptr) { - ::operator delete(((void **) ptr)[-1]); + ::operator delete(((void **) ptr)[-1]); } }; int isprime(int x) { if(x%2 == 0) - return 0; + return 0; else { - int k = 3; - while(k*k <= x) { - if(x%k == 0) return 0; - k = k+2; - } - return 1; + int k = 3; + while(k*k <= x) { + if(x%k == 0) return 0; + k = k+2; + } + return 1; } } @@ -117,25 +118,25 @@ public: Iterator(Hash &HH) : H(HH),idx(-1),p(0) { next(); } Iterator(Hash &HH,int iidx,Link *pp) : H(HH),idx(iidx),p(pp) {} void next() { - if(idx >= H.Size()) return; - if(p != 0) p = p->next; - if(p == 0) { - do { - idx = idx+1; - if(idx >= H.Size()) return; - p = H.table[idx]; - } while(p == 0); - } + if(idx >= H.Size()) return; + if(p != 0) p = p->next; + if(p == 0) { + do { + idx = idx+1; + if(idx >= H.Size()) return; + p = H.table[idx]; + } while(p == 0); + } } K *key() { return &p->key; } T *data() { return &p->data; } Link *link() { return p; } int operator==(const Iterator &a) { - return idx==a.idx && p==a.p; + return idx==a.idx && p==a.p; } int operator!=(const Iterator &a) { - return !(*this == a); + return !(*this == a); } }; @@ -147,7 +148,7 @@ public: table = new Link *[size]; for(int i = 0; inext; - delete p; - p = q; - } + Link *p = table[i]; + while(p != 0) { + Link *q = p->next; + delete p; + p = q; + } } delete[] table; } @@ -179,24 +180,24 @@ public: int idx = key.hash() % size; if(idx < 0) idx = idx + size; if(idx >= size || idx < 0) { - printf("(1) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); - exit(1); + printf("(1) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); + exit(1); } used = used + 1; if(1) { - table[idx] = new Link(key,table[idx]); - return &table[idx]->data; + table[idx] = new Link(key,table[idx]); + return &table[idx]->data; } else { /* This is for threading... and incomplete */ - typedef Link *LinkPtr; - LinkPtr ptr = table[idx],last = 0,dataptr = new Link(key,0); - - while(ptr != 0) { - last = ptr; - ptr = ptr->next; - } - *((volatile LinkPtr *) &(last->next)) = dataptr; - return &(dataptr->data); + typedef Link *LinkPtr; + LinkPtr ptr = table[idx],last = 0,dataptr = new Link(key,0); + + while(ptr != 0) { + last = ptr; + ptr = ptr->next; + } + *((volatile LinkPtr *) &(last->next)) = dataptr; + return &(dataptr->data); } } void Remove(const K &key) { @@ -205,28 +206,28 @@ public: int count = 1; if(idx < 0) idx = idx + size; if(idx >= size || idx < 0) { - printf("(2) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); - exit(1); + printf("(2) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); + exit(1); } p = table[idx]; while(p != 0 && !(p->key == key)) { - last = p; - p = p->next; - count = count + 1; + last = p; + p = p->next; + count = count + 1; } if(p != 0) { - used = used - 1; - if(last == 0) - table[idx] = p->next; - else - last->next = p->next; - delete p; + used = used - 1; + if(last == 0) + table[idx] = p->next; + else + last->next = p->next; + delete p; } if(count > maxlength) - maxlength = count; + maxlength = count; nsearch = nsearch + 1; nstep = nstep + count; } @@ -236,19 +237,19 @@ public: int count = 1; if(idx < 0) idx = idx + size; if(idx >= size || idx < 0) { - printf("(3) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); - exit(1); + printf("(3) Damn... key = %d, idx = %d, size = %d\n",key.hash(),idx,size); + exit(1); } p = table[idx]; while(p != 0 && !(p->key == key)) { - p = p->next; - count = count + 1; + p = p->next; + count = count + 1; } if(count > maxlength) - maxlength = count; + maxlength = count; nsearch = nsearch + 1; nstep = nstep + count; @@ -283,46 +284,46 @@ public: } void zero() { for(int i = 0; i<8; i++) - for(int j = 0; j<8; j++) - m[i][j] = 0.0; + for(int j = 0; j<8; j++) + m[i][j] = 0.0; } void operator=(const Matrix &A) { for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - m[i][j] = A.m[i][j]; + for(int j = 1; j<=sz; j++) + m[i][j] = A.m[i][j]; } void operator=(double x) { for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - m[i][j] = x; + for(int j = 1; j<=sz; j++) + m[i][j] = x; } Matrix operator+(const Matrix &B) const { Matrix s; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - s.m[i][j] = m[i][j] + B.m[i][j]; + for(int j = 1; j<=sz; j++) + s.m[i][j] = m[i][j] + B.m[i][j]; return s; } Matrix operator-(const Matrix &B) const { Matrix s; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - s.m[i][j] = m[i][j] - B.m[i][j]; + for(int j = 1; j<=sz; j++) + s.m[i][j] = m[i][j] - B.m[i][j]; return s; } Matrix operator-() const { Matrix s; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - s.m[i][j] = -m[i][j]; + for(int j = 1; j<=sz; j++) + s.m[i][j] = -m[i][j]; return s; } Matrix operator*(double x) const { Matrix P; for(int i = 1; i<=sz; i++) - for(int j = 0; j<=sz; j++) - P.m[i][j] = m[i][j] * x; + for(int j = 0; j<=sz; j++) + P.m[i][j] = m[i][j] * x; return P; } Matrix operator/(double x) const { @@ -331,8 +332,8 @@ public: Matrix transpose() const { Matrix T; for(int i = 1; i<=sz; i++) - for(int j = 1; j<=sz; j++) - T.m[j][i] = m[i][j]; + for(int j = 1; j<=sz; j++) + T.m[j][i] = m[i][j]; return T; } }; @@ -374,13 +375,13 @@ public: int align_check() { return - (H1H2.align_check() << 0) | - (H1xH2.align_check() << 1) | - (H1yH2.align_check() << 2) | - (H1zH2.align_check() << 3) | - (H1H2x.align_check() << 4) | - (H1H2y.align_check() << 5) | - (H1H2z.align_check() << 6) ; + (H1H2.align_check() << 0) | + (H1xH2.align_check() << 1) | + (H1yH2.align_check() << 2) | + (H1zH2.align_check() << 3) | + (H1H2x.align_check() << 4) | + (H1H2y.align_check() << 5) | + (H1H2z.align_check() << 6) ; } void zero() { @@ -396,18 +397,18 @@ public: void make_bond(const double xx[][3],int i,int j,bond_data *bptr); void make_triplet(bond_data *ij_bond,bond_data *ik_bond,triplet_data *triptr); triplet_data *get_triplet(const double xx[][3],int i,int j,int k, - Hash *bhash,triplet_data *twork, - double *dvir_ij_p,double *dvir_ik_p); + Hash *bhash,triplet_data *twork, + double *dvir_ij_p,double *dvir_ik_p); int c1_outside(const double a[3], - int triclinic,const double alpha[3]) { + int triclinic,const double alpha[3]) { const double stol = 1e-5; if(triclinic) { for(int p = 0; p<3; p++) { - double cog = a[p]; - if(cog < domain->sublo_lamda[p]-0.5*rmax*alpha[p]-stol) return 1; - if(cog > domain->subhi_lamda[p]+0.5*rmax*alpha[p]+stol) return 1; + double cog = a[p]; + if(cog < domain->sublo_lamda[p]-0.5*rmax*alpha[p]-stol) return 1; + if(cog > domain->subhi_lamda[p]+0.5*rmax*alpha[p]+stol) return 1; } } else { @@ -415,63 +416,63 @@ public: for(int p = 0; p<3; p++) { - double cog = a[p]; - if(cog < domain->sublo[p]-0.5*rmax-stol) return 1; - if(cog > domain->subhi[p]+0.5*rmax+stol) return 1; - - if(cog < domain->sublo[p]-stol) { - double t = cog - (domain->sublo[p]-stol); - rout = rout + t*t; - } else if(cog > domain->subhi[p]+stol) { - double t = cog - (domain->subhi[p]+stol); - rout = rout + t*t; - } + double cog = a[p]; + if(cog < domain->sublo[p]-0.5*rmax-stol) return 1; + if(cog > domain->subhi[p]+0.5*rmax+stol) return 1; + + if(cog < domain->sublo[p]-stol) { + double t = cog - (domain->sublo[p]-stol); + rout = rout + t*t; + } else if(cog > domain->subhi[p]+stol) { + double t = cog - (domain->subhi[p]+stol); + rout = rout + t*t; + } } if(rout > 0.25*rmax*rmax) - return 1; + return 1; } return 0; } int c2_outside(const double a[3],const double b[3], - int triclinic,const double alpha[3]) { + int triclinic,const double alpha[3]) { const double stol = 1e-5; if(triclinic) { for(int p = 0; p<3; p++) { - double cog = 0.5*(a[p] + b[p]); - if(cog < domain->sublo_lamda[p]-0.5*rcrit*alpha[p]-stol) return 1; - if(cog > domain->subhi_lamda[p]+0.5*rcrit*alpha[p]+stol) return 1; + double cog = 0.5*(a[p] + b[p]); + if(cog < domain->sublo_lamda[p]-0.5*rcrit*alpha[p]-stol) return 1; + if(cog > domain->subhi_lamda[p]+0.5*rcrit*alpha[p]+stol) return 1; } } else { double rout = 0.0; for(int p = 0; p<3; p++) { - double cog = 0.5*(a[p] + b[p]); - if(cog < domain->sublo[p]-0.5*rcrit-stol) return 1; - if(cog > domain->subhi[p]+0.5*rcrit+stol) return 1; - - if(cog < domain->sublo[p]-stol) { - double t = cog - (domain->sublo[p]-stol); - rout = rout + t*t; - } else if(cog > domain->subhi[p]+stol) { - double t = cog - (domain->subhi[p]+stol); - rout = rout + t*t; - } + double cog = 0.5*(a[p] + b[p]); + if(cog < domain->sublo[p]-0.5*rcrit-stol) return 1; + if(cog > domain->subhi[p]+0.5*rcrit+stol) return 1; + + if(cog < domain->sublo[p]-stol) { + double t = cog - (domain->sublo[p]-stol); + rout = rout + t*t; + } else if(cog > domain->subhi[p]+stol) { + double t = cog - (domain->subhi[p]+stol); + rout = rout + t*t; + } } if(rout > 0.25*rcrit*rcrit) - return 1; + return 1; } return 0; } double get_weight(const int triclinic, - const double a[3] = 0,const double b[3] = 0, - const double c[3] = 0,const double d[3] = 0) { + const double a[3] = 0,const double b[3] = 0, + const double c[3] = 0,const double d[3] = 0) { const double *s0 = triclinic ? domain->sublo_lamda : domain->sublo, *s1 = triclinic ? domain->subhi_lamda : domain->subhi; @@ -498,46 +499,46 @@ public: } void force_debug_3t(double xx[][3], - int i0,int j0,int k0, - int i ,int j ,int k , - double dfix,double dfiy,double dfiz, - double dfjx,double dfjy,double dfjz, - double dfkx,double dfky,double dfkz); + int i0,int j0,int k0, + int i ,int j ,int k , + double dfix,double dfiy,double dfiz, + double dfjx,double dfjy,double dfjz, + double dfkx,double dfky,double dfkz); void force_debug_3v(double xx[][3], - int i0,int j0,int k0, - int i ,int j ,int k , - double dfix,double dfiy,double dfiz, - double dfjx,double dfjy,double dfjz, - double dfkx,double dfky,double dfkz); + int i0,int j0,int k0, + int i ,int j ,int k , + double dfix,double dfiy,double dfiz, + double dfjx,double dfjy,double dfjz, + double dfkx,double dfky,double dfkz); void force_debug_4(double xx[][3], - int i0,int j0,int k0,int m0, - int i ,int j ,int k ,int m , - double dfix,double dfiy,double dfiz, - double dfjx,double dfjy,double dfjz, - double dfkx,double dfky,double dfkz, - double dfmx,double dfmy,double dfmz); + int i0,int j0,int k0,int m0, + int i ,int j ,int k ,int m , + double dfix,double dfiy,double dfiz, + double dfjx,double dfjy,double dfjz, + double dfkx,double dfky,double dfkz, + double dfmx,double dfmy,double dfmz); double numderiv3t(double xx[][3],int i,int j,int k,int p); double numderiv3v(double xx[][3],int i,int j,int k,int p,int ipert); double numderiv4(double xx[][3],int i,int j,int k,int m,int p); void compute_x(const int *nnei,const int * const *nlist, - double *e_s,double *e_p,double *e_t,double *e_q, - int evflag,int newton_pair); + double *e_s,double *e_p,double *e_t,double *e_q, + int evflag,int newton_pair); /* Reimplementation of bond matrix computation */ void fl_deriv_new(double r,double ri,double xhat,double yhat,double zhat, - double &fl_0,double &fl_x,double &fl_y,double &fl_z, - double &fl_rp,double &fl_p1,double &fl_r0,double &fl_al); + double &fl_0,double &fl_x,double &fl_y,double &fl_z, + double &fl_rp,double &fl_p1,double &fl_r0,double &fl_al); void hamltn_5_raw(const double xin,const double yin,const double zin, - double M [8][8],double Mx[8][8], - double My[8][8],double Mz[8][8], - double *fl_deriv_sum_p); + double M [8][8],double Mx[8][8], + double My[8][8],double Mz[8][8], + double *fl_deriv_sum_p); void hamltn_7_raw(const double xin,const double yin,const double zin, - double M [8][8],double Mx[8][8], - double My[8][8],double Mz[8][8], - double *fl_deriv_sum_p); + double M [8][8],double Mx[8][8], + double My[8][8],double Mz[8][8], + double *fl_deriv_sum_p); /* * */ // Old matrix routines, only used in force debug routines. @@ -546,9 +547,9 @@ public: Matrix h; for(int l = 1; l <= lmax; l++) { for(int n = 1; n <= lmax; n++) { - h.m[l][n] = 0.0; - for(int m = 1; m <= lmax; m++) - h.m[l][n] += ha.m[l][m] * hb.m[m][n]; + h.m[l][n] = 0.0; + for(int m = 1; m <= lmax; m++) + h.m[l][n] += ha.m[l][m] * hb.m[m][n]; } } return h; @@ -560,7 +561,7 @@ public: for(int n = 1; n <= lmax; n++) { double cquan = 0.0; for(int m = 1; m <= lmax; m++) - cquan += ha.m[n][m] * hb.m[m][n]; + cquan += ha.m[n][m] * hb.m[m][n]; zquan += cquan; } return zquan; @@ -572,32 +573,32 @@ public: int i,j,k; if(lmax == 5) { - const int n = 5; - for(i = 1; i<=n; i++) - for(j = 1; j<=n; j++) { - double s = 0.0; - for(k = 1; k<=n; k++) - s = s + a.m[i][k]*b.m[j][k]; - c.m[i][j] = s; - } + const int n = 5; + for(i = 1; i<=n; i++) + for(j = 1; j<=n; j++) { + double s = 0.0; + for(k = 1; k<=n; k++) + s = s + a.m[i][k]*b.m[j][k]; + c.m[i][j] = s; + } } else if(lmax == 7) { - const int n = 7; - for(i = 1; i<=n; i++) - for(j = 1; j<=n; j++) { - double s = 0.0; - for(k = 1; k<=n; k++) - s = s + a.m[i][k]*b.m[j][k]; - c.m[i][j] = s; - } + const int n = 7; + for(i = 1; i<=n; i++) + for(j = 1; j<=n; j++) { + double s = 0.0; + for(k = 1; k<=n; k++) + s = s + a.m[i][k]*b.m[j][k]; + c.m[i][j] = s; + } } else { - const int n = lmax; - for(i = 1; i<=n; i++) - for(j = 1; j<=n; j++) { - double s = 0.0; - for(k = 1; k<=n; k++) - s = s + a.m[i][k]*b.m[j][k]; - c.m[i][j] = s; - } + const int n = lmax; + for(i = 1; i<=n; i++) + for(j = 1; j<=n; j++) { + double s = 0.0; + for(k = 1; k<=n; k++) + s = s + a.m[i][k]*b.m[j][k]; + c.m[i][j] = s; + } } } @@ -608,7 +609,7 @@ public: for(i = 0; i -#include #include "angle_cosine_shift.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_cosine_shift_exp.cpp b/src/USER-MISC/angle_cosine_shift_exp.cpp index 8c6282de20..79cb0fea7c 100644 --- a/src/USER-MISC/angle_cosine_shift_exp.cpp +++ b/src/USER-MISC/angle_cosine_shift_exp.cpp @@ -15,9 +15,9 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include #include "angle_cosine_shift_exp.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_dipole.cpp b/src/USER-MISC/angle_dipole.cpp index 781da46869..0956ba3b8f 100644 --- a/src/USER-MISC/angle_dipole.cpp +++ b/src/USER-MISC/angle_dipole.cpp @@ -15,9 +15,9 @@ Contributing authors: Mario Orsi & Wei Ding (QMUL), m.orsi@qmul.ac.uk ------------------------------------------------------------------------- */ -#include -#include #include "angle_dipole.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_fourier.cpp b/src/USER-MISC/angle_fourier.cpp index 8f5074ff5d..dcf5080431 100644 --- a/src/USER-MISC/angle_fourier.cpp +++ b/src/USER-MISC/angle_fourier.cpp @@ -16,9 +16,9 @@ [ based on angle_cosine_squared.cpp Naveen Michaud-Agrawal (Johns Hopkins U)] ------------------------------------------------------------------------- */ -#include -#include #include "angle_fourier.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_fourier_simple.cpp b/src/USER-MISC/angle_fourier_simple.cpp index 615556bbe7..bbe3f8520b 100644 --- a/src/USER-MISC/angle_fourier_simple.cpp +++ b/src/USER-MISC/angle_fourier_simple.cpp @@ -16,9 +16,9 @@ [ based on angle_cosine_squared.cpp Naveen Michaud-Agrawal (Johns Hopkins U)] ------------------------------------------------------------------------- */ -#include -#include #include "angle_fourier_simple.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/angle_quartic.cpp b/src/USER-MISC/angle_quartic.cpp index 21a96100aa..5c5f3411e4 100644 --- a/src/USER-MISC/angle_quartic.cpp +++ b/src/USER-MISC/angle_quartic.cpp @@ -16,9 +16,9 @@ [ based on angle_harmonic.cpp] ------------------------------------------------------------------------- */ -#include -#include #include "angle_quartic.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MISC/bond_harmonic_shift.cpp b/src/USER-MISC/bond_harmonic_shift.cpp index c7e4444cce..fdd3111783 100644 --- a/src/USER-MISC/bond_harmonic_shift.cpp +++ b/src/USER-MISC/bond_harmonic_shift.cpp @@ -15,12 +15,11 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include #include "bond_harmonic_shift.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/USER-MISC/bond_harmonic_shift_cut.cpp b/src/USER-MISC/bond_harmonic_shift_cut.cpp index 5b396f5d72..0688cb428a 100644 --- a/src/USER-MISC/bond_harmonic_shift_cut.cpp +++ b/src/USER-MISC/bond_harmonic_shift_cut.cpp @@ -15,12 +15,11 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ -#include -#include #include "bond_harmonic_shift_cut.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "memory.h" diff --git a/src/USER-MISC/compute_cnp_atom.cpp b/src/USER-MISC/compute_cnp_atom.cpp index 6fa16f1a9a..ba97be25d4 100644 --- a/src/USER-MISC/compute_cnp_atom.cpp +++ b/src/USER-MISC/compute_cnp_atom.cpp @@ -21,11 +21,10 @@ branicio@usc.edu ------------------------------------------------------------------------- */ +#include "compute_cnp_atom.h" +#include #include -#include #include - -#include "compute_cnp_atom.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-MISC/compute_entropy_atom.cpp b/src/USER-MISC/compute_entropy_atom.cpp index 0367d7fe6d..00f7e6dc8b 100644 --- a/src/USER-MISC/compute_entropy_atom.cpp +++ b/src/USER-MISC/compute_entropy_atom.cpp @@ -15,10 +15,9 @@ Contributing author: Pablo Piaggi (EPFL Lausanne) ------------------------------------------------------------------------- */ +#include "compute_entropy_atom.h" #include #include -#include -#include "compute_entropy_atom.h" #include "atom.h" #include "update.h" #include "modify.h" @@ -28,13 +27,11 @@ #include "force.h" #include "pair.h" #include "comm.h" -#include "math_extra.h" #include "math_const.h" #include "memory.h" #include "error.h" #include "domain.h" - using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-MISC/compute_pressure_cylinder.cpp b/src/USER-MISC/compute_pressure_cylinder.cpp index c250eaf677..6d2509d685 100644 --- a/src/USER-MISC/compute_pressure_cylinder.cpp +++ b/src/USER-MISC/compute_pressure_cylinder.cpp @@ -11,10 +11,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_pressure_cylinder.h" +#include +#include #include "atom.h" #include "update.h" #include "force.h" @@ -22,7 +21,6 @@ #include "neighbor.h" #include "neigh_request.h" #include "neigh_list.h" -#include "group.h" #include "memory.h" #include "error.h" #include "citeme.h" diff --git a/src/USER-MISC/compute_pressure_grem.cpp b/src/USER-MISC/compute_pressure_grem.cpp index 087c01bd8e..ba949727b0 100644 --- a/src/USER-MISC/compute_pressure_grem.cpp +++ b/src/USER-MISC/compute_pressure_grem.cpp @@ -11,17 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_pressure_grem.h" -#include "atom.h" +#include #include "update.h" #include "domain.h" #include "modify.h" #include "fix.h" #include "force.h" -#include "pair.h" #include "kspace.h" #include "error.h" diff --git a/src/USER-MISC/compute_stress_mop.cpp b/src/USER-MISC/compute_stress_mop.cpp index cb2a0b9713..2f932321e1 100644 --- a/src/USER-MISC/compute_stress_mop.cpp +++ b/src/USER-MISC/compute_stress_mop.cpp @@ -15,18 +15,14 @@ Contributing Authors : Romain Vermorel (LFCR), Laurent Joly (ULyon) --------------------------------------------------------------------------*/ +#include "compute_stress_mop.h" #include #include #include -#include -#include "compute_stress_mop.h" #include "atom.h" #include "update.h" #include "domain.h" -#include "group.h" -#include "modify.h" -#include "fix.h" #include "neighbor.h" #include "force.h" #include "pair.h" diff --git a/src/USER-MISC/compute_stress_mop_profile.cpp b/src/USER-MISC/compute_stress_mop_profile.cpp index 5499a37a46..5f6d0a36b2 100644 --- a/src/USER-MISC/compute_stress_mop_profile.cpp +++ b/src/USER-MISC/compute_stress_mop_profile.cpp @@ -15,18 +15,14 @@ Contributing Authors : Romain Vermorel (LFCR), Laurent Joly (ULyon) --------------------------------------------------------------------------*/ +#include "compute_stress_mop_profile.h" #include #include #include -#include -#include "compute_stress_mop_profile.h" #include "atom.h" #include "update.h" #include "domain.h" -#include "group.h" -#include "modify.h" -#include "fix.h" #include "neighbor.h" #include "force.h" #include "pair.h" diff --git a/src/USER-MISC/compute_temp_rotate.cpp b/src/USER-MISC/compute_temp_rotate.cpp index 36093bd1e1..94c6115186 100644 --- a/src/USER-MISC/compute_temp_rotate.cpp +++ b/src/USER-MISC/compute_temp_rotate.cpp @@ -15,16 +15,13 @@ Contributing author: Laurent Joly (U Lyon, France), ljoly.ulyon@gmail.com ------------------------------------------------------------------------- */ -#include -#include -#include #include "compute_temp_rotate.h" +#include #include "atom.h" #include "update.h" #include "force.h" #include "group.h" #include "domain.h" -#include "lattice.h" #include "error.h" #include "memory.h" diff --git a/src/USER-MISC/dihedral_cosine_shift_exp.cpp b/src/USER-MISC/dihedral_cosine_shift_exp.cpp index c411ea8150..820dfabdeb 100644 --- a/src/USER-MISC/dihedral_cosine_shift_exp.cpp +++ b/src/USER-MISC/dihedral_cosine_shift_exp.cpp @@ -15,14 +15,12 @@ Contributing author: Carsten Svaneborg, science@zqex.dk ------------------------------------------------------------------------- */ +#include "dihedral_cosine_shift_exp.h" #include #include -#include -#include "dihedral_cosine_shift_exp.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "memory.h" diff --git a/src/USER-MISC/dihedral_fourier.cpp b/src/USER-MISC/dihedral_fourier.cpp index af86259c01..7cc250b1a8 100644 --- a/src/USER-MISC/dihedral_fourier.cpp +++ b/src/USER-MISC/dihedral_fourier.cpp @@ -16,16 +16,13 @@ [ based on dihedral_charmm.cpp Paul Crozier (SNL) ] ------------------------------------------------------------------------- */ +#include "dihedral_fourier.h" #include #include -#include -#include "dihedral_fourier.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" -#include "pair.h" #include "update.h" #include "math_const.h" #include "memory.h" diff --git a/src/USER-MISC/dihedral_nharmonic.cpp b/src/USER-MISC/dihedral_nharmonic.cpp index ea2b76f415..f1e0018689 100644 --- a/src/USER-MISC/dihedral_nharmonic.cpp +++ b/src/USER-MISC/dihedral_nharmonic.cpp @@ -16,12 +16,11 @@ [ based on dihedral_multi_harmonic.cpp Mathias Puetz (SNL) and friends ] ------------------------------------------------------------------------- */ -#include -#include #include "dihedral_nharmonic.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "update.h" diff --git a/src/USER-MISC/dihedral_quadratic.cpp b/src/USER-MISC/dihedral_quadratic.cpp index 8436e73c5c..02effc2f4f 100644 --- a/src/USER-MISC/dihedral_quadratic.cpp +++ b/src/USER-MISC/dihedral_quadratic.cpp @@ -16,12 +16,11 @@ [ based on dihedral_helix.cpp Paul Crozier (SNL) ] ------------------------------------------------------------------------- */ -#include -#include #include "dihedral_quadratic.h" +#include +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "update.h" diff --git a/src/USER-MISC/dihedral_spherical.cpp b/src/USER-MISC/dihedral_spherical.cpp index 3b30121551..78d45f923d 100644 --- a/src/USER-MISC/dihedral_spherical.cpp +++ b/src/USER-MISC/dihedral_spherical.cpp @@ -17,22 +17,19 @@ and Paul Crozier (SNL) ] ------------------------------------------------------------------------- */ +#include "dihedral_spherical.h" #include #include -#include #include #include "atom.h" #include "comm.h" #include "neighbor.h" #include "domain.h" #include "force.h" -#include "pair.h" -#include "update.h" #include "math_const.h" #include "math_extra.h" #include "memory.h" #include "error.h" -#include "dihedral_spherical.h" using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-MISC/dihedral_table.cpp b/src/USER-MISC/dihedral_table.cpp index a97ae3649f..7fa871d3be 100644 --- a/src/USER-MISC/dihedral_table.cpp +++ b/src/USER-MISC/dihedral_table.cpp @@ -17,21 +17,20 @@ the "tridiag.c" written by Gerard Jungman for GSL ------------------------------------------------------------------------- */ +#include +#include #include #include #include -#include #include -#include -#include -#include +#include // IWYU pragma: keep +#include // IWYU pragma: keep #include "atom.h" #include "comm.h" #include "neighbor.h" #include "domain.h" #include "force.h" -#include "update.h" #include "memory.h" #include "error.h" #include "dihedral_table.h" diff --git a/src/USER-MISC/dihedral_table_cut.cpp b/src/USER-MISC/dihedral_table_cut.cpp index 18a645cd75..71f9ea0df1 100644 --- a/src/USER-MISC/dihedral_table_cut.cpp +++ b/src/USER-MISC/dihedral_table_cut.cpp @@ -16,25 +16,23 @@ Based on tabulated dihedral (dihedral_table.cpp) by Andrew Jewett ------------------------------------------------------------------------- */ +#include "dihedral_table_cut.h" +#include +#include #include #include #include -#include #include -#include -#include -#include +#include // IWYU pragma: keep +#include // IWYU pragma: keep -#include "dihedral_table_cut.h" #include "atom.h" #include "neighbor.h" #include "update.h" -#include "domain.h" #include "comm.h" #include "force.h" #include "citeme.h" #include "math_const.h" -#include "math_extra.h" #include "memory.h" #include "error.h" #include "utils.h" @@ -42,8 +40,6 @@ using namespace LAMMPS_NS; using namespace MathConst; using namespace std; -using namespace MathExtra; - static const char cite_dihedral_tablecut[] = "dihedral_style table/cut command:\n\n" diff --git a/src/USER-MISC/fix_addtorque.cpp b/src/USER-MISC/fix_addtorque.cpp index 2cd1ac7527..665f1d4a60 100644 --- a/src/USER-MISC/fix_addtorque.cpp +++ b/src/USER-MISC/fix_addtorque.cpp @@ -15,9 +15,9 @@ Contributing author: Laurent Joly (U Lyon, France), ljoly.ulyon@gmail.com ------------------------------------------------------------------------- */ -#include -#include #include "fix_addtorque.h" +#include +#include #include "atom.h" #include "update.h" #include "modify.h" @@ -25,7 +25,6 @@ #include "respa.h" #include "input.h" #include "variable.h" -#include "memory.h" #include "error.h" #include "group.h" #include "force.h" diff --git a/src/USER-MISC/fix_ave_correlate_long.cpp b/src/USER-MISC/fix_ave_correlate_long.cpp index dc52d94b14..b1bcc07fa7 100644 --- a/src/USER-MISC/fix_ave_correlate_long.cpp +++ b/src/USER-MISC/fix_ave_correlate_long.cpp @@ -21,11 +21,12 @@ see J. Chem. Phys. 133, 154103 (2010) ------------------------------------------------------------------------- */ +#include "fix_ave_correlate_long.h" +#include #include #include #include #include -#include "fix_ave_correlate_long.h" #include "update.h" #include "modify.h" #include "compute.h" diff --git a/src/USER-MISC/fix_bond_react.cpp b/src/USER-MISC/fix_bond_react.cpp index c641912db6..ef23f98d64 100644 --- a/src/USER-MISC/fix_bond_react.cpp +++ b/src/USER-MISC/fix_bond_react.cpp @@ -15,11 +15,10 @@ See the README file in the top-level LAMMPS directory. Contributing Author: Jacob Gissinger (jacob.gissinger@colorado.edu) ------------------------------------------------------------------------- */ +#include "fix_bond_react.h" #include #include #include -#include -#include "fix_bond_react.h" #include "update.h" #include "modify.h" #include "respa.h" diff --git a/src/USER-MISC/fix_electron_stopping.cpp b/src/USER-MISC/fix_electron_stopping.cpp index 0831ebcf89..2130f07420 100644 --- a/src/USER-MISC/fix_electron_stopping.cpp +++ b/src/USER-MISC/fix_electron_stopping.cpp @@ -16,16 +16,14 @@ Information: k.avchachov@gmail.com ------------------------------------------------------------------------- */ +#include "fix_electron_stopping.h" #include -#include #include -#include "fix_electron_stopping.h" #include "mpi.h" #include "atom.h" #include "update.h" #include "domain.h" #include "region.h" -#include "group.h" #include "force.h" #include "fix.h" #include "memory.h" diff --git a/src/USER-MISC/fix_ffl.cpp b/src/USER-MISC/fix_ffl.cpp index 9ab113aeaa..a245b6b4e5 100644 --- a/src/USER-MISC/fix_ffl.cpp +++ b/src/USER-MISC/fix_ffl.cpp @@ -18,31 +18,21 @@ /* ---------------------------------------------------------------------- Contributing authors: Lionel Constantin (EPFL), David M. Wilkins (EPFL), - Michele Ceriotti (EPFL) + Michele Ceriotti (EPFL) ------------------------------------------------------------------------- */ +#include "fix_ffl.h" #include #include #include -#include -#include "fix_ffl.h" -#include "math_extra.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "force.h" #include "update.h" -#include "modify.h" -#include "compute.h" -#include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" -#include "input.h" -#include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" -#include "group.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_filter_corotate.cpp b/src/USER-MISC/fix_filter_corotate.cpp index f6cc1c435f..bfc5f58f93 100644 --- a/src/USER-MISC/fix_filter_corotate.cpp +++ b/src/USER-MISC/fix_filter_corotate.cpp @@ -16,30 +16,25 @@ some subroutines are from fix_shake.cpp ------------------------------------------------------------------------- */ +#include "fix_filter_corotate.h" #include +#include +#include #include #include -#include "fix_filter_corotate.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "bond.h" +#include "comm.h" +#include "domain.h" #include "angle.h" +#include "bond.h" #include "math_const.h" #include "update.h" #include "modify.h" -#include "domain.h" -#include "region.h" #include "memory.h" #include "error.h" #include "force.h" -#include "comm.h" -#include "error.h" -#include "memory.h" -#include "domain.h" -#include "integrate.h" #include "respa.h" -#include "neighbor.h" #include "citeme.h" using namespace LAMMPS_NS; diff --git a/src/USER-MISC/fix_flow_gauss.cpp b/src/USER-MISC/fix_flow_gauss.cpp index b6366ec509..70be1f1e45 100644 --- a/src/USER-MISC/fix_flow_gauss.cpp +++ b/src/USER-MISC/fix_flow_gauss.cpp @@ -16,13 +16,12 @@ Joel.Eaves@Colorado.edu ------------------------------------------------------------------------- */ -#include -#include #include "fix_flow_gauss.h" +#include +#include #include "atom.h" #include "force.h" #include "group.h" -#include "comm.h" #include "update.h" #include "domain.h" #include "error.h" diff --git a/src/USER-MISC/fix_gle.cpp b/src/USER-MISC/fix_gle.cpp index 01da7f87cf..b8bdc66d08 100644 --- a/src/USER-MISC/fix_gle.cpp +++ b/src/USER-MISC/fix_gle.cpp @@ -16,28 +16,19 @@ Axel Kohylmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_gle.h" #include #include #include #include -#include "fix_gle.h" -#include "math_extra.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "force.h" #include "update.h" -#include "modify.h" -#include "compute.h" -#include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" -#include "input.h" -#include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" -#include "group.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_grem.cpp b/src/USER-MISC/fix_grem.cpp index 635acf705c..4272740068 100644 --- a/src/USER-MISC/fix_grem.cpp +++ b/src/USER-MISC/fix_grem.cpp @@ -22,19 +22,14 @@ Tom Keyes (Boston University) ------------------------------------------------------------------------- */ -#include -#include -#include -#include "comm.h" #include "fix_grem.h" +#include #include "atom.h" #include "force.h" #include "update.h" #include "modify.h" #include "domain.h" -#include "input.h" #include "compute.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-MISC/fix_ipi.cpp b/src/USER-MISC/fix_ipi.cpp index 32892d87a8..08b39ee89b 100644 --- a/src/USER-MISC/fix_ipi.cpp +++ b/src/USER-MISC/fix_ipi.cpp @@ -15,15 +15,12 @@ Contributing author: Michele Ceriotti (EPFL), Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_ipi.h" #include -#include #include -#include -#include "fix_ipi.h" #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" #include "kspace.h" #include "modify.h" @@ -32,8 +29,6 @@ #include "neighbor.h" #include "irregular.h" #include "domain.h" -#include "compute_pressure.h" -#include using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_nvk.cpp b/src/USER-MISC/fix_nvk.cpp index 2ac2a7c9fc..410a269f8c 100644 --- a/src/USER-MISC/fix_nvk.cpp +++ b/src/USER-MISC/fix_nvk.cpp @@ -15,18 +15,16 @@ Contributing author: Efrem Braun (UC Berkeley) ------------------------------------------------------------------------- */ +#include "fix_nvk.h" +#include #include -#include #include -#include "fix_nvk.h" #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" -#include "compute.h" #include "math_extra.h" -#include "domain.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_pimd.cpp b/src/USER-MISC/fix_pimd.cpp index 3929d47d6b..8f790f0a59 100644 --- a/src/USER-MISC/fix_pimd.cpp +++ b/src/USER-MISC/fix_pimd.cpp @@ -21,10 +21,11 @@ Version 1.0 ------------------------------------------------------------------------- */ +#include "fix_pimd.h" +#include #include #include #include -#include "fix_pimd.h" #include "universe.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/fix_rhok.cpp b/src/USER-MISC/fix_rhok.cpp index 6a6e71ebaa..c638adf6a4 100644 --- a/src/USER-MISC/fix_rhok.cpp +++ b/src/USER-MISC/fix_rhok.cpp @@ -13,12 +13,11 @@ Contributing author: Ulf R. Pedersen, ulf@urp.dk ------------------------------------------------------------------------- */ -#include -#include +#include "fix_rhok.h" +#include #include #include -#include "fix_rhok.h" #include "atom.h" #include "domain.h" #include "error.h" diff --git a/src/USER-MISC/fix_smd.cpp b/src/USER-MISC/fix_smd.cpp index cbebdebdbf..32c040c2b4 100644 --- a/src/USER-MISC/fix_smd.cpp +++ b/src/USER-MISC/fix_smd.cpp @@ -16,10 +16,10 @@ based on fix spring by: Paul Crozier (SNL) ------------------------------------------------------------------------- */ +#include "fix_smd.h" +#include #include -#include #include -#include "fix_smd.h" #include "atom.h" #include "comm.h" #include "update.h" diff --git a/src/USER-MISC/fix_srp.cpp b/src/USER-MISC/fix_srp.cpp index ebc161ff99..c0db252db4 100644 --- a/src/USER-MISC/fix_srp.cpp +++ b/src/USER-MISC/fix_srp.cpp @@ -15,9 +15,10 @@ Contributing authors: Timothy Sirk (ARL), Pieter in't Veld (BASF) ------------------------------------------------------------------------- */ -#include -#include #include "fix_srp.h" +#include +#include +#include #include "atom.h" #include "force.h" #include "domain.h" @@ -635,11 +636,11 @@ void FixSRP::restart(char *buf) int FixSRP::modify_param(int /*narg*/, char **arg) { if (strcmp(arg[0],"btype") == 0) { - btype = atoi(arg[1]); + btype = force->inumeric(FLERR,arg[1]); return 2; } if (strcmp(arg[0],"bptype") == 0) { - bptype = atoi(arg[1]); + bptype = force->inumeric(FLERR,arg[1]); return 2; } return 0; diff --git a/src/USER-MISC/fix_ti_spring.cpp b/src/USER-MISC/fix_ti_spring.cpp index 305e29e033..8481b34a6b 100644 --- a/src/USER-MISC/fix_ti_spring.cpp +++ b/src/USER-MISC/fix_ti_spring.cpp @@ -18,9 +18,9 @@ Maurice de Koning (Unicamp/Brazil) - dekoning@ifi.unicamp.br ------------------------------------------------------------------------- */ -#include -#include #include "fix_ti_spring.h" +#include +#include #include "atom.h" #include "update.h" #include "domain.h" diff --git a/src/USER-MISC/fix_ttm_mod.cpp b/src/USER-MISC/fix_ttm_mod.cpp index a34c2eb42f..55526a9149 100644 --- a/src/USER-MISC/fix_ttm_mod.cpp +++ b/src/USER-MISC/fix_ttm_mod.cpp @@ -17,17 +17,14 @@ Vasily Pisarev (Joint Institute for High Temperatures of RAS) ------------------------------------------------------------------------- */ -#include "lmptype.h" +#include "fix_ttm_mod.h" #include #include #include -#include -#include "fix_ttm_mod.h" #include "atom.h" #include "force.h" #include "update.h" #include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" #include "random_mars.h" diff --git a/src/USER-MISC/fix_wall_ees.cpp b/src/USER-MISC/fix_wall_ees.cpp index 5ca16ebdad..bd7e230472 100644 --- a/src/USER-MISC/fix_wall_ees.cpp +++ b/src/USER-MISC/fix_wall_ees.cpp @@ -15,21 +15,13 @@ Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com ------------------------------------------------------------------------- */ +#include "fix_wall_ees.h" #include #include "math_extra.h" -#include "fix_wall_ees.h" #include "atom.h" #include "atom_vec.h" #include "atom_vec_ellipsoid.h" -#include "domain.h" -#include "region.h" -#include "force.h" -#include "lattice.h" -#include "update.h" -#include "output.h" -#include "respa.h" #include "error.h" -#include "math_extra.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-MISC/fix_wall_region_ees.cpp b/src/USER-MISC/fix_wall_region_ees.cpp index 33bf636e64..5c6bb1874b 100644 --- a/src/USER-MISC/fix_wall_region_ees.cpp +++ b/src/USER-MISC/fix_wall_region_ees.cpp @@ -15,19 +15,16 @@ Contributing author: Abdoreza Ershadinia, a.ershadinia at gmail.com ------------------------------------------------------------------------- */ +#include "fix_wall_region_ees.h" +#include #include -#include #include -#include "fix_wall_region_ees.h" #include "atom.h" -#include "atom_vec.h" #include "atom_vec_ellipsoid.h" #include "domain.h" #include "region.h" #include "force.h" -#include "lattice.h" #include "update.h" -#include "output.h" #include "respa.h" #include "error.h" #include "math_extra.h" -- GitLab From ea68db964a3dcbdab7aec33f9e4edee404469d53 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 10 Jul 2019 14:21:07 -0500 Subject: [PATCH 155/236] trim (left and right) strings from kim_query xxxx split --- src/KIM/kim_query.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index cf4efc2b12..221dc9e804 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -138,6 +138,8 @@ void KimQuery::command(int narg, char **arg) varcmd[1] = (char *) "string"; while(std::getline(ss, token, ',')) { + token.erase(0,token.find_first_not_of(" \n\r\t")); // ltrim + token.erase(token.find_last_not_of(" \n\r\t") + 1); // rtrim std::stringstream splitname; splitname << varname << "_" << counter++; varcmd[0] = const_cast(splitname.str().c_str()); -- GitLab From 956d21ec0ead2d94220c22dd5ba97c0bbe45189f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 10 Jul 2019 15:38:41 -0400 Subject: [PATCH 156/236] update include lists in packages USER-MISC, USER-MOFF, USER-PTM, and USER-SMD --- src/USER-MISC/fix_imd.cpp | 2 -- src/USER-MISC/improper_cossq.cpp | 4 +--- src/USER-MISC/improper_distance.cpp | 4 +--- src/USER-MISC/improper_fourier.cpp | 5 +---- src/USER-MISC/improper_ring.cpp | 5 +---- src/USER-MISC/pair_agni.cpp | 6 ++---- src/USER-MISC/pair_buck_mdf.cpp | 7 ++----- src/USER-MISC/pair_coul_diel.cpp | 6 ++---- src/USER-MISC/pair_coul_shield.cpp | 5 +---- src/USER-MISC/pair_drip.cpp | 6 ++---- src/USER-MISC/pair_drip.h | 2 -- src/USER-MISC/pair_e3b.cpp | 8 +++----- src/USER-MISC/pair_edip.cpp | 4 ++-- src/USER-MISC/pair_edip_multi.cpp | 5 ++--- src/USER-MISC/pair_extep.cpp | 4 ++-- src/USER-MISC/pair_extep.h | 1 - src/USER-MISC/pair_gauss_cut.cpp | 9 ++------- src/USER-MISC/pair_ilp_graphene_hbn.cpp | 3 +-- src/USER-MISC/pair_ilp_graphene_hbn.h | 2 -- src/USER-MISC/pair_kolmogorov_crespi_full.cpp | 3 +-- src/USER-MISC/pair_kolmogorov_crespi_full.h | 2 -- src/USER-MISC/pair_kolmogorov_crespi_z.cpp | 4 ++-- src/USER-MISC/pair_lebedeva_z.cpp | 4 ++-- src/USER-MISC/pair_lennard_mdf.cpp | 6 ++---- src/USER-MISC/pair_list.cpp | 10 +++------- src/USER-MISC/pair_lj_expand_coul_long.cpp | 6 ++---- src/USER-MISC/pair_lj_mdf.cpp | 6 ++---- src/USER-MISC/pair_lj_sf_dipole_sf.cpp | 4 ++-- src/USER-MISC/pair_meam_spline.cpp | 4 +--- src/USER-MISC/pair_meam_sw_spline.cpp | 4 +--- src/USER-MISC/pair_momb.cpp | 5 ++--- src/USER-MISC/pair_morse_smooth_linear.cpp | 5 ++--- src/USER-MISC/pair_srp.cpp | 4 +++- src/USER-MISC/pair_tersoff_table.cpp | 4 ++-- src/USER-MISC/temper_grem.cpp | 7 +------ src/USER-MISC/temper_npt.cpp | 6 +----- src/USER-MOFFF/angle_class2_p6.cpp | 4 ++-- src/USER-MOFFF/angle_cosine_buck6d.cpp | 6 ++---- src/USER-MOFFF/improper_inversion_harmonic.cpp | 6 +----- src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp | 4 +--- src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp | 7 ++----- src/USER-PTM/compute_ptm_atom.cpp | 4 +--- src/USER-PTM/ptm_convex_hull_incremental.cpp | 1 - src/USER-PTM/ptm_index.cpp | 4 ---- src/USER-PTM/ptm_initialize_data.cpp | 8 +------- src/USER-PTM/ptm_neighbour_ordering.cpp | 5 ++--- src/USER-PTM/ptm_polar.h | 1 - src/USER-PTM/ptm_quat.cpp | 2 +- src/USER-PTM/ptm_voronoi_cell.cpp | 2 +- src/USER-PTM/ptm_voronoi_cell.h | 3 --- src/USER-SMD/atom_vec_smd.cpp | 5 +---- src/USER-SMD/compute_smd_contact_radius.cpp | 3 +-- src/USER-SMD/compute_smd_damage.cpp | 3 +-- src/USER-SMD/compute_smd_internal_energy.cpp | 1 - src/USER-SMD/compute_smd_plastic_strain.cpp | 3 +-- src/USER-SMD/compute_smd_plastic_strain_rate.cpp | 3 +-- src/USER-SMD/compute_smd_rho.cpp | 3 +-- src/USER-SMD/compute_smd_tlsph_defgrad.cpp | 8 ++------ src/USER-SMD/compute_smd_tlsph_shape.cpp | 6 +----- src/USER-SMD/compute_smd_tlsph_strain.cpp | 5 +---- src/USER-SMD/compute_smd_tlsph_stress.cpp | 3 ++- src/USER-SMD/compute_smd_triangle_vertices.cpp | 9 +-------- src/USER-SMD/compute_smd_ulsph_strain.cpp | 9 +-------- src/USER-SMD/compute_smd_ulsph_stress.cpp | 3 ++- src/USER-SMD/compute_smd_vol.cpp | 4 ++-- src/USER-SMD/fix_smd_adjust_dt.cpp | 11 ++--------- src/USER-SMD/fix_smd_integrate_tlsph.cpp | 10 ++-------- src/USER-SMD/fix_smd_integrate_ulsph.cpp | 11 +---------- src/USER-SMD/fix_smd_move_triangulated_surface.cpp | 14 ++------------ src/USER-SMD/fix_smd_setvel.cpp | 4 ++-- .../fix_smd_tlsph_reference_configuration.cpp | 6 +----- .../fix_smd_tlsph_reference_configuration.h | 1 - src/USER-SMD/fix_smd_wall_surface.cpp | 12 +++--------- src/USER-SMD/pair_smd_hertz.cpp | 7 ++----- src/USER-SMD/pair_smd_tlsph.cpp | 11 +++-------- src/USER-SMD/pair_smd_triangulated_surface.cpp | 9 ++------- src/USER-SMD/pair_smd_ulsph.cpp | 8 +------- src/USER-SMD/smd_material_models.cpp | 4 ++++ 78 files changed, 111 insertions(+), 294 deletions(-) diff --git a/src/USER-MISC/fix_imd.cpp b/src/USER-MISC/fix_imd.cpp index 1c3eafdc46..10aaa285a5 100644 --- a/src/USER-MISC/fix_imd.cpp +++ b/src/USER-MISC/fix_imd.cpp @@ -58,8 +58,6 @@ negotiate an appropriate license for such distribution." #include "group.h" #include "memory.h" -#include -#include #include #include diff --git a/src/USER-MISC/improper_cossq.cpp b/src/USER-MISC/improper_cossq.cpp index c8eb0808fb..2ea804b95d 100644 --- a/src/USER-MISC/improper_cossq.cpp +++ b/src/USER-MISC/improper_cossq.cpp @@ -16,14 +16,12 @@ gvog@chemeng.ntua.gr ------------------------------------------------------------------------- */ +#include "improper_cossq.h" #include #include -#include -#include "improper_cossq.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "memory.h" diff --git a/src/USER-MISC/improper_distance.cpp b/src/USER-MISC/improper_distance.cpp index 50babcc84e..2efab8b5f8 100644 --- a/src/USER-MISC/improper_distance.cpp +++ b/src/USER-MISC/improper_distance.cpp @@ -15,16 +15,14 @@ Contributing author: Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ +#include "improper_distance.h" #include #include -#include -#include "improper_distance.h" #include "atom.h" #include "comm.h" #include "neighbor.h" #include "domain.h" #include "force.h" -#include "update.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MISC/improper_fourier.cpp b/src/USER-MISC/improper_fourier.cpp index 288d888d12..a0ef3a2058 100644 --- a/src/USER-MISC/improper_fourier.cpp +++ b/src/USER-MISC/improper_fourier.cpp @@ -16,15 +16,12 @@ [ based on improper_umbrella.cpp Tod A Pascal (Caltech) ] ------------------------------------------------------------------------- */ +#include "improper_fourier.h" #include #include -#include -#include -#include "improper_fourier.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "memory.h" diff --git a/src/USER-MISC/improper_ring.cpp b/src/USER-MISC/improper_ring.cpp index 36ba73af0f..48db5a41e9 100644 --- a/src/USER-MISC/improper_ring.cpp +++ b/src/USER-MISC/improper_ring.cpp @@ -36,16 +36,13 @@ of j. ------------------------------------------------------------------------- */ +#include "improper_ring.h" #include #include -#include -#include "improper_ring.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" -#include "update.h" #include "math_const.h" #include "math_special.h" #include "memory.h" diff --git a/src/USER-MISC/pair_agni.cpp b/src/USER-MISC/pair_agni.cpp index 21a6f1deee..b3abc647ef 100644 --- a/src/USER-MISC/pair_agni.cpp +++ b/src/USER-MISC/pair_agni.cpp @@ -15,18 +15,16 @@ Contributing authors: Axel Kohlmeyer (Temple U), Venkatesh Botu ------------------------------------------------------------------------- */ +#include "pair_agni.h" +#include #include -#include #include #include -#include "pair_agni.h" #include "atom.h" #include "neighbor.h" #include "neigh_request.h" #include "force.h" #include "comm.h" -#include "memory.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MISC/pair_buck_mdf.cpp b/src/USER-MISC/pair_buck_mdf.cpp index afd15d7fdb..e977197522 100644 --- a/src/USER-MISC/pair_buck_mdf.cpp +++ b/src/USER-MISC/pair_buck_mdf.cpp @@ -15,21 +15,18 @@ Contributing author: Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ +#include "pair_buck_mdf.h" +#include #include -#include -#include #include -#include "pair_buck_mdf.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neigh_list.h" -#include "math_const.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; -using namespace MathConst; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-MISC/pair_coul_diel.cpp b/src/USER-MISC/pair_coul_diel.cpp index a86921d296..a375901ecd 100644 --- a/src/USER-MISC/pair_coul_diel.cpp +++ b/src/USER-MISC/pair_coul_diel.cpp @@ -14,11 +14,9 @@ Contributiong authors: Arben Jusufi, Axel Kohlmeyer (Temple U.) ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "pair_coul_diel.h" +#include +#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_coul_shield.cpp b/src/USER-MISC/pair_coul_shield.cpp index f74dcfe7d8..9264e51287 100644 --- a/src/USER-MISC/pair_coul_shield.cpp +++ b/src/USER-MISC/pair_coul_shield.cpp @@ -18,11 +18,8 @@ [Maaravi et al, J. Phys. Chem. C 121, 22826-22835 (2017)] ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "pair_coul_shield.h" +#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_drip.cpp b/src/USER-MISC/pair_drip.cpp index 118c033b5c..20ec3abcf9 100644 --- a/src/USER-MISC/pair_drip.cpp +++ b/src/USER-MISC/pair_drip.cpp @@ -20,19 +20,17 @@ Phys. Rev. B, 98, 235404 (2018). ------------------------------------------------------------------------- */ +#include "pair_drip.h" +#include #include -#include #include #include -#include -#include "pair_drip.h" #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "my_page.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MISC/pair_drip.h b/src/USER-MISC/pair_drip.h index 0a8f90dfc2..3ea6c735a6 100644 --- a/src/USER-MISC/pair_drip.h +++ b/src/USER-MISC/pair_drip.h @@ -31,8 +31,6 @@ PairStyle(drip, PairDRIP) #define LMP_PAIR_DRIP_H #include "pair.h" -#include "my_page.h" -#include namespace LAMMPS_NS { diff --git a/src/USER-MISC/pair_e3b.cpp b/src/USER-MISC/pair_e3b.cpp index 43b472594a..aa19849baa 100644 --- a/src/USER-MISC/pair_e3b.cpp +++ b/src/USER-MISC/pair_e3b.cpp @@ -14,16 +14,14 @@ contact: stevene.strong at gmail dot com ------------------------------------------------------------------------- */ +#include "pair_e3b.h" +#include #include -#include -#include #include - -#include "pair_e3b.h" +#include #include "atom.h" #include "neighbor.h" -#include "neigh_request.h" #include "neigh_list.h" #include "force.h" #include "comm.h" diff --git a/src/USER-MISC/pair_edip.cpp b/src/USER-MISC/pair_edip.cpp index 0b5220fdfd..8dee4a606b 100644 --- a/src/USER-MISC/pair_edip.cpp +++ b/src/USER-MISC/pair_edip.cpp @@ -21,12 +21,12 @@ Phys. Rev. B 58, 2539 (1998) ------------------------------------------------------------------------- */ +#include "pair_edip.h" +#include #include #include -#include #include #include -#include "pair_edip.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-MISC/pair_edip_multi.cpp b/src/USER-MISC/pair_edip_multi.cpp index ab48fbaa73..9f953610de 100644 --- a/src/USER-MISC/pair_edip_multi.cpp +++ b/src/USER-MISC/pair_edip_multi.cpp @@ -17,12 +17,11 @@ Contributing author: Chao Jiang ------------------------------------------------------------------------- */ +#include "pair_edip_multi.h" +#include #include -#include -#include #include #include -#include "pair_edip_multi.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-MISC/pair_extep.cpp b/src/USER-MISC/pair_extep.cpp index bd5da71f4a..8507fd49f6 100644 --- a/src/USER-MISC/pair_extep.cpp +++ b/src/USER-MISC/pair_extep.cpp @@ -15,12 +15,12 @@ Contributing author: Jan Los ------------------------------------------------------------------------- */ +#include "pair_extep.h" +#include #include -#include #include #include #include -#include "pair_extep.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-MISC/pair_extep.h b/src/USER-MISC/pair_extep.h index 535e7261e3..1f127b71e0 100644 --- a/src/USER-MISC/pair_extep.h +++ b/src/USER-MISC/pair_extep.h @@ -21,7 +21,6 @@ PairStyle(extep,PairExTeP) #define LMP_PAIR_EXTEP_H #include "pair.h" -#include "my_page.h" #define MAXTYPES 8 #define NSPLINE 5 diff --git a/src/USER-MISC/pair_gauss_cut.cpp b/src/USER-MISC/pair_gauss_cut.cpp index 24d0b191d8..e6cfc02f63 100644 --- a/src/USER-MISC/pair_gauss_cut.cpp +++ b/src/USER-MISC/pair_gauss_cut.cpp @@ -15,18 +15,13 @@ Contributing authors: Arben Jusufi, Axel Kohlmeyer (Temple U.) ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "pair_gauss_cut.h" +#include +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" -#include "update.h" -#include "integrate.h" #include "memory.h" #include "error.h" #include "math_const.h" diff --git a/src/USER-MISC/pair_ilp_graphene_hbn.cpp b/src/USER-MISC/pair_ilp_graphene_hbn.cpp index a41c660b7b..b94db6a871 100644 --- a/src/USER-MISC/pair_ilp_graphene_hbn.cpp +++ b/src/USER-MISC/pair_ilp_graphene_hbn.cpp @@ -20,12 +20,11 @@ [Kolmogorov & Crespi, Phys. Rev. B 71, 235415 (2005)] ------------------------------------------------------------------------- */ +#include "pair_ilp_graphene_hbn.h" #include #include -#include #include #include -#include "pair_ilp_graphene_hbn.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_ilp_graphene_hbn.h b/src/USER-MISC/pair_ilp_graphene_hbn.h index 07c3b2e97b..ae4662cdc5 100644 --- a/src/USER-MISC/pair_ilp_graphene_hbn.h +++ b/src/USER-MISC/pair_ilp_graphene_hbn.h @@ -21,8 +21,6 @@ PairStyle(ilp/graphene/hbn,PairILPGrapheneHBN) #define LMP_PAIR_ILP_GRAPHENE_HBN_H #include "pair.h" -#include "my_page.h" -#include namespace LAMMPS_NS { diff --git a/src/USER-MISC/pair_kolmogorov_crespi_full.cpp b/src/USER-MISC/pair_kolmogorov_crespi_full.cpp index e73278968d..0009531ca8 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_full.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_full.cpp @@ -20,12 +20,11 @@ [Kolmogorov & Crespi, Phys. Rev. B 71, 235415 (2005)] ------------------------------------------------------------------------- */ +#include "pair_kolmogorov_crespi_full.h" #include -#include #include #include #include -#include "pair_kolmogorov_crespi_full.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_kolmogorov_crespi_full.h b/src/USER-MISC/pair_kolmogorov_crespi_full.h index 9923b409a7..68dede0dd5 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_full.h +++ b/src/USER-MISC/pair_kolmogorov_crespi_full.h @@ -21,8 +21,6 @@ PairStyle(kolmogorov/crespi/full,PairKolmogorovCrespiFull) #define LMP_PAIR_KolmogorovCrespi_FULL_H #include "pair.h" -#include "my_page.h" -#include namespace LAMMPS_NS { diff --git a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp index 79d6aa3daf..61c326ac87 100644 --- a/src/USER-MISC/pair_kolmogorov_crespi_z.cpp +++ b/src/USER-MISC/pair_kolmogorov_crespi_z.cpp @@ -21,11 +21,11 @@ The simplification is that all normals are taken along the z-direction ------------------------------------------------------------------------- */ +#include "pair_kolmogorov_crespi_z.h" +#include #include -#include #include #include -#include "pair_kolmogorov_crespi_z.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_lebedeva_z.cpp b/src/USER-MISC/pair_lebedeva_z.cpp index c9d90e2850..8930042cef 100644 --- a/src/USER-MISC/pair_lebedeva_z.cpp +++ b/src/USER-MISC/pair_lebedeva_z.cpp @@ -22,11 +22,11 @@ [Lebedeva et al., Physica E, 44(6), 949-954, 2012.] ------------------------------------------------------------------------- */ +#include "pair_lebedeva_z.h" +#include #include -#include #include #include -#include "pair_lebedeva_z.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_lennard_mdf.cpp b/src/USER-MISC/pair_lennard_mdf.cpp index e2e81e4943..50f59107a0 100644 --- a/src/USER-MISC/pair_lennard_mdf.cpp +++ b/src/USER-MISC/pair_lennard_mdf.cpp @@ -16,15 +16,13 @@ Contributing author: Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ +#include "pair_lennard_mdf.h" +#include #include -#include -#include #include -#include "pair_lennard_mdf.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MISC/pair_list.cpp b/src/USER-MISC/pair_list.cpp index 562a60aa99..2f4e886a61 100644 --- a/src/USER-MISC/pair_list.cpp +++ b/src/USER-MISC/pair_list.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "pair_list.h" +#include +#include +#include #include "atom.h" #include "comm.h" -#include "domain.h" #include "force.h" #include "memory.h" - #include "error.h" -#include -#include -#include -#include - using namespace LAMMPS_NS; static const char * const stylename[] = { diff --git a/src/USER-MISC/pair_lj_expand_coul_long.cpp b/src/USER-MISC/pair_lj_expand_coul_long.cpp index fe21538f2d..ffa828826f 100644 --- a/src/USER-MISC/pair_lj_expand_coul_long.cpp +++ b/src/USER-MISC/pair_lj_expand_coul_long.cpp @@ -15,17 +15,15 @@ Contributing author: Trung Nguyen (Northwestern) ------------------------------------------------------------------------- */ +#include "pair_lj_expand_coul_long.h" +#include #include -#include -#include #include -#include "pair_lj_expand_coul_long.h" #include "atom.h" #include "comm.h" #include "force.h" #include "kspace.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-MISC/pair_lj_mdf.cpp b/src/USER-MISC/pair_lj_mdf.cpp index cfe125f21f..3fe0fa6bf9 100644 --- a/src/USER-MISC/pair_lj_mdf.cpp +++ b/src/USER-MISC/pair_lj_mdf.cpp @@ -16,15 +16,13 @@ Contributing author: Paolo Raiteri (Curtin University) ------------------------------------------------------------------------- */ +#include "pair_lj_mdf.h" +#include #include -#include -#include #include -#include "pair_lj_mdf.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MISC/pair_lj_sf_dipole_sf.cpp b/src/USER-MISC/pair_lj_sf_dipole_sf.cpp index af7d23370d..758962ce29 100644 --- a/src/USER-MISC/pair_lj_sf_dipole_sf.cpp +++ b/src/USER-MISC/pair_lj_sf_dipole_sf.cpp @@ -16,10 +16,10 @@ Samuel Genheden (University of Southampton) ------------------------------------------------------------------------- */ +#include "pair_lj_sf_dipole_sf.h" +#include #include -#include #include -#include "pair_lj_sf_dipole_sf.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-MISC/pair_meam_spline.cpp b/src/USER-MISC/pair_meam_spline.cpp index f09919ce0f..79e7ac7e09 100644 --- a/src/USER-MISC/pair_meam_spline.cpp +++ b/src/USER-MISC/pair_meam_spline.cpp @@ -31,15 +31,13 @@ conform with pairing, updated to LAMMPS style ------------------------------------------------------------------------- */ +#include "pair_meam_spline.h" #include -#include #include #include -#include "pair_meam_spline.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "memory.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/USER-MISC/pair_meam_sw_spline.cpp b/src/USER-MISC/pair_meam_sw_spline.cpp index af1e8788bd..eeadacf33a 100644 --- a/src/USER-MISC/pair_meam_sw_spline.cpp +++ b/src/USER-MISC/pair_meam_sw_spline.cpp @@ -23,15 +23,13 @@ * 01-Aug-12 - RER: First code version. ------------------------------------------------------------------------- */ +#include "pair_meam_sw_spline.h" #include -#include #include #include -#include "pair_meam_sw_spline.h" #include "atom.h" #include "force.h" #include "comm.h" -#include "memory.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/USER-MISC/pair_momb.cpp b/src/USER-MISC/pair_momb.cpp index 1716149a98..29d5715302 100644 --- a/src/USER-MISC/pair_momb.cpp +++ b/src/USER-MISC/pair_momb.cpp @@ -16,10 +16,9 @@ Ya Zhou (Penn State University) ------------------------------------------------------------------------- */ -#include -#include -#include #include "pair_momb.h" +#include +#include #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_morse_smooth_linear.cpp b/src/USER-MISC/pair_morse_smooth_linear.cpp index 7c7973f830..c3cbe39db7 100644 --- a/src/USER-MISC/pair_morse_smooth_linear.cpp +++ b/src/USER-MISC/pair_morse_smooth_linear.cpp @@ -11,11 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_morse_smooth_linear.h" +#include #include -#include -#include #include -#include "pair_morse_smooth_linear.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_srp.cpp b/src/USER-MISC/pair_srp.cpp index 01deaf0fbe..416ace8132 100644 --- a/src/USER-MISC/pair_srp.cpp +++ b/src/USER-MISC/pair_srp.cpp @@ -25,9 +25,11 @@ There is an example script for this package in examples/USER/srp. Please contact Timothy Sirk for questions (tim.sirk@us.army.mil). ------------------------------------------------------------------------- */ +#include "pair_srp.h" +#include +#include #include #include -#include "pair_srp.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MISC/pair_tersoff_table.cpp b/src/USER-MISC/pair_tersoff_table.cpp index e0985d1dce..5c4f60f354 100644 --- a/src/USER-MISC/pair_tersoff_table.cpp +++ b/src/USER-MISC/pair_tersoff_table.cpp @@ -20,11 +20,11 @@ 1) Tersoff, Phys. Rev. B 39, 5566 (1988) ------------------------------------------------------------------------- */ +#include "pair_tersoff_table.h" +#include #include -#include #include #include -#include "pair_tersoff_table.h" #include "atom.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-MISC/temper_grem.cpp b/src/USER-MISC/temper_grem.cpp index 031a449689..d0e2fa5606 100644 --- a/src/USER-MISC/temper_grem.cpp +++ b/src/USER-MISC/temper_grem.cpp @@ -15,26 +15,21 @@ Contributing author: David Stelter (BU) ------------------------------------------------------------------------- */ +#include "temper_grem.h" #include -#include #include -#include "temper_grem.h" #include "fix_grem.h" #include "universe.h" #include "domain.h" -#include "atom.h" #include "update.h" #include "integrate.h" #include "modify.h" #include "compute.h" #include "force.h" -#include "output.h" -#include "thermo.h" #include "fix.h" #include "random_park.h" #include "finish.h" #include "timer.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-MISC/temper_npt.cpp b/src/USER-MISC/temper_npt.cpp index 7cf8fbab9b..9fd4bd6d06 100644 --- a/src/USER-MISC/temper_npt.cpp +++ b/src/USER-MISC/temper_npt.cpp @@ -17,10 +17,9 @@ Contact Email: amulyapervaje@gmail.com ------------------------------------------------------------------------- */ +#include "temper_npt.h" #include -#include #include -#include "temper_npt.h" #include "universe.h" #include "domain.h" #include "atom.h" @@ -29,13 +28,10 @@ #include "modify.h" #include "compute.h" #include "force.h" -#include "output.h" -#include "thermo.h" #include "fix.h" #include "random_park.h" #include "finish.h" #include "timer.h" -#include "memory.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-MOFFF/angle_class2_p6.cpp b/src/USER-MOFFF/angle_class2_p6.cpp index e8e6f279de..bb0a01d546 100644 --- a/src/USER-MOFFF/angle_class2_p6.cpp +++ b/src/USER-MOFFF/angle_class2_p6.cpp @@ -16,10 +16,10 @@ and Rochus Schmid (Ruhr-Universitaet Bochum) ------------------------------------------------------------------------- */ +#include "angle_class2_p6.h" +#include #include #include -#include -#include "angle_class2_p6.h" #include "atom.h" #include "neighbor.h" #include "domain.h" diff --git a/src/USER-MOFFF/angle_cosine_buck6d.cpp b/src/USER-MOFFF/angle_cosine_buck6d.cpp index 3829d2b8dc..c17b2a1dba 100644 --- a/src/USER-MOFFF/angle_cosine_buck6d.cpp +++ b/src/USER-MOFFF/angle_cosine_buck6d.cpp @@ -16,9 +16,9 @@ and Rochus Schmid (Ruhr-Universitaet Bochum) ------------------------------------------------------------------------- */ -#include -#include #include "angle_cosine_buck6d.h" +#include +#include #include "atom.h" #include "neighbor.h" #include "domain.h" @@ -26,13 +26,11 @@ #include "force.h" #include "pair.h" #include "math_const.h" -#include "math_special.h" #include "memory.h" #include "error.h" using namespace LAMMPS_NS; using namespace MathConst; -using namespace MathSpecial; #define SMALL 0.001 diff --git a/src/USER-MOFFF/improper_inversion_harmonic.cpp b/src/USER-MOFFF/improper_inversion_harmonic.cpp index 3f1e61e54a..12f7062ccc 100644 --- a/src/USER-MOFFF/improper_inversion_harmonic.cpp +++ b/src/USER-MOFFF/improper_inversion_harmonic.cpp @@ -19,17 +19,13 @@ [ abbreviated from and verified via DLPOLY2.0 ] ------------------------------------------------------------------------- */ +#include "improper_inversion_harmonic.h" #include #include -#include -#include -#include "improper_inversion_harmonic.h" #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" -#include "update.h" #include "math_const.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp b/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp index 282bb0c58f..9c917d1c19 100644 --- a/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp +++ b/src/USER-MOFFF/pair_buck6d_coul_gauss_dsf.cpp @@ -18,11 +18,9 @@ Fennell and Gezelter, JCP 124, 234104 (2006) ------------------------------------------------------------------------- */ +#include "pair_buck6d_coul_gauss_dsf.h" #include -#include -#include #include -#include "pair_buck6d_coul_gauss_dsf.h" #include "atom.h" #include "comm.h" #include "force.h" diff --git a/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp b/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp index d6a4121d21..953507ce21 100644 --- a/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp +++ b/src/USER-MOFFF/pair_buck6d_coul_gauss_long.cpp @@ -17,11 +17,10 @@ References: Bureekaew and Schmid, Phys. Status Solidi B 250, 1128 (2013) ------------------------------------------------------------------------- */ +#include "pair_buck6d_coul_gauss_long.h" +#include #include -#include -#include #include -#include "pair_buck6d_coul_gauss_long.h" #include "atom.h" #include "comm.h" #include "force.h" @@ -29,12 +28,10 @@ #include "neighbor.h" #include "neigh_list.h" #include "memory.h" -#include "math_const.h" #include "error.h" #include "math_special.h" using namespace LAMMPS_NS; -using namespace MathConst; #define EWALD_F 1.12837917 diff --git a/src/USER-PTM/compute_ptm_atom.cpp b/src/USER-PTM/compute_ptm_atom.cpp index 41e6540b97..ad3d3facdb 100644 --- a/src/USER-PTM/compute_ptm_atom.cpp +++ b/src/USER-PTM/compute_ptm_atom.cpp @@ -16,15 +16,14 @@ under Contributing author: PM Larsen (MIT) ------------------------------------------------------------------------- */ +#include "compute_ptm_atom.h" #include #include -#include #include #include #include "atom.h" #include "comm.h" -#include "compute_ptm_atom.h" #include "error.h" #include "force.h" #include "memory.h" @@ -32,7 +31,6 @@ under #include "neigh_list.h" #include "neigh_request.h" #include "neighbor.h" -#include "pair.h" #include "update.h" #include "ptm_functions.h" diff --git a/src/USER-PTM/ptm_convex_hull_incremental.cpp b/src/USER-PTM/ptm_convex_hull_incremental.cpp index 45643ec515..8dd06e8168 100644 --- a/src/USER-PTM/ptm_convex_hull_incremental.cpp +++ b/src/USER-PTM/ptm_convex_hull_incremental.cpp @@ -11,7 +11,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include #include #include -#include #include "ptm_convex_hull_incremental.h" #include "ptm_constants.h" diff --git a/src/USER-PTM/ptm_index.cpp b/src/USER-PTM/ptm_index.cpp index 3068e7a7f6..b50e5c4333 100644 --- a/src/USER-PTM/ptm_index.cpp +++ b/src/USER-PTM/ptm_index.cpp @@ -12,19 +12,15 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include "ptm_convex_hull_incremental.h" #include "ptm_deformation_gradient.h" #include "ptm_functions.h" -#include "ptm_graph_data.h" #include "ptm_initialize_data.h" #include "ptm_neighbour_ordering.h" #include "ptm_normalize_vertices.h" #include "ptm_polar.h" #include "ptm_quat.h" #include "ptm_structure_matcher.h" -#include #include -#include #include #include -#include #include static double calculate_interatomic_distance(int type, double scale) { diff --git a/src/USER-PTM/ptm_initialize_data.cpp b/src/USER-PTM/ptm_initialize_data.cpp index 49dc6f2323..1f0a5c94af 100644 --- a/src/USER-PTM/ptm_initialize_data.cpp +++ b/src/USER-PTM/ptm_initialize_data.cpp @@ -7,14 +7,8 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include -#include -#include -#include -#include -#include #include "ptm_initialize_data.h" +#include static void make_facets_clockwise(int num_facets, int8_t (*facets)[3], const double (*points)[3]) diff --git a/src/USER-PTM/ptm_neighbour_ordering.cpp b/src/USER-PTM/ptm_neighbour_ordering.cpp index cb72a43711..1332b8819b 100644 --- a/src/USER-PTM/ptm_neighbour_ordering.cpp +++ b/src/USER-PTM/ptm_neighbour_ordering.cpp @@ -9,16 +9,15 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI //todo: normalize vertices -#include +#include "ptm_neighbour_ordering.h" #include #include #include #include #include +#include #include "ptm_constants.h" #include "ptm_voronoi_cell.h" -#include "ptm_neighbour_ordering.h" -#include "ptm_normalize_vertices.h" namespace ptm { diff --git a/src/USER-PTM/ptm_polar.h b/src/USER-PTM/ptm_polar.h index e03963048b..f11dd98ee9 100644 --- a/src/USER-PTM/ptm_polar.h +++ b/src/USER-PTM/ptm_polar.h @@ -11,7 +11,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #define PTM_POLAR_H #include -#include namespace ptm { diff --git a/src/USER-PTM/ptm_quat.cpp b/src/USER-PTM/ptm_quat.cpp index 4a93499b3a..527f4d1116 100644 --- a/src/USER-PTM/ptm_quat.cpp +++ b/src/USER-PTM/ptm_quat.cpp @@ -7,9 +7,9 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include "ptm_quat.h" #include #include -#include #include diff --git a/src/USER-PTM/ptm_voronoi_cell.cpp b/src/USER-PTM/ptm_voronoi_cell.cpp index dfe61eb24f..dc4ce4e747 100644 --- a/src/USER-PTM/ptm_voronoi_cell.cpp +++ b/src/USER-PTM/ptm_voronoi_cell.cpp @@ -52,7 +52,7 @@ such enhancements or derivative works thereof, in binary and source code form. * \brief Function implementations for the voronoicell and related classes. */ #include -#include +#include #include #include "ptm_voronoi_config.h" #include "ptm_voronoi_cell.h" diff --git a/src/USER-PTM/ptm_voronoi_cell.h b/src/USER-PTM/ptm_voronoi_cell.h index eb091dd36b..69e3b5bdc4 100644 --- a/src/USER-PTM/ptm_voronoi_cell.h +++ b/src/USER-PTM/ptm_voronoi_cell.h @@ -56,9 +56,6 @@ such enhancements or derivative works thereof, in binary and source code form. #define PTM_VOROPP_CELL_HH #include -#include - -#include "ptm_voronoi_config.h" namespace ptm_voro { diff --git a/src/USER-SMD/atom_vec_smd.cpp b/src/USER-SMD/atom_vec_smd.cpp index 93a6f1308f..604504c5a7 100644 --- a/src/USER-SMD/atom_vec_smd.cpp +++ b/src/USER-SMD/atom_vec_smd.cpp @@ -23,21 +23,18 @@ ------------------------------------------------------------------------- */ #include "atom_vec_smd.h" -#include #include #include "atom.h" #include "comm.h" #include "domain.h" #include "modify.h" #include "fix.h" -#include "fix_adapt.h" -#include "math_const.h" #include "memory.h" #include "error.h" #include "utils.h" using namespace LAMMPS_NS; -using namespace MathConst; + #define NMAT_FULL 9 #define NMAT_SYMM 6 diff --git a/src/USER-SMD/compute_smd_contact_radius.cpp b/src/USER-SMD/compute_smd_contact_radius.cpp index 8193ad6ccf..46cbc602f2 100644 --- a/src/USER-SMD/compute_smd_contact_radius.cpp +++ b/src/USER-SMD/compute_smd_contact_radius.cpp @@ -23,13 +23,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_smd_contact_radius.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/compute_smd_damage.cpp b/src/USER-SMD/compute_smd_damage.cpp index 9603fd5c64..96a936cd82 100644 --- a/src/USER-SMD/compute_smd_damage.cpp +++ b/src/USER-SMD/compute_smd_damage.cpp @@ -23,13 +23,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_smd_damage.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/compute_smd_internal_energy.cpp b/src/USER-SMD/compute_smd_internal_energy.cpp index d937aa98a4..f88da8bc33 100644 --- a/src/USER-SMD/compute_smd_internal_energy.cpp +++ b/src/USER-SMD/compute_smd_internal_energy.cpp @@ -29,7 +29,6 @@ #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/compute_smd_plastic_strain.cpp b/src/USER-SMD/compute_smd_plastic_strain.cpp index 67466ebb72..c1c001a5dd 100644 --- a/src/USER-SMD/compute_smd_plastic_strain.cpp +++ b/src/USER-SMD/compute_smd_plastic_strain.cpp @@ -23,13 +23,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_smd_plastic_strain.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/compute_smd_plastic_strain_rate.cpp b/src/USER-SMD/compute_smd_plastic_strain_rate.cpp index 20dfa64edd..272a2c59e5 100644 --- a/src/USER-SMD/compute_smd_plastic_strain_rate.cpp +++ b/src/USER-SMD/compute_smd_plastic_strain_rate.cpp @@ -23,13 +23,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_smd_plastic_strain_rate.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/compute_smd_rho.cpp b/src/USER-SMD/compute_smd_rho.cpp index 5c78e604b6..d9c0a99b07 100644 --- a/src/USER-SMD/compute_smd_rho.cpp +++ b/src/USER-SMD/compute_smd_rho.cpp @@ -22,13 +22,12 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_smd_rho.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/compute_smd_tlsph_defgrad.cpp b/src/USER-SMD/compute_smd_tlsph_defgrad.cpp index 37ad78dcea..09aeeea74a 100644 --- a/src/USER-SMD/compute_smd_tlsph_defgrad.cpp +++ b/src/USER-SMD/compute_smd_tlsph_defgrad.cpp @@ -22,20 +22,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include "compute_smd_tlsph_defgrad.h" #include -#include #include -#include "compute_smd_tlsph_defgrad.h" #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" -#include "pair.h" + using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_tlsph_shape.cpp b/src/USER-SMD/compute_smd_tlsph_shape.cpp index bbab274b5c..ba1a9306ef 100644 --- a/src/USER-SMD/compute_smd_tlsph_shape.cpp +++ b/src/USER-SMD/compute_smd_tlsph_shape.cpp @@ -22,13 +22,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include "compute_smd_tlsph_shape.h" #include -#include #include -#include -#include "compute_smd_tlsph_shape.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-SMD/compute_smd_tlsph_strain.cpp b/src/USER-SMD/compute_smd_tlsph_strain.cpp index a94a3cd511..f0061bf7a1 100644 --- a/src/USER-SMD/compute_smd_tlsph_strain.cpp +++ b/src/USER-SMD/compute_smd_tlsph_strain.cpp @@ -23,12 +23,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include "compute_smd_tlsph_strain.h" #include -#include #include -#include "compute_smd_tlsph_strain.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-SMD/compute_smd_tlsph_stress.cpp b/src/USER-SMD/compute_smd_tlsph_stress.cpp index a54b07dd1e..9c78b192ce 100644 --- a/src/USER-SMD/compute_smd_tlsph_stress.cpp +++ b/src/USER-SMD/compute_smd_tlsph_stress.cpp @@ -22,9 +22,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_smd_tlsph_stress.h" +#include #include #include -#include "compute_smd_tlsph_stress.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-SMD/compute_smd_triangle_vertices.cpp b/src/USER-SMD/compute_smd_triangle_vertices.cpp index b24223b8b5..06706a85ad 100644 --- a/src/USER-SMD/compute_smd_triangle_vertices.cpp +++ b/src/USER-SMD/compute_smd_triangle_vertices.cpp @@ -23,22 +23,15 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include #include "compute_smd_triangle_vertices.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" -#include "pair.h" -using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_ulsph_strain.cpp b/src/USER-SMD/compute_smd_ulsph_strain.cpp index 89b85f7bc1..cf1535759c 100644 --- a/src/USER-SMD/compute_smd_ulsph_strain.cpp +++ b/src/USER-SMD/compute_smd_ulsph_strain.cpp @@ -23,22 +23,15 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include -#include -#include #include "compute_smd_ulsph_strain.h" +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" -#include "pair.h" -using namespace Eigen; using namespace std; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/compute_smd_ulsph_stress.cpp b/src/USER-SMD/compute_smd_ulsph_stress.cpp index 7f1bbc4c29..ea477375ce 100644 --- a/src/USER-SMD/compute_smd_ulsph_stress.cpp +++ b/src/USER-SMD/compute_smd_ulsph_stress.cpp @@ -22,9 +22,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "compute_smd_ulsph_stress.h" +#include #include #include -#include "compute_smd_ulsph_stress.h" #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-SMD/compute_smd_vol.cpp b/src/USER-SMD/compute_smd_vol.cpp index 17a6b556e8..eb1f144275 100644 --- a/src/USER-SMD/compute_smd_vol.cpp +++ b/src/USER-SMD/compute_smd_vol.cpp @@ -22,13 +22,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "compute_smd_vol.h" +#include +#include #include "atom.h" #include "update.h" #include "modify.h" #include "comm.h" -#include "force.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/fix_smd_adjust_dt.cpp b/src/USER-SMD/fix_smd_adjust_dt.cpp index f015c6c4df..ab6dd5ef5c 100644 --- a/src/USER-SMD/fix_smd_adjust_dt.cpp +++ b/src/USER-SMD/fix_smd_adjust_dt.cpp @@ -22,21 +22,14 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_smd_adjust_dt.h" -#include "atom.h" +#include +#include #include "update.h" -#include "integrate.h" -#include "domain.h" -#include "lattice.h" #include "force.h" #include "pair.h" #include "modify.h" #include "fix.h" -#include "output.h" -#include "dump.h" #include "comm.h" #include "error.h" diff --git a/src/USER-SMD/fix_smd_integrate_tlsph.cpp b/src/USER-SMD/fix_smd_integrate_tlsph.cpp index f931ae94ff..8464bed609 100644 --- a/src/USER-SMD/fix_smd_integrate_tlsph.cpp +++ b/src/USER-SMD/fix_smd_integrate_tlsph.cpp @@ -22,22 +22,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include "fix_smd_integrate_tlsph.h" +#include #include -#include #include -#include "fix_smd_integrate_tlsph.h" #include "atom.h" #include "force.h" #include "update.h" #include "error.h" #include "pair.h" -#include "neigh_list.h" -#include "domain.h" -#include "neighbor.h" #include "comm.h" -#include "modify.h" using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/fix_smd_integrate_ulsph.cpp b/src/USER-SMD/fix_smd_integrate_ulsph.cpp index 6c4705eb96..0f0d224f95 100644 --- a/src/USER-SMD/fix_smd_integrate_ulsph.cpp +++ b/src/USER-SMD/fix_smd_integrate_ulsph.cpp @@ -22,25 +22,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include +#include "fix_smd_integrate_ulsph.h" #include -#include #include #include -#include "fix_smd_integrate_ulsph.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "update.h" -#include "integrate.h" -#include "respa.h" -#include "memory.h" #include "error.h" #include "pair.h" -#include "domain.h" using namespace Eigen; using namespace LAMMPS_NS; diff --git a/src/USER-SMD/fix_smd_move_triangulated_surface.cpp b/src/USER-SMD/fix_smd_move_triangulated_surface.cpp index fe8695b23e..cbaad9ac4c 100644 --- a/src/USER-SMD/fix_smd_move_triangulated_surface.cpp +++ b/src/USER-SMD/fix_smd_move_triangulated_surface.cpp @@ -22,25 +22,15 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include +#include "fix_smd_move_triangulated_surface.h" #include -#include +#include #include -#include "fix_smd_move_triangulated_surface.h" #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" #include "update.h" -#include "integrate.h" -#include "respa.h" -#include "memory.h" #include "error.h" -#include "pair.h" -#include "domain.h" #include "math_const.h" using namespace Eigen; diff --git a/src/USER-SMD/fix_smd_setvel.cpp b/src/USER-SMD/fix_smd_setvel.cpp index 4bc8b5127b..2964ded544 100644 --- a/src/USER-SMD/fix_smd_setvel.cpp +++ b/src/USER-SMD/fix_smd_setvel.cpp @@ -23,9 +23,9 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "fix_smd_setvel.h" +#include +#include #include "atom.h" #include "update.h" #include "modify.h" diff --git a/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp b/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp index a2813cc3ca..6aa23fe3b2 100644 --- a/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp +++ b/src/USER-SMD/fix_smd_tlsph_reference_configuration.cpp @@ -24,20 +24,16 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "fix_smd_tlsph_reference_configuration.h" #include -#include -#include #include -#include "fix_smd_tlsph_reference_configuration.h" #include "atom.h" #include "comm.h" -#include "neighbor.h" #include "neigh_list.h" #include "lattice.h" #include "force.h" #include "pair.h" #include "update.h" -#include "modify.h" #include "memory.h" #include "error.h" #include "domain.h" diff --git a/src/USER-SMD/fix_smd_tlsph_reference_configuration.h b/src/USER-SMD/fix_smd_tlsph_reference_configuration.h index 8549621c2f..5f952bde93 100644 --- a/src/USER-SMD/fix_smd_tlsph_reference_configuration.h +++ b/src/USER-SMD/fix_smd_tlsph_reference_configuration.h @@ -35,7 +35,6 @@ FixStyle(SMD_TLSPH_NEIGHBORS,FixSMD_TLSPH_ReferenceConfiguration) #define LMP_FIX_SMD_TLSPH_REFERENCE_H #include "fix.h" -#include "my_page.h" namespace LAMMPS_NS { diff --git a/src/USER-SMD/fix_smd_wall_surface.cpp b/src/USER-SMD/fix_smd_wall_surface.cpp index a37ba67a80..9183bcd9ea 100644 --- a/src/USER-SMD/fix_smd_wall_surface.cpp +++ b/src/USER-SMD/fix_smd_wall_surface.cpp @@ -15,21 +15,15 @@ Contributing authors: Mike Parks (SNL), Ezwanur Rahman, J.T. Foster (UTSA) ------------------------------------------------------------------------- */ -#include +#include "fix_smd_wall_surface.h" +#include #include -#include +#include #include -#include "fix_smd_wall_surface.h" #include "atom.h" #include "domain.h" #include "force.h" #include "comm.h" -#include "update.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" -#include "pair.h" -#include "lattice.h" #include "memory.h" #include "error.h" #include "atom_vec.h" diff --git a/src/USER-SMD/pair_smd_hertz.cpp b/src/USER-SMD/pair_smd_hertz.cpp index 541be9f05c..97be94d833 100644 --- a/src/USER-SMD/pair_smd_hertz.cpp +++ b/src/USER-SMD/pair_smd_hertz.cpp @@ -26,17 +26,14 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ +#include "pair_smd_hertz.h" +#include #include -#include #include #include -#include "pair_smd_hertz.h" #include "atom.h" #include "domain.h" #include "force.h" -#include "update.h" -#include "modify.h" -#include "fix.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-SMD/pair_smd_tlsph.cpp b/src/USER-SMD/pair_smd_tlsph.cpp index 1d7bbca780..0dff905962 100644 --- a/src/USER-SMD/pair_smd_tlsph.cpp +++ b/src/USER-SMD/pair_smd_tlsph.cpp @@ -22,15 +22,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_smd_tlsph.h" +#include #include -#include -#include #include -#include +#include #include -#include #include -#include "pair_smd_tlsph.h" #include "fix_smd_tlsph_reference_configuration.h" #include "atom.h" #include "domain.h" @@ -41,12 +39,9 @@ #include "fix.h" #include "comm.h" #include "neighbor.h" -#include "neigh_list.h" #include "neigh_request.h" #include "memory.h" #include "error.h" -#include "math_special.h" -#include "update.h" #include "smd_material_models.h" #include "smd_kernels.h" #include "smd_math.h" diff --git a/src/USER-SMD/pair_smd_triangulated_surface.cpp b/src/USER-SMD/pair_smd_triangulated_surface.cpp index d3a4983379..f9052be087 100644 --- a/src/USER-SMD/pair_smd_triangulated_surface.cpp +++ b/src/USER-SMD/pair_smd_triangulated_surface.cpp @@ -26,20 +26,15 @@ Contributing author: Mike Parks (SNL) ------------------------------------------------------------------------- */ +#include "pair_smd_triangulated_surface.h" +#include #include -#include #include #include -#include -#include #include -#include "pair_smd_triangulated_surface.h" #include "atom.h" #include "domain.h" #include "force.h" -#include "update.h" -#include "modify.h" -#include "fix.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-SMD/pair_smd_ulsph.cpp b/src/USER-SMD/pair_smd_ulsph.cpp index 2c4a2de989..9e824ded3c 100644 --- a/src/USER-SMD/pair_smd_ulsph.cpp +++ b/src/USER-SMD/pair_smd_ulsph.cpp @@ -22,19 +22,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "pair_smd_ulsph.h" #include -#include -#include #include -#include -#include -#include "pair_smd_ulsph.h" #include "atom.h" #include "domain.h" #include "force.h" #include "update.h" -#include "modify.h" -#include "fix.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" diff --git a/src/USER-SMD/smd_material_models.cpp b/src/USER-SMD/smd_material_models.cpp index 4213428872..5ee67fbb4e 100644 --- a/src/USER-SMD/smd_material_models.cpp +++ b/src/USER-SMD/smd_material_models.cpp @@ -21,6 +21,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ +#include "smd_material_models.h" +#include +#include +#include #include #include #include "math_special.h" -- GitLab From 1a0662c3860a68a38ee370812b069b58f8f7821d Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 10 Jul 2019 22:11:47 -0500 Subject: [PATCH 157/236] Some corrections and additions to kim_commands docs --- doc/src/kim_commands.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 437b768df6..1356ade9e2 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -35,7 +35,7 @@ kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657 kim_interactions C H O kim_init Sim_LAMMPS_IFF_OtherInfo_AuthorList_Year_Species__SM_064312669787_000 real kim_interactions fixed_types -kim_query a0 get_lattice_constant_fcc species=\["Al"] units=\["angstrom"\] :pre +kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\] :pre [Description:] @@ -105,12 +105,16 @@ The URL for such a page is constructed from the "extended KIM ID"_https://openkim.org/about-kim-ids/ of the IM: https://openkim.org/id/extended_KIM_ID +or +https://openkim.org/id/short_KIM_ID :pre For example for the Stillinger-Weber potential listed above the Model Page is located at: "https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005"_https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005 +or +"https://openkim.org/id/MO_405512056662_005"_https://openkim.org/id/MO_405512056662_005 :pre See the "current list of KIM PMs and SMs archived in OpenKIM"_https://openkim.org/browse/models/by-species. @@ -271,8 +275,8 @@ OpenKIM IM Execution ({kim_interactions}) :h5 The second and final step in using an OpenKIM IM is to execute the {kim_interactions} command. This command must be preceded by a {kim_init} -command and a "create_box"_create_box.html command, -which defines the number of atom types {N}. +command and a command that creates the simulation box (such as +"create_box"_create_box.html), which defines the number of atom types {N}. The {kim_interactions} command has one argument {typeargs}. This argument contains either a list of {N} chemical species, which defines a mapping between atom types in LAMMPS to the available species in the OpenKIM IM, or the @@ -338,7 +342,7 @@ Note also that parameters like cutoff radii and charge tolerances, which have an effect on IM predictions, are also included in the SM definition ensuring reproducibility. -NOTE: When using using {kim_init} and {kim_interactions} to select +NOTE: When using {kim_init} and {kim_interactions} to select and set up an OpenKIM IM, other LAMMPS commands for the same functions (such as pair_style, pair_coeff, bond_style, bond_coeff, fixes related to charge equilibration, etc.) should normally @@ -356,7 +360,7 @@ argument of the {kim_query command}. The second required argument (e.g. {get_lattice_constant_fcc}). All following arguments are parameters handed over to the web query in the format {keyword=value}. The list of supported keywords and -and the type and format of their values depend on the query function +the type and format of their values depend on the query function used. NOTE: The current list of supported query functions is available on the OpenKIM -- GitLab From d05787ab99994e3cb6533280265026e55679e8aa Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 07:16:53 -0400 Subject: [PATCH 158/236] clean up include in USER-REAXC --- src/USER-REAXC/compute_spec_atom.cpp | 8 +------- src/USER-REAXC/compute_spec_atom.h | 1 - src/USER-REAXC/fix_qeq_reax.cpp | 7 +++---- src/USER-REAXC/fix_reaxc.cpp | 2 -- src/USER-REAXC/fix_reaxc_bonds.cpp | 12 ++---------- src/USER-REAXC/fix_reaxc_bonds.h | 1 - src/USER-REAXC/fix_reaxc_species.cpp | 12 ++++-------- src/USER-REAXC/fix_reaxc_species.h | 5 ----- src/USER-REAXC/pair_reaxc.cpp | 9 ++++++--- src/USER-REAXC/reaxc_allocate.cpp | 7 +++---- src/USER-REAXC/reaxc_bond_orders.cpp | 6 ++++-- src/USER-REAXC/reaxc_bonds.cpp | 7 +++---- src/USER-REAXC/reaxc_control.cpp | 4 ++-- src/USER-REAXC/reaxc_ffield.cpp | 8 +++++--- src/USER-REAXC/reaxc_ffield.h | 1 + src/USER-REAXC/reaxc_forces.cpp | 9 +++------ src/USER-REAXC/reaxc_hydrogen_bonds.cpp | 5 +++-- src/USER-REAXC/reaxc_init_md.cpp | 9 +++++---- src/USER-REAXC/reaxc_init_md.h | 2 +- src/USER-REAXC/reaxc_io_tools.cpp | 10 +++------- src/USER-REAXC/reaxc_list.cpp | 2 +- src/USER-REAXC/reaxc_lookup.cpp | 5 +++-- src/USER-REAXC/reaxc_lookup.h | 6 ++++-- src/USER-REAXC/reaxc_multi_body.cpp | 8 ++++---- src/USER-REAXC/reaxc_nonbonded.cpp | 7 ++++--- src/USER-REAXC/reaxc_reset_tools.cpp | 4 ++-- src/USER-REAXC/reaxc_system_props.cpp | 6 ++---- src/USER-REAXC/reaxc_system_props.h | 1 + src/USER-REAXC/reaxc_tool_box.cpp | 6 ++++-- src/USER-REAXC/reaxc_tool_box.h | 2 +- src/USER-REAXC/reaxc_torsion_angles.cpp | 6 +++--- src/USER-REAXC/reaxc_traj.cpp | 8 +++++--- src/USER-REAXC/reaxc_valence_angles.cpp | 5 +++-- src/USER-REAXC/reaxc_vector.cpp | 4 ++-- src/USER-REAXC/reaxc_vector.h | 2 -- 35 files changed, 88 insertions(+), 109 deletions(-) diff --git a/src/USER-REAXC/compute_spec_atom.cpp b/src/USER-REAXC/compute_spec_atom.cpp index 77b82b3e55..bc5b26b699 100644 --- a/src/USER-REAXC/compute_spec_atom.cpp +++ b/src/USER-REAXC/compute_spec_atom.cpp @@ -11,19 +11,13 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "compute_spec_atom.h" -#include "math_extra.h" +#include #include "atom.h" #include "update.h" #include "force.h" -#include "domain.h" #include "memory.h" #include "error.h" - -#include "reaxc_defs.h" -#include "reaxc_types.h" #include "pair_reaxc.h" using namespace LAMMPS_NS; diff --git a/src/USER-REAXC/compute_spec_atom.h b/src/USER-REAXC/compute_spec_atom.h index 4d5cb86d71..cf0aa0215d 100644 --- a/src/USER-REAXC/compute_spec_atom.h +++ b/src/USER-REAXC/compute_spec_atom.h @@ -21,7 +21,6 @@ ComputeStyle(SPEC/ATOM,ComputeSpecAtom) #define LMP_COMPUTE_SPEC_ATOM_H #include "compute.h" -#include "pointers.h" namespace LAMMPS_NS { diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index faa0632608..be6eccf764 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -18,15 +18,13 @@ Hybrid and sub-group capabilities: Ray Shan (Sandia) ------------------------------------------------------------------------- */ +#include "fix_qeq_reax.h" +#include #include -#include -#include #include -#include "fix_qeq_reax.h" #include "pair_reaxc.h" #include "atom.h" #include "comm.h" -#include "domain.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" @@ -39,6 +37,7 @@ #include "citeme.h" #include "error.h" #include "reaxc_defs.h" +#include "reaxc_types.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-REAXC/fix_reaxc.cpp b/src/USER-REAXC/fix_reaxc.cpp index dc67ad6ffb..c98adf5b45 100644 --- a/src/USER-REAXC/fix_reaxc.cpp +++ b/src/USER-REAXC/fix_reaxc.cpp @@ -23,8 +23,6 @@ #include "fix_reaxc.h" #include "atom.h" -#include "pair.h" -#include "comm.h" #include "memory.h" using namespace LAMMPS_NS; diff --git a/src/USER-REAXC/fix_reaxc_bonds.cpp b/src/USER-REAXC/fix_reaxc_bonds.cpp index 9dc347826f..f7ad7ed6d4 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.cpp +++ b/src/USER-REAXC/fix_reaxc_bonds.cpp @@ -15,22 +15,14 @@ Contributing author: Ray Shan (Sandia, tnshan@sandia.gov) ------------------------------------------------------------------------- */ -#include -#include -#include "fix_ave_atom.h" #include "fix_reaxc_bonds.h" +#include +#include #include "atom.h" #include "update.h" #include "pair_reaxc.h" -#include "modify.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" -#include "comm.h" #include "force.h" -#include "compute.h" -#include "input.h" -#include "variable.h" #include "memory.h" #include "error.h" #include "reaxc_list.h" diff --git a/src/USER-REAXC/fix_reaxc_bonds.h b/src/USER-REAXC/fix_reaxc_bonds.h index 60f41beb02..e83e01f1d5 100644 --- a/src/USER-REAXC/fix_reaxc_bonds.h +++ b/src/USER-REAXC/fix_reaxc_bonds.h @@ -21,7 +21,6 @@ FixStyle(reax/c/bonds,FixReaxCBonds) #define LMP_FIX_REAXC_BONDS_H #include "fix.h" -#include "pointers.h" namespace LAMMPS_NS { diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index 46426d484a..74692f1c9b 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -16,27 +16,23 @@ Oleg Sergeev (VNIIA, sergeev@vniia.ru) ------------------------------------------------------------------------- */ +#include "fix_reaxc_species.h" +#include #include -#include #include #include "fix_ave_atom.h" -#include "fix_reaxc_species.h" #include "atom.h" #include "domain.h" #include "update.h" -#include "pair_reaxc.h" #include "modify.h" #include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "comm.h" #include "force.h" -#include "compute.h" -#include "input.h" -#include "variable.h" #include "memory.h" #include "error.h" -#include "reaxc_list.h" +#include "pair_reaxc.h" +#include "reaxc_defs.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-REAXC/fix_reaxc_species.h b/src/USER-REAXC/fix_reaxc_species.h index 23a470fd0a..937af98527 100644 --- a/src/USER-REAXC/fix_reaxc_species.h +++ b/src/USER-REAXC/fix_reaxc_species.h @@ -21,11 +21,6 @@ FixStyle(reax/c/species,FixReaxCSpecies) #define LMP_FIX_REAXC_SPECIES_H #include "fix.h" -#include "pointers.h" - -#include "pair_reaxc.h" -#include "reaxc_types.h" -#include "reaxc_defs.h" #define BUFLEN 1000 diff --git a/src/USER-REAXC/pair_reaxc.cpp b/src/USER-REAXC/pair_reaxc.cpp index 224f3e2568..959405576e 100644 --- a/src/USER-REAXC/pair_reaxc.cpp +++ b/src/USER-REAXC/pair_reaxc.cpp @@ -20,8 +20,12 @@ Hybrid and hybrid/overlay compatibility added by Ray Shan (Sandia) ------------------------------------------------------------------------- */ -#include #include "pair_reaxc.h" +#include +#include +#include +#include +#include #include "atom.h" #include "update.h" #include "force.h" @@ -36,6 +40,7 @@ #include "memory.h" #include "error.h" +#include "reaxc_defs.h" #include "reaxc_types.h" #include "reaxc_allocate.h" #include "reaxc_control.h" @@ -46,9 +51,7 @@ #include "reaxc_list.h" #include "reaxc_lookup.h" #include "reaxc_reset_tools.h" -#include "reaxc_traj.h" #include "reaxc_vector.h" -#include "fix_reaxc_bonds.h" using namespace LAMMPS_NS; diff --git a/src/USER-REAXC/reaxc_allocate.cpp b/src/USER-REAXC/reaxc_allocate.cpp index 460f8aeb6a..6303db5619 100644 --- a/src/USER-REAXC/reaxc_allocate.cpp +++ b/src/USER-REAXC/reaxc_allocate.cpp @@ -24,14 +24,13 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_allocate.h" +#include +#include "reaxc_defs.h" #include "reaxc_list.h" -#include "reaxc_reset_tools.h" #include "reaxc_tool_box.h" -#include "reaxc_vector.h" -#if defined(_OPENMP) +#if defined(LMP_USER_OMP) && defined(_OPENMP) #include #endif diff --git a/src/USER-REAXC/reaxc_bond_orders.cpp b/src/USER-REAXC/reaxc_bond_orders.cpp index 1ed58a0bfd..869e796661 100644 --- a/src/USER-REAXC/reaxc_bond_orders.cpp +++ b/src/USER-REAXC/reaxc_bond_orders.cpp @@ -24,9 +24,11 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" -#include "reaxc_types.h" #include "reaxc_bond_orders.h" +#include +#include "pair.h" +#include "reaxc_defs.h" +#include "reaxc_types.h" #include "reaxc_list.h" #include "reaxc_vector.h" diff --git a/src/USER-REAXC/reaxc_bonds.cpp b/src/USER-REAXC/reaxc_bonds.cpp index 48fb872324..4cfd2a3c3a 100644 --- a/src/USER-REAXC/reaxc_bonds.cpp +++ b/src/USER-REAXC/reaxc_bonds.cpp @@ -24,12 +24,11 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_bonds.h" -#include "reaxc_bond_orders.h" +#include +#include "pair.h" +#include "reaxc_defs.h" #include "reaxc_list.h" -#include "reaxc_tool_box.h" -#include "reaxc_vector.h" void Bonds( reax_system *system, control_params * /*control*/, simulation_data *data, storage *workspace, reax_list **lists, diff --git a/src/USER-REAXC/reaxc_control.cpp b/src/USER-REAXC/reaxc_control.cpp index 060c1a0342..12aa989fa2 100644 --- a/src/USER-REAXC/reaxc_control.cpp +++ b/src/USER-REAXC/reaxc_control.cpp @@ -24,10 +24,10 @@ . ----------------------------------------------------------------------*/ +#include "reaxc_control.h" #include #include -#include "pair_reaxc.h" -#include "reaxc_control.h" +#include "reaxc_defs.h" #include "reaxc_tool_box.h" #include "error.h" diff --git a/src/USER-REAXC/reaxc_ffield.cpp b/src/USER-REAXC/reaxc_ffield.cpp index 2160d180cf..e3a6645fc2 100644 --- a/src/USER-REAXC/reaxc_ffield.cpp +++ b/src/USER-REAXC/reaxc_ffield.cpp @@ -24,14 +24,16 @@ . ----------------------------------------------------------------------*/ +#include "reaxc_ffield.h" +#include +#include +#include #include #include -#include "pair_reaxc.h" +#include "reaxc_defs.h" #include "error.h" -#include "reaxc_ffield.h" #include "reaxc_tool_box.h" - char Read_Force_Field( FILE *fp, reax_interaction *reax, control_params *control ) { diff --git a/src/USER-REAXC/reaxc_ffield.h b/src/USER-REAXC/reaxc_ffield.h index 7cef730f91..b6fe1c9ea9 100644 --- a/src/USER-REAXC/reaxc_ffield.h +++ b/src/USER-REAXC/reaxc_ffield.h @@ -28,6 +28,7 @@ #define __FFIELD_H_ #include "reaxc_types.h" +#include char Read_Force_Field( FILE*, reax_interaction*, control_params* ); diff --git a/src/USER-REAXC/reaxc_forces.cpp b/src/USER-REAXC/reaxc_forces.cpp index 79094ece43..6cd627f05d 100644 --- a/src/USER-REAXC/reaxc_forces.cpp +++ b/src/USER-REAXC/reaxc_forces.cpp @@ -24,25 +24,22 @@ . ----------------------------------------------------------------------*/ -#include -#include "pair_reaxc.h" #include "reaxc_forces.h" +#include +#include +#include #include "reaxc_bond_orders.h" #include "reaxc_bonds.h" #include "reaxc_hydrogen_bonds.h" -#include "reaxc_io_tools.h" #include "reaxc_list.h" -#include "reaxc_lookup.h" #include "reaxc_multi_body.h" #include "reaxc_nonbonded.h" -#include "reaxc_tool_box.h" #include "reaxc_torsion_angles.h" #include "reaxc_valence_angles.h" #include "reaxc_vector.h" #include "error.h" - interaction_function Interaction_Functions[NUM_INTRS]; void Dummy_Interaction( reax_system * /*system*/, control_params * /*control*/, diff --git a/src/USER-REAXC/reaxc_hydrogen_bonds.cpp b/src/USER-REAXC/reaxc_hydrogen_bonds.cpp index be34df7571..5929703bad 100644 --- a/src/USER-REAXC/reaxc_hydrogen_bonds.cpp +++ b/src/USER-REAXC/reaxc_hydrogen_bonds.cpp @@ -24,9 +24,10 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_hydrogen_bonds.h" -#include "reaxc_bond_orders.h" +#include +#include "pair.h" +#include "reaxc_defs.h" #include "reaxc_list.h" #include "reaxc_valence_angles.h" #include "reaxc_vector.h" diff --git a/src/USER-REAXC/reaxc_init_md.cpp b/src/USER-REAXC/reaxc_init_md.cpp index a0e15e98f5..966ad78c34 100644 --- a/src/USER-REAXC/reaxc_init_md.cpp +++ b/src/USER-REAXC/reaxc_init_md.cpp @@ -24,18 +24,19 @@ . ----------------------------------------------------------------------*/ -#include -#include "pair_reaxc.h" #include "reaxc_init_md.h" +#include +#include +#include +#include +#include "reaxc_defs.h" #include "reaxc_allocate.h" #include "reaxc_forces.h" #include "reaxc_io_tools.h" #include "reaxc_list.h" #include "reaxc_lookup.h" #include "reaxc_reset_tools.h" -#include "reaxc_system_props.h" #include "reaxc_tool_box.h" -#include "reaxc_vector.h" #include "error.h" diff --git a/src/USER-REAXC/reaxc_init_md.h b/src/USER-REAXC/reaxc_init_md.h index ab519a4c72..5d593f50ea 100644 --- a/src/USER-REAXC/reaxc_init_md.h +++ b/src/USER-REAXC/reaxc_init_md.h @@ -28,7 +28,7 @@ #define __INIT_MD_H_ #include "reaxc_types.h" - +#include void Initialize( reax_system*, control_params*, simulation_data*, storage*, reax_list**, output_controls*, mpi_datatypes*, MPI_Comm ); diff --git a/src/USER-REAXC/reaxc_io_tools.cpp b/src/USER-REAXC/reaxc_io_tools.cpp index f4a1486c48..f68a2a2abb 100644 --- a/src/USER-REAXC/reaxc_io_tools.cpp +++ b/src/USER-REAXC/reaxc_io_tools.cpp @@ -24,16 +24,12 @@ . ----------------------------------------------------------------------*/ -#include -#include "pair_reaxc.h" -#include "update.h" #include "reaxc_io_tools.h" -#include "reaxc_list.h" -#include "reaxc_reset_tools.h" +#include +#include +#include "reaxc_defs.h" #include "reaxc_system_props.h" -#include "reaxc_tool_box.h" #include "reaxc_traj.h" -#include "reaxc_vector.h" int Init_Output_Files( reax_system *system, control_params *control, output_controls *out_control, mpi_datatypes *mpi_data, diff --git a/src/USER-REAXC/reaxc_list.cpp b/src/USER-REAXC/reaxc_list.cpp index cd4f815286..53bd05bc8d 100644 --- a/src/USER-REAXC/reaxc_list.cpp +++ b/src/USER-REAXC/reaxc_list.cpp @@ -24,8 +24,8 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_list.h" +#include "reaxc_defs.h" #include "reaxc_tool_box.h" #include "error.h" diff --git a/src/USER-REAXC/reaxc_lookup.cpp b/src/USER-REAXC/reaxc_lookup.cpp index 8d33a33fba..622483fdc9 100644 --- a/src/USER-REAXC/reaxc_lookup.cpp +++ b/src/USER-REAXC/reaxc_lookup.cpp @@ -24,12 +24,13 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_lookup.h" +#include +#include +#include "reaxc_defs.h" #include "reaxc_nonbonded.h" #include "reaxc_tool_box.h" - void Tridiagonal_Solve( const double *a, const double *b, double *c, double *d, double *x, unsigned int n){ int i; diff --git a/src/USER-REAXC/reaxc_lookup.h b/src/USER-REAXC/reaxc_lookup.h index 3fd0c2581a..3aae7e0b63 100644 --- a/src/USER-REAXC/reaxc_lookup.h +++ b/src/USER-REAXC/reaxc_lookup.h @@ -28,6 +28,7 @@ #define __LOOKUP_H_ #include "reaxc_types.h" +namespace LAMMPS_NS { class Error; } void Tridiagonal_Solve( const double *a, const double *b, double *c, double *d, double *x, unsigned int n); @@ -35,8 +36,9 @@ void Tridiagonal_Solve( const double *a, const double *b, void Natural_Cubic_Spline( LAMMPS_NS::Error*, const double *h, const double *f, cubic_spline_coef *coef, unsigned int n ); -void Complete_Cubic_Spline( LAMMPS_NS::Error*, const double *h, const double *f, double v0, double vlast, - cubic_spline_coef *coef, unsigned int n ); +void Complete_Cubic_Spline( LAMMPS_NS::Error*, const double *h, const double *f, + double v0, double vlast, cubic_spline_coef *coef, + unsigned int n ); int Init_Lookup_Tables( reax_system*, control_params*, storage*, mpi_datatypes*, char* ); diff --git a/src/USER-REAXC/reaxc_multi_body.cpp b/src/USER-REAXC/reaxc_multi_body.cpp index 371b8ed65e..ed1a3d5ac1 100644 --- a/src/USER-REAXC/reaxc_multi_body.cpp +++ b/src/USER-REAXC/reaxc_multi_body.cpp @@ -24,12 +24,12 @@ . ----------------------------------------------------------------------*/ -#include -#include "pair_reaxc.h" #include "reaxc_multi_body.h" -#include "reaxc_bond_orders.h" +#include +#include +#include "pair.h" +#include "reaxc_defs.h" #include "reaxc_list.h" -#include "reaxc_vector.h" void Atom_Energy( reax_system *system, control_params *control, simulation_data *data, storage *workspace, reax_list **lists, diff --git a/src/USER-REAXC/reaxc_nonbonded.cpp b/src/USER-REAXC/reaxc_nonbonded.cpp index b0fea8c1b9..497a1a0ebe 100644 --- a/src/USER-REAXC/reaxc_nonbonded.cpp +++ b/src/USER-REAXC/reaxc_nonbonded.cpp @@ -24,10 +24,11 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" -#include "reaxc_types.h" #include "reaxc_nonbonded.h" -#include "reaxc_bond_orders.h" +#include +#include "pair.h" +#include "reaxc_defs.h" +#include "reaxc_types.h" #include "reaxc_list.h" #include "reaxc_vector.h" diff --git a/src/USER-REAXC/reaxc_reset_tools.cpp b/src/USER-REAXC/reaxc_reset_tools.cpp index c72ccbadcd..91b1a9e14f 100644 --- a/src/USER-REAXC/reaxc_reset_tools.cpp +++ b/src/USER-REAXC/reaxc_reset_tools.cpp @@ -24,9 +24,9 @@ . ----------------------------------------------------------------------*/ -#include -#include "pair_reaxc.h" #include "reaxc_reset_tools.h" +#include +#include "reaxc_defs.h" #include "reaxc_list.h" #include "reaxc_tool_box.h" #include "reaxc_vector.h" diff --git a/src/USER-REAXC/reaxc_system_props.cpp b/src/USER-REAXC/reaxc_system_props.cpp index 5024feffcf..166f070be6 100644 --- a/src/USER-REAXC/reaxc_system_props.cpp +++ b/src/USER-REAXC/reaxc_system_props.cpp @@ -24,11 +24,9 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_system_props.h" -#include "reaxc_tool_box.h" -#include "reaxc_vector.h" - +#include +#include "reaxc_defs.h" void Compute_System_Energy( reax_system *system, simulation_data *data, MPI_Comm comm ) diff --git a/src/USER-REAXC/reaxc_system_props.h b/src/USER-REAXC/reaxc_system_props.h index 161060e184..4d80e22966 100644 --- a/src/USER-REAXC/reaxc_system_props.h +++ b/src/USER-REAXC/reaxc_system_props.h @@ -28,6 +28,7 @@ #define __SYSTEM_PROP_H_ #include "reaxc_types.h" +#include void Compute_System_Energy( reax_system*, simulation_data*, MPI_Comm ); diff --git a/src/USER-REAXC/reaxc_tool_box.cpp b/src/USER-REAXC/reaxc_tool_box.cpp index 2cf66d8655..811c2ed0ee 100644 --- a/src/USER-REAXC/reaxc_tool_box.cpp +++ b/src/USER-REAXC/reaxc_tool_box.cpp @@ -24,9 +24,11 @@ . ----------------------------------------------------------------------*/ -#include -#include "pair_reaxc.h" #include "reaxc_tool_box.h" +#include +#include +#include +#include "reaxc_defs.h" #if !defined(_MSC_VER) #include diff --git a/src/USER-REAXC/reaxc_tool_box.h b/src/USER-REAXC/reaxc_tool_box.h index 0465376dba..b325819265 100644 --- a/src/USER-REAXC/reaxc_tool_box.h +++ b/src/USER-REAXC/reaxc_tool_box.h @@ -28,7 +28,7 @@ #define __TOOL_BOX_H_ #include "reaxc_types.h" -#include "reaxc_defs.h" +namespace LAMMPS_NS { class Error; } /* from system_props.h */ double Get_Time( ); diff --git a/src/USER-REAXC/reaxc_torsion_angles.cpp b/src/USER-REAXC/reaxc_torsion_angles.cpp index ed76368d68..ce944b217f 100644 --- a/src/USER-REAXC/reaxc_torsion_angles.cpp +++ b/src/USER-REAXC/reaxc_torsion_angles.cpp @@ -24,11 +24,11 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_torsion_angles.h" -#include "reaxc_bond_orders.h" +#include +#include "pair.h" +#include "reaxc_defs.h" #include "reaxc_list.h" -#include "reaxc_tool_box.h" #include "reaxc_vector.h" #define MIN_SINE 1e-10 diff --git a/src/USER-REAXC/reaxc_traj.cpp b/src/USER-REAXC/reaxc_traj.cpp index a536445113..fb493feae5 100644 --- a/src/USER-REAXC/reaxc_traj.cpp +++ b/src/USER-REAXC/reaxc_traj.cpp @@ -24,11 +24,13 @@ . ----------------------------------------------------------------------*/ -#include -#include "pair_reaxc.h" #include "reaxc_traj.h" +#include +#include +#include +#include +#include "reaxc_defs.h" #include "reaxc_list.h" -#include "reaxc_tool_box.h" #include "error.h" diff --git a/src/USER-REAXC/reaxc_valence_angles.cpp b/src/USER-REAXC/reaxc_valence_angles.cpp index 4ba870b6d9..560955fa9d 100644 --- a/src/USER-REAXC/reaxc_valence_angles.cpp +++ b/src/USER-REAXC/reaxc_valence_angles.cpp @@ -24,9 +24,10 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_valence_angles.h" -#include "reaxc_bond_orders.h" +#include +#include "pair.h" +#include "reaxc_defs.h" #include "reaxc_list.h" #include "reaxc_vector.h" diff --git a/src/USER-REAXC/reaxc_vector.cpp b/src/USER-REAXC/reaxc_vector.cpp index b54d329ce9..207d745df3 100644 --- a/src/USER-REAXC/reaxc_vector.cpp +++ b/src/USER-REAXC/reaxc_vector.cpp @@ -24,9 +24,9 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc.h" #include "reaxc_vector.h" - +#include +#include "reaxc_defs.h" void rvec_Copy( rvec dest, rvec src ) { diff --git a/src/USER-REAXC/reaxc_vector.h b/src/USER-REAXC/reaxc_vector.h index 906b200dc9..549c1f927c 100644 --- a/src/USER-REAXC/reaxc_vector.h +++ b/src/USER-REAXC/reaxc_vector.h @@ -27,9 +27,7 @@ #ifndef __VECTOR_H_ #define __VECTOR_H_ -#include "pair.h" #include "reaxc_types.h" -#include "reaxc_defs.h" void rvec_Copy( rvec, rvec ); void rvec_Scale( rvec, double, rvec ); -- GitLab From ca4b26ddf8e0c0a6f7060387c999b21c3f13c9db Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 07:22:41 -0400 Subject: [PATCH 159/236] fix up some leftover include issues that got overlooked in previous changes --- src/USER-PTM/ptm_structure_matcher.cpp | 8 ++------ src/USER-PTM/ptm_structure_matcher.h | 2 +- src/USER-QTB/fix_qbmsst.cpp | 11 +---------- src/USER-QTB/fix_qtb.cpp | 9 +-------- src/USER-SDPD/fix_meso_move.cpp | 3 +-- src/USER-SDPD/fix_rigid_meso.cpp | 7 ------- src/USER-SMD/pair_smd_ulsph.cpp | 3 +++ src/USER-UEF/dump_cfg_uef.cpp | 1 - src/USER-YAFF/angle_cross.cpp | 1 + src/USER-YAFF/angle_mm3.cpp | 2 +- 10 files changed, 11 insertions(+), 36 deletions(-) diff --git a/src/USER-PTM/ptm_structure_matcher.cpp b/src/USER-PTM/ptm_structure_matcher.cpp index d50676a3c1..b587ad225f 100644 --- a/src/USER-PTM/ptm_structure_matcher.cpp +++ b/src/USER-PTM/ptm_structure_matcher.cpp @@ -7,20 +7,16 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include -#include +#include "ptm_structure_matcher.h" #include #include -#include -#include -#include +#include #include "ptm_convex_hull_incremental.h" #include "ptm_canonical_coloured.h" #include "ptm_graph_data.h" #include "ptm_graph_tools.h" #include "ptm_normalize_vertices.h" #include "ptm_polar.h" -#include "ptm_structure_matcher.h" #include "ptm_constants.h" diff --git a/src/USER-PTM/ptm_structure_matcher.h b/src/USER-PTM/ptm_structure_matcher.h index e75892f8cb..63bc5ed1fe 100644 --- a/src/USER-PTM/ptm_structure_matcher.h +++ b/src/USER-PTM/ptm_structure_matcher.h @@ -12,7 +12,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include "ptm_initialize_data.h" #include "ptm_constants.h" - +#include "ptm_convex_hull_incremental.h" namespace ptm { diff --git a/src/USER-QTB/fix_qbmsst.cpp b/src/USER-QTB/fix_qbmsst.cpp index b9b07664d2..abbf1701b8 100644 --- a/src/USER-QTB/fix_qbmsst.cpp +++ b/src/USER-QTB/fix_qbmsst.cpp @@ -16,31 +16,22 @@ Implementation of the Multi-Scale Shock Method with quantum nuclear effects ------------------------------------------------------------------------- */ +#include "fix_qbmsst.h" #include #include #include #include -#include "fix_qbmsst.h" -#include "math_extra.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "force.h" #include "update.h" #include "modify.h" #include "compute.h" #include "domain.h" -#include "region.h" -#include "respa.h" #include "comm.h" -#include "input.h" -#include "output.h" -#include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" -#include "group.h" #include "kspace.h" -#include "thermo.h" #include "utils.h" using namespace LAMMPS_NS; diff --git a/src/USER-QTB/fix_qtb.cpp b/src/USER-QTB/fix_qtb.cpp index 015f953b8e..593ca31006 100644 --- a/src/USER-QTB/fix_qtb.cpp +++ b/src/USER-QTB/fix_qtb.cpp @@ -16,28 +16,21 @@ Implementation of the colored thermostat for quantum nuclear effects ------------------------------------------------------------------------- */ +#include "fix_qtb.h" #include #include #include #include -#include "fix_qtb.h" -#include "math_extra.h" #include "atom.h" -#include "atom_vec_ellipsoid.h" #include "force.h" #include "update.h" #include "modify.h" #include "compute.h" -#include "domain.h" -#include "region.h" #include "respa.h" #include "comm.h" -#include "input.h" -#include "variable.h" #include "random_mars.h" #include "memory.h" #include "error.h" -#include "group.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-SDPD/fix_meso_move.cpp b/src/USER-SDPD/fix_meso_move.cpp index 85b08a2af7..176cd8b895 100644 --- a/src/USER-SDPD/fix_meso_move.cpp +++ b/src/USER-SDPD/fix_meso_move.cpp @@ -16,11 +16,10 @@ Morteza Jalalvand (IASBS) jalalvand.m AT gmail.com ------------------------------------------------------------------------- */ +#include "fix_meso_move.h" #include #include -#include "fix_meso_move.h" #include "atom.h" -#include "group.h" #include "update.h" #include "modify.h" #include "force.h" diff --git a/src/USER-SDPD/fix_rigid_meso.cpp b/src/USER-SDPD/fix_rigid_meso.cpp index 49c9ca8614..e93c543e72 100644 --- a/src/USER-SDPD/fix_rigid_meso.cpp +++ b/src/USER-SDPD/fix_rigid_meso.cpp @@ -27,17 +27,10 @@ and all codes relevant to that has been removed ------------------------------------------------------------------------- */ -#include #include "fix_rigid_meso.h" #include "math_extra.h" #include "atom.h" -#include "compute.h" #include "domain.h" -#include "update.h" -#include "modify.h" -#include "group.h" -#include "force.h" -#include "output.h" #include "memory.h" #include "error.h" diff --git a/src/USER-SMD/pair_smd_ulsph.cpp b/src/USER-SMD/pair_smd_ulsph.cpp index 9e824ded3c..b53eb779de 100644 --- a/src/USER-SMD/pair_smd_ulsph.cpp +++ b/src/USER-SMD/pair_smd_ulsph.cpp @@ -23,8 +23,11 @@ ------------------------------------------------------------------------- */ #include "pair_smd_ulsph.h" +#include #include #include +#include +#include #include "atom.h" #include "domain.h" #include "force.h" diff --git a/src/USER-UEF/dump_cfg_uef.cpp b/src/USER-UEF/dump_cfg_uef.cpp index 5e3733f422..8e6268eee6 100644 --- a/src/USER-UEF/dump_cfg_uef.cpp +++ b/src/USER-UEF/dump_cfg_uef.cpp @@ -14,7 +14,6 @@ ------------------------------------------------------------------------- */ #include "dump_cfg.h" -#include #include #include "atom.h" #include "modify.h" diff --git a/src/USER-YAFF/angle_cross.cpp b/src/USER-YAFF/angle_cross.cpp index 2ebb08f56b..0f8861cdf5 100644 --- a/src/USER-YAFF/angle_cross.cpp +++ b/src/USER-YAFF/angle_cross.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "angle_cross.h" +#include #include #include "atom.h" #include "neighbor.h" diff --git a/src/USER-YAFF/angle_mm3.cpp b/src/USER-YAFF/angle_mm3.cpp index 24ce8229ba..b90db37afa 100644 --- a/src/USER-YAFF/angle_mm3.cpp +++ b/src/USER-YAFF/angle_mm3.cpp @@ -16,8 +16,8 @@ ------------------------------------------------------------------------- */ #include "angle_mm3.h" +#include #include -#include #include "atom.h" #include "neighbor.h" #include "domain.h" -- GitLab From 01524d9850ab0896adb905d8c64d6b72a99cf1de Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 08:13:03 -0400 Subject: [PATCH 160/236] recover compilation of USER-OMP --- src/USER-OMP/reaxc_bond_orders_omp.cpp | 3 ++- src/USER-OMP/reaxc_bonds_omp.cpp | 5 +++-- src/USER-OMP/reaxc_forces_omp.cpp | 3 ++- src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 4 ++-- src/USER-OMP/reaxc_init_md_omp.cpp | 3 ++- src/USER-OMP/reaxc_multi_body_omp.cpp | 3 ++- src/USER-OMP/reaxc_nonbonded_omp.cpp | 1 + src/USER-OMP/reaxc_torsion_angles_omp.cpp | 3 ++- src/USER-OMP/reaxc_valence_angles_omp.cpp | 3 ++- 9 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index 33780f5e3f..17715c6e26 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -26,9 +26,10 @@ . ----------------------------------------------------------------------*/ +#include "reaxc_bond_orders_omp.h" +#include "reaxc_defs.h" #include "pair_reaxc_omp.h" #include "reaxc_types.h" -#include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_vector.h" diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index 5160c6f55d..12ba1dcbfe 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -26,10 +26,11 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc_omp.h" - #include "reaxc_bonds_omp.h" +#include "reaxc_defs.h" #include "reaxc_bond_orders_omp.h" +#include "pair_reaxc_omp.h" + #include "reaxc_list.h" #include "reaxc_tool_box.h" #include "reaxc_vector.h" diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp index 0a08bd6a46..1ada5e7e71 100644 --- a/src/USER-OMP/reaxc_forces_omp.cpp +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -26,10 +26,11 @@ . ----------------------------------------------------------------------*/ +#include "reaxc_forces_omp.h" +#include "reaxc_defs.h" #include "pair_reaxc_omp.h" #include "thr_data.h" -#include "reaxc_forces_omp.h" #include "reaxc_bond_orders_omp.h" #include "reaxc_bonds_omp.h" #include "reaxc_hydrogen_bonds_omp.h" diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp index 7acf26262e..e3c034a12e 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -26,9 +26,9 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc_omp.h" - #include "reaxc_hydrogen_bonds_omp.h" +#include "pair_reaxc_omp.h" +#include "reaxc_defs.h" #include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_valence_angles.h" // To access Calculate_Theta() diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index fe7682d035..847e916666 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -26,8 +26,9 @@ . ----------------------------------------------------------------------*/ -#include "pair_reaxc_omp.h" #include "reaxc_init_md_omp.h" +#include "pair_reaxc_omp.h" +#include "reaxc_defs.h" #include "reaxc_allocate.h" #include "reaxc_forces.h" #include "reaxc_forces_omp.h" diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index d791f945a8..164999b986 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -26,11 +26,12 @@ . ----------------------------------------------------------------------*/ +#include "reaxc_multi_body_omp.h" #include #include "pair_reaxc_omp.h" #include "thr_data.h" +#include "reaxc_defs.h" -#include "reaxc_multi_body_omp.h" #include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_vector.h" diff --git a/src/USER-OMP/reaxc_nonbonded_omp.cpp b/src/USER-OMP/reaxc_nonbonded_omp.cpp index ea92e0c210..564088880a 100644 --- a/src/USER-OMP/reaxc_nonbonded_omp.cpp +++ b/src/USER-OMP/reaxc_nonbonded_omp.cpp @@ -29,6 +29,7 @@ #include "pair_reaxc_omp.h" #include "thr_data.h" +#include "reaxc_defs.h" #include "reaxc_types.h" #include "reaxc_nonbonded.h" diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index d290dc264f..9cd716b594 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -26,11 +26,12 @@ . ----------------------------------------------------------------------*/ +#include "reaxc_torsion_angles_omp.h" #include "pair_reaxc_omp.h" #include "thr_data.h" +#include "reaxc_defs.h" #include "reaxc_types.h" -#include "reaxc_torsion_angles_omp.h" #include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_tool_box.h" diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index 195f16a75d..7fbe87d6e5 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -26,12 +26,13 @@ . ----------------------------------------------------------------------*/ +#include "reaxc_valence_angles_omp.h" #include "pair_reaxc_omp.h" #include "thr_data.h" +#include "reaxc_defs.h" #include "reaxc_types.h" #include "reaxc_valence_angles.h" -#include "reaxc_valence_angles_omp.h" #include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_vector.h" -- GitLab From b5fea1f4a7528776cf1944508b7ce445c97e0217 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 09:19:26 -0400 Subject: [PATCH 161/236] no need to zero out Ec_meam twice --- src/USER-MEAMC/meam_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USER-MEAMC/meam_impl.cpp b/src/USER-MEAMC/meam_impl.cpp index 3b40a2b612..74e8af1cde 100644 --- a/src/USER-MEAMC/meam_impl.cpp +++ b/src/USER-MEAMC/meam_impl.cpp @@ -44,7 +44,7 @@ MEAM::MEAM(Memory* mem) rho_ref_meam[i] = ibar_meam[i] = ielt_meam[i] = 0.0; for (int j = 0; j < maxelt; j++) { lattce_meam[i][j] = FCC; - Ec_meam[i][j] = re_meam[i][j] = alpha_meam[i][j] = delta_meam[i][j] = Ec_meam[i][j] = ebound_meam[i][j] = attrac_meam[i][j] = repuls_meam[i][j] = 0.0; + Ec_meam[i][j] = re_meam[i][j] = alpha_meam[i][j] = delta_meam[i][j] = ebound_meam[i][j] = attrac_meam[i][j] = repuls_meam[i][j] = 0.0; nn2_meam[i][j] = zbl_meam[i][j] = eltind[i][j] = 0; } } -- GitLab From b1f8c3f38acd9490fe4a17977428c31d20558e00 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 11:25:44 -0400 Subject: [PATCH 162/236] silence some compiler warnings --- src/MANYBODY/pair_airebo.cpp | 161 ++++++++++++++++++----------------- 1 file changed, 81 insertions(+), 80 deletions(-) diff --git a/src/MANYBODY/pair_airebo.cpp b/src/MANYBODY/pair_airebo.cpp index 818663222f..fcc3a3efd2 100644 --- a/src/MANYBODY/pair_airebo.cpp +++ b/src/MANYBODY/pair_airebo.cpp @@ -3193,6 +3193,7 @@ double PairAIREBO::piRCSpline(double Nij, double Nji, double Nijconj, dN3[0]=0.0; dN3[1]=0.0; dN3[2]=0.0; + piRC=0.0; if (typei==0 && typej==0) { @@ -4343,70 +4344,70 @@ void PairAIREBO::Sptricubic_patch_coeffs( ) { const double C_inv[64][32] = { // output_matrix(2, 8*4, get_matrix(3)) - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0, - 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 3, 0, 0, 0, 0, 0, - 9, -9, -9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, -6, 3, -3, 0, 0, 0, 0, 6, 3, -6, -3, 0, 0, 0, 0, - -6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 4, -2, 2, 0, 0, 0, 0, -3, -3, 3, 3, 0, 0, 0, 0, - 2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0, - -6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, -3, 3, 0, 0, 0, 0, -4, -2, 4, 2, 0, 0, 0, 0, - 4, -4, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 2, -2, 0, 0, 0, 0, 2, 2, -2, -2, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 9, -9, -9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 4, -4, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -3, 0, 0, 0, 3, 0, 0, 0, -2, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 3, 0, 0, 0, - 9, -9, 0, 0, -9, 9, 0, 0, 6, -6, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0, 0, -6, -3, 0, 0, - -6, 6, 0, 0, 6, -6, 0, 0, -4, 4, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -3, 0, 0, 3, 3, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, -9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 9, 0, -9, 0, -9, 0, 9, 0, 6, 0, -6, 0, 3, 0, -3, 0, 6, 0, 3, 0, -6, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, -9, 0, -9, 0, 9, 0, - -27, 27, 27,-27, 27,-27,-27, 27,-18, 18, 18,-18, -9, 9, 9, -9,-18, 18, -9, 9, 18,-18, 9, -9,-18, -9, 18, 9, 18, 9,-18, -9, - 18,-18,-18, 18,-18, 18, 18,-18, 12,-12,-12, 12, 6, -6, -6, 6, 12,-12, 6, -6,-12, 12, -6, 6, 9, 9, -9, -9, -9, -9, 9, 9, - -6, 0, 6, 0, 6, 0, -6, 0, -4, 0, 4, 0, -2, 0, 2, 0, -3, 0, -3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 0, 6, 0, 6, 0, -6, 0, - 18,-18,-18, 18,-18, 18, 18,-18, 12,-12,-12, 12, 6, -6, -6, 6, 9, -9, 9, -9, -9, 9, -9, 9, 12, 6,-12, -6,-12, -6, 12, 6, - -12, 12, 12,-12, 12,-12,-12, 12, -8, 8, 8, -8, -4, 4, 4, -4, -6, 6, -6, 6, 6, -6, 6, -6, -6, -6, 6, 6, 6, 6, -6, -6, - 2, 0, 0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, -2, 0, 0, 0, - -6, 6, 0, 0, 6, -6, 0, 0, -3, 3, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -2, 0, 0, 4, 2, 0, 0, - 4, -4, 0, 0, -4, 4, 0, 0, 2, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, -2, -2, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - -6, 0, 6, 0, 6, 0, -6, 0, -3, 0, 3, 0, -3, 0, 3, 0, -4, 0, -2, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 0, 6, 0, 6, 0, -6, 0, - 18,-18,-18, 18,-18, 18, 18,-18, 9, -9, -9, 9, 9, -9, -9, 9, 12,-12, 6, -6,-12, 12, -6, 6, 12, 6,-12, -6,-12, -6, 12, 6, - -12, 12, 12,-12, 12,-12,-12, 12, -6, 6, 6, -6, -6, 6, 6, -6, -8, 8, -4, 4, 8, -8, 4, -4, -6, -6, 6, 6, 6, 6, -6, -6, - 4, 0, -4, 0, -4, 0, 4, 0, 2, 0, -2, 0, 2, 0, -2, 0, 2, 0, 2, 0, -2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -4, 0, -4, 0, 4, 0, - -12, 12, 12,-12, 12,-12,-12, 12, -6, 6, 6, -6, -6, 6, 6, -6, -6, 6, -6, 6, 6, -6, 6, -6, -8, -4, 8, 4, 8, 4, -8, -4, - 8, -8, -8, 8, -8, 8, 8, -8, 4, -4, -4, 4, 4, -4, -4, 4, 4, -4, 4, -4, -4, 4, -4, 4, 4, 4, -4, -4, -4, -4, 4, 4, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + {-3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, 0, 0, 0, 0, 0, 0}, + { 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {-3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 3, 0, 0, 0, 0, 0}, + { 9, -9, -9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, -6, 3, -3, 0, 0, 0, 0, 6, 3, -6, -3, 0, 0, 0, 0}, + {-6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, 4, -2, 2, 0, 0, 0, 0, -3, -3, 3, 3, 0, 0, 0, 0}, + { 2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0}, + {-6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, -3, 3, 0, 0, 0, 0, -4, -2, 4, 2, 0, 0, 0, 0}, + { 4, -4, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 2, -2, 0, 0, 0, 0, 2, 2, -2, -2, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 9, -9, -9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 4, -4, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {-3, 0, 0, 0, 3, 0, 0, 0, -2, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 3, 0, 0, 0}, + { 9, -9, 0, 0, -9, 9, 0, 0, 6, -6, 0, 0, 3, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0, 0, -6, -3, 0, 0}, + {-6, 6, 0, 0, 6, -6, 0, 0, -4, 4, 0, 0, -2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, -3, 0, 0, 3, 3, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -3, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, -9, 0, 0, -9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 9, 0, -9, 0, -9, 0, 9, 0, 6, 0, -6, 0, 3, 0, -3, 0, 6, 0, 3, 0, -6, 0, -3, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, -9, 0, -9, 0, 9, 0}, + {-27,27, 27,-27, 27,-27,-27, 27,-18, 18, 18,-18, -9, 9, 9, -9,-18, 18, -9, 9, 18,-18, 9, -9,-18, -9, 18, 9, 18, 9,-18, -9}, + {18,-18,-18, 18,-18, 18, 18,-18, 12,-12,-12, 12, 6, -6, -6, 6, 12,-12, 6, -6,-12, 12, -6, 6, 9, 9, -9, -9, -9, -9, 9, 9}, + {-6, 0, 6, 0, 6, 0, -6, 0, -4, 0, 4, 0, -2, 0, 2, 0, -3, 0, -3, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 0, 6, 0, 6, 0, -6, 0}, + {18,-18,-18, 18,-18, 18, 18,-18, 12,-12,-12, 12, 6, -6, -6, 6, 9, -9, 9, -9, -9, 9, -9, 9, 12, 6,-12, -6,-12, -6, 12, 6}, + {-12,12, 12,-12, 12,-12,-12, 12, -8, 8, 8, -8, -4, 4, 4, -4, -6, 6, -6, 6, 6, -6, 6, -6, -6, -6, 6, 6, 6, 6, -6, -6}, + { 2, 0, 0, 0, -2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, -2, 0, 0, 0}, + {-6, 6, 0, 0, 6, -6, 0, 0, -3, 3, 0, 0, -3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -4, -2, 0, 0, 4, 2, 0, 0}, + { 4, -4, 0, 0, -4, 4, 0, 0, 2, -2, 0, 0, 2, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, -2, -2, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 6, 0, 0, 6, -6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, -4, 0, 0, -4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + {-6, 0, 6, 0, 6, 0, -6, 0, -3, 0, 3, 0, -3, 0, 3, 0, -4, 0, -2, 0, 4, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -6, 0, 6, 0, 6, 0, -6, 0}, + {18,-18,-18, 18,-18, 18, 18,-18, 9, -9, -9, 9, 9, -9, -9, 9, 12,-12, 6, -6,-12, 12, -6, 6, 12, 6,-12, -6,-12, -6, 12, 6}, + {-12,12, 12,-12, 12,-12,-12, 12, -6, 6, 6, -6, -6, 6, 6, -6, -8, 8, -4, 4, 8, -8, 4, -4, -6, -6, 6, 6, 6, 6, -6, -6}, + { 4, 0, -4, 0, -4, 0, 4, 0, 2, 0, -2, 0, 2, 0, -2, 0, 2, 0, 2, 0, -2, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, -4, 0, -4, 0, 4, 0}, + {-12,12, 12,-12, 12,-12,-12, 12, -6, 6, 6, -6, -6, 6, 6, -6, -6, 6, -6, 6, 6, -6, 6, -6, -8, -4, 8, 4, 8, 4, -8, -4}, + { 8, -8, -8, 8, -8, 8, 8, -8, 4, -4, -4, 4, 4, -4, -4, 4, 4, -4, 4, -4, -4, 4, -4, 4, 4, 4, -4, -4, -4, -4, 4, 4} }; double dx = xmax - xmin; double dy = ymax - ymin; @@ -4456,22 +4457,22 @@ void PairAIREBO::Spbicubic_patch_coeffs( ) { const double C_inv[16][12] = { // output_matrix(1, 4*3, get_matrix(2)) - 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, - -3, 3, 0, 0, 0, 0, 0, 0,-2,-1, 0, 0, - 2,-2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, - 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0,-3, 3, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 2,-2, 0, 0, 0, 0, 0, 0, - -3, 0, 3, 0,-2, 0,-1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0,-3, 0, 3, 0, - 9,-9,-9, 9, 6,-6, 3,-3, 6, 3,-6,-3, - -6, 6, 6,-6,-4, 4,-2, 2,-3,-3, 3, 3, - 2, 0,-2, 0, 1, 0, 1, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,-2, 0, - -6, 6, 6,-6,-3, 3,-3, 3,-4,-2, 4, 2, - 4,-4,-4, 4, 2,-2, 2,-2, 2, 2,-2,-2, + { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0}, + {-3, 3, 0, 0, 0, 0, 0, 0,-2,-1, 0, 0}, + { 2,-2, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0}, + { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0,-3, 3, 0, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 2,-2, 0, 0, 0, 0, 0, 0}, + {-3, 0, 3, 0,-2, 0,-1, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0,-3, 0, 3, 0}, + { 9,-9,-9, 9, 6,-6, 3,-3, 6, 3,-6,-3}, + {-6, 6, 6,-6,-4, 4,-2, 2,-3,-3, 3, 3}, + { 2, 0,-2, 0, 1, 0, 1, 0, 0, 0, 0, 0}, + { 0, 0, 0, 0, 0, 0, 0, 0, 2, 0,-2, 0}, + {-6, 6, 6,-6,-3, 3,-3, 3,-4,-2, 4, 2}, + { 4,-4,-4, 4, 2,-2, 2,-2, 2, 2,-2,-2} }; double dx = xmax - xmin; double dy = ymax - ymin; -- GitLab From dbd0158d3f03abba93a219f8e7c40f097998d72e Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 11 Jul 2019 12:01:35 -0500 Subject: [PATCH 163/236] Adjust/update kim_query do_query() routine --- src/KIM/kim_query.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index 221dc9e804..6e77b8f859 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -124,7 +124,7 @@ void KimQuery::command(int narg, char **arg) // that was returned by the web server if (0 == strlen(value)) { - char errmsg[512]; + char errmsg[1024]; sprintf(errmsg,"OpenKIM query failed: %s",value+1); error->all(FLERR,errmsg); @@ -258,9 +258,15 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg, if (value[0] == '[') { int len = strlen(value)-1; - retval = new char[len]; - value[len] = '\0'; - strcpy(retval,value+1); + if (value[len-1] == ']') { + retval = new char[len]; + value[len-1] = '\0'; + strcpy(retval,value+1); + } else { + retval = new char[len+2]; + retval[0] = '\0'; + strcpy(retval+1,value); + } } else if (value[0] == '\0') { int len = strlen(value+1)+2; retval = new char[len]; @@ -268,10 +274,11 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg, strcpy(retval+1,value+1); } else { // unknown response type. we should not get here. - // copy response without modifications. - int len = strlen(value)+1; + // we return an "empty" string but add error message after it + int len = strlen(value)+2; retval = new char[len]; - strcpy(retval,value); + retval[0] = '\0'; + strcpy(retval+1,value); } return retval; } -- GitLab From 8e2f3e48832115af044efe39861b9a35480327fd Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Thu, 11 Jul 2019 12:04:54 -0500 Subject: [PATCH 164/236] Wording changes and removed duplicate text --- doc/src/kim_commands.txt | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 437b768df6..f9615b8d5f 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -58,7 +58,7 @@ Reliability :h5 All content archived in OpenKIM is reviewed by the "KIM Editor"_https://openkim.org/governance/ for quality. IMs in OpenKIM are archived with full provenance control. Each is associated with a maintainer responsible for the integrity of the content. All changes are tracked and recorded. -IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/getting-started/kim-tests/ that compute a host of material properties, and "KIM Verification Checks"_https://openkim.org/about-verification-checks/ that provide the user with information on various aspects of the IM behavior and coding correctness. This information is displayed on the IM's page on "OpenKIM"_https://openkim.org. :ul +IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/getting-started/kim-tests/ that compute a host of material properties, and "KIM Verification Checks"_https://openkim.org/about-verification-checks/ that provide the user with information on various aspects of the IM behavior and coding correctness. This information is displayed on the IM's page accessible through the "OpenKIM browse interface"_https://openkim.org/browse. :ul Reproducibility :h5 @@ -407,12 +407,6 @@ separates the result values into individual variables of the form and {I} ranges from 1 to the number of returned values. The number and order of the returned values is determined by the type of query performed. -In the case where a query returns multiple results, the default behavior -for {kim_query} is to split these into individual variables of the form -{prefix_I}, where {prefix} is set to the the {kim_query} {variable} argument -and {I} ranges from 1 to the number of returned values. The number and order of -the returned values is determined by the type of query performed. - [Define a crystal at finite temperature accounting for thermal expansion] kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal -- GitLab From 3349ed00133553e8f2feac931b18b4cf4903cbdc Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Thu, 11 Jul 2019 12:22:36 -0500 Subject: [PATCH 165/236] Changed PM Page and SM Page to "Model Page" --- doc/src/kim_commands.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 2a8f83e7a8..604aba4449 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -95,13 +95,12 @@ By convention SM prefixes begin with {Sim_} to readily identify them. SW_StillingerWeber_1985_Si__MO_405512056662_005 Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 :pre -Each OpenKIM IM has a dedicated page on "OpenKIM"_https://openkim.org +Each OpenKIM IM has a dedicated "Model Page" on "OpenKIM"_https://openkim.org providing all the information on the IM including a title, description, authorship and citation information, test and verification check results, visualizations of results, a wiki with documentation and user comments, and access to raw files, and other information. -This is referred to as the "PM Page" or "SM Page". -The URL for such a page is constructed from the +The URL for the Model Page is constructed from the "extended KIM ID"_https://openkim.org/about-kim-ids/ of the IM: https://openkim.org/id/extended_KIM_ID -- GitLab From 9f6bbe1d8e390a3614a10413dee95deb4d3c55cd Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 14:21:55 -0400 Subject: [PATCH 166/236] recover compilation of KOKKOS package --- src/KOKKOS/fix_reaxc_species_kokkos.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/KOKKOS/fix_reaxc_species_kokkos.cpp b/src/KOKKOS/fix_reaxc_species_kokkos.cpp index 71aacba68d..f32bea2c67 100644 --- a/src/KOKKOS/fix_reaxc_species_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_species_kokkos.cpp @@ -23,6 +23,7 @@ #include "fix_ave_atom.h" #include "domain.h" #include "update.h" +#include "reaxc_defs.h" #include "pair_reaxc_kokkos.h" #include "modify.h" #include "neighbor.h" -- GitLab From 9718b99af969900fdd62614e9c0ccda418408eb6 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Thu, 11 Jul 2019 13:23:46 -0500 Subject: [PATCH 167/236] Clarification on what preceeds in kim_interactions --- doc/src/kim_commands.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 604aba4449..a6551734f1 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -274,8 +274,8 @@ OpenKIM IM Execution ({kim_interactions}) :h5 The second and final step in using an OpenKIM IM is to execute the {kim_interactions} command. This command must be preceded by a {kim_init} -command and a command that creates the simulation box (such as -"create_box"_create_box.html), which defines the number of atom types {N}. +command and a command that defines the number of atom types {N} (such as +"create_box"_create_box.html). The {kim_interactions} command has one argument {typeargs}. This argument contains either a list of {N} chemical species, which defines a mapping between atom types in LAMMPS to the available species in the OpenKIM IM, or the -- GitLab From 48c73567436964589dd0a99d741be7e49530e53d Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 16:51:48 -0400 Subject: [PATCH 168/236] starting to work on includes in USER-OMP --- src/USER-OMP/angle_charmm_omp.cpp | 8 ++------ src/USER-OMP/angle_class2_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_delta_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_periodic_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_shift_exp_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_shift_omp.cpp | 2 +- src/USER-OMP/angle_cosine_squared_omp.cpp | 8 ++------ src/USER-OMP/angle_dipole_omp.cpp | 8 ++------ src/USER-OMP/angle_fourier_omp.cpp | 2 +- src/USER-OMP/angle_fourier_simple_omp.cpp | 8 ++------ src/USER-OMP/angle_harmonic_omp.cpp | 8 ++------ src/USER-OMP/angle_quartic_omp.cpp | 2 +- src/USER-OMP/angle_sdk_omp.cpp | 8 ++------ src/USER-OMP/angle_table_omp.cpp | 8 ++------ src/USER-OMP/bond_class2_omp.cpp | 2 +- src/USER-OMP/bond_fene_expand_omp.cpp | 2 +- src/USER-OMP/bond_fene_omp.cpp | 2 +- src/USER-OMP/bond_gromos_omp.cpp | 2 +- src/USER-OMP/bond_harmonic_omp.cpp | 2 +- src/USER-OMP/bond_harmonic_shift_cut_omp.cpp | 2 +- src/USER-OMP/bond_harmonic_shift_omp.cpp | 2 +- src/USER-OMP/bond_morse_omp.cpp | 2 +- src/USER-OMP/bond_nonlinear_omp.cpp | 2 +- src/USER-OMP/bond_quartic_omp.cpp | 2 +- src/USER-OMP/bond_table_omp.cpp | 2 +- src/USER-OMP/dihedral_charmm_omp.cpp | 2 +- src/USER-OMP/dihedral_class2_omp.cpp | 2 +- src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp | 2 +- src/USER-OMP/dihedral_fourier_omp.cpp | 2 +- src/USER-OMP/dihedral_harmonic_omp.cpp | 2 +- src/USER-OMP/dihedral_helix_omp.cpp | 2 +- src/USER-OMP/dihedral_multi_harmonic_omp.cpp | 2 +- src/USER-OMP/dihedral_nharmonic_omp.cpp | 2 +- src/USER-OMP/dihedral_opls_omp.cpp | 2 +- src/USER-OMP/dihedral_quadratic_omp.cpp | 2 +- src/USER-OMP/dihedral_table_omp.cpp | 3 ++- src/USER-OMP/domain_omp.cpp | 1 - src/USER-OMP/fix_gravity_omp.cpp | 2 +- src/USER-OMP/fix_nh_omp.cpp | 4 +--- src/USER-OMP/fix_nh_sphere_omp.cpp | 3 --- src/USER-OMP/fix_nvt_sllod_omp.cpp | 5 +++-- src/USER-OMP/fix_omp.cpp | 10 +++++----- src/USER-OMP/fix_qeq_reax_omp.cpp | 2 +- src/USER-OMP/fix_rigid_nh_omp.cpp | 5 ++--- src/USER-OMP/fix_rigid_nph_omp.cpp | 2 +- src/USER-OMP/fix_rigid_npt_omp.cpp | 2 +- src/USER-OMP/fix_rigid_omp.cpp | 7 +++---- src/USER-OMP/fix_rigid_small_omp.cpp | 1 + src/USER-OMP/improper_class2_omp.cpp | 2 +- src/USER-OMP/improper_cossq_omp.cpp | 2 +- src/USER-OMP/improper_cvff_omp.cpp | 2 +- src/USER-OMP/improper_fourier_omp.cpp | 2 +- src/USER-OMP/improper_harmonic_omp.cpp | 2 +- src/USER-OMP/improper_ring_omp.cpp | 2 +- src/USER-OMP/improper_umbrella_omp.cpp | 2 +- src/USER-OMP/msm_cg_omp.cpp | 4 ++-- src/USER-OMP/msm_omp.cpp | 3 ++- src/USER-OMP/npair_full_bin_atomonly_omp.cpp | 1 + src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp | 2 +- src/USER-OMP/npair_halffull_newtoff_omp.cpp | 2 +- src/USER-OMP/npair_halffull_newton_omp.cpp | 2 +- src/USER-OMP/pair_brownian_omp.cpp | 3 ++- src/USER-OMP/pair_brownian_poly_omp.cpp | 2 +- src/USER-OMP/pair_lj_cut_thole_long_omp.cpp | 3 ++- src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp | 2 +- src/USER-OMP/pair_lubricate_poly_omp.cpp | 2 +- src/USER-OMP/pppm_cg_omp.cpp | 3 ++- src/USER-OMP/pppm_disp_omp.cpp | 3 ++- src/USER-OMP/pppm_disp_tip4p_omp.cpp | 3 ++- src/USER-OMP/pppm_omp.cpp | 3 ++- src/USER-OMP/respa_omp.cpp | 3 ++- src/USER-OMP/thr_data.h | 8 ++------ src/USER-OMP/thr_omp.cpp | 2 -- src/USER-OMP/thr_omp.h | 9 +++++---- src/special.cpp | 2 +- 76 files changed, 109 insertions(+), 158 deletions(-) diff --git a/src/USER-OMP/angle_charmm_omp.cpp b/src/USER-OMP/angle_charmm_omp.cpp index 118ba00226..f135446915 100644 --- a/src/USER-OMP/angle_charmm_omp.cpp +++ b/src/USER-OMP/angle_charmm_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_charmm_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_class2_omp.cpp b/src/USER-OMP/angle_class2_omp.cpp index e072d136e1..0cf5489663 100644 --- a/src/USER-OMP/angle_class2_omp.cpp +++ b/src/USER-OMP/angle_class2_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_class2_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_delta_omp.cpp b/src/USER-OMP/angle_cosine_delta_omp.cpp index a6dfb20433..7f4d994c4f 100644 --- a/src/USER-OMP/angle_cosine_delta_omp.cpp +++ b/src/USER-OMP/angle_cosine_delta_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_delta_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_omp.cpp b/src/USER-OMP/angle_cosine_omp.cpp index 9097c8569c..0543c94799 100644 --- a/src/USER-OMP/angle_cosine_omp.cpp +++ b/src/USER-OMP/angle_cosine_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_periodic_omp.cpp b/src/USER-OMP/angle_cosine_periodic_omp.cpp index 3fcea7ad1d..907315f83b 100644 --- a/src/USER-OMP/angle_cosine_periodic_omp.cpp +++ b/src/USER-OMP/angle_cosine_periodic_omp.cpp @@ -16,20 +16,16 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_periodic_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" +#include "timer.h" #include "math_special.h" -#include - #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace MathSpecial; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp index 6bd2feb023..6c42319905 100644 --- a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_shift_exp_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_shift_omp.cpp b/src/USER-OMP/angle_cosine_shift_omp.cpp index 56486faac1..2eea790595 100644 --- a/src/USER-OMP/angle_cosine_shift_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "math_const.h" diff --git a/src/USER-OMP/angle_cosine_squared_omp.cpp b/src/USER-OMP/angle_cosine_squared_omp.cpp index 6dd2a3bb3b..27c47b90d8 100644 --- a/src/USER-OMP/angle_cosine_squared_omp.cpp +++ b/src/USER-OMP/angle_cosine_squared_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_squared_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_dipole_omp.cpp b/src/USER-OMP/angle_dipole_omp.cpp index da2e819ee2..6af5b44a03 100644 --- a/src/USER-OMP/angle_dipole_omp.cpp +++ b/src/USER-OMP/angle_dipole_omp.cpp @@ -16,20 +16,16 @@ ------------------------------------------------------------------------- */ #include "angle_dipole_omp.h" +#include #include "atom.h" #include "comm.h" #include "error.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_fourier_omp.cpp b/src/USER-OMP/angle_fourier_omp.cpp index b2f9b47e05..52736ca60f 100644 --- a/src/USER-OMP/angle_fourier_omp.cpp +++ b/src/USER-OMP/angle_fourier_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "math_const.h" diff --git a/src/USER-OMP/angle_fourier_simple_omp.cpp b/src/USER-OMP/angle_fourier_simple_omp.cpp index 93532a30e5..71d0197b72 100644 --- a/src/USER-OMP/angle_fourier_simple_omp.cpp +++ b/src/USER-OMP/angle_fourier_simple_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_fourier_simple_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_harmonic_omp.cpp b/src/USER-OMP/angle_harmonic_omp.cpp index 824b254287..ee08bbd8ad 100644 --- a/src/USER-OMP/angle_harmonic_omp.cpp +++ b/src/USER-OMP/angle_harmonic_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_harmonic_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_quartic_omp.cpp b/src/USER-OMP/angle_quartic_omp.cpp index fff08ddb39..f97f39b16a 100644 --- a/src/USER-OMP/angle_quartic_omp.cpp +++ b/src/USER-OMP/angle_quartic_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "math_const.h" diff --git a/src/USER-OMP/angle_sdk_omp.cpp b/src/USER-OMP/angle_sdk_omp.cpp index e8c762092c..e0b1da0baf 100644 --- a/src/USER-OMP/angle_sdk_omp.cpp +++ b/src/USER-OMP/angle_sdk_omp.cpp @@ -16,20 +16,16 @@ ------------------------------------------------------------------------- */ #include "angle_sdk_omp.h" +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "comm.h" #include "force.h" -#include "math_const.h" - -#include - #include "lj_sdk_common.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace LJSDKParms; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_table_omp.cpp b/src/USER-OMP/angle_table_omp.cpp index d9d80b744d..4f6edf2073 100644 --- a/src/USER-OMP/angle_table_omp.cpp +++ b/src/USER-OMP/angle_table_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_table_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/bond_class2_omp.cpp b/src/USER-OMP/bond_class2_omp.cpp index fdd73c20b0..7d1b693faf 100644 --- a/src/USER-OMP/bond_class2_omp.cpp +++ b/src/USER-OMP/bond_class2_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_fene_expand_omp.cpp b/src/USER-OMP/bond_fene_expand_omp.cpp index a8eec11760..aefae6dcf7 100644 --- a/src/USER-OMP/bond_fene_expand_omp.cpp +++ b/src/USER-OMP/bond_fene_expand_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "error.h" #include "update.h" diff --git a/src/USER-OMP/bond_fene_omp.cpp b/src/USER-OMP/bond_fene_omp.cpp index be7dcd4b49..2b579114ba 100644 --- a/src/USER-OMP/bond_fene_omp.cpp +++ b/src/USER-OMP/bond_fene_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "error.h" #include "update.h" diff --git a/src/USER-OMP/bond_gromos_omp.cpp b/src/USER-OMP/bond_gromos_omp.cpp index 8f0926c0e9..88ef1dc23e 100644 --- a/src/USER-OMP/bond_gromos_omp.cpp +++ b/src/USER-OMP/bond_gromos_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_harmonic_omp.cpp b/src/USER-OMP/bond_harmonic_omp.cpp index a3bb69c53c..5515284f9a 100644 --- a/src/USER-OMP/bond_harmonic_omp.cpp +++ b/src/USER-OMP/bond_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp index 5c16e27a32..a871fa8c04 100644 --- a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_harmonic_shift_omp.cpp b/src/USER-OMP/bond_harmonic_shift_omp.cpp index 39e957c137..4117da9159 100644 --- a/src/USER-OMP/bond_harmonic_shift_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_morse_omp.cpp b/src/USER-OMP/bond_morse_omp.cpp index c0203de0d6..e6526dc8dc 100644 --- a/src/USER-OMP/bond_morse_omp.cpp +++ b/src/USER-OMP/bond_morse_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_nonlinear_omp.cpp b/src/USER-OMP/bond_nonlinear_omp.cpp index 8fa3daf8ab..0d1a648415 100644 --- a/src/USER-OMP/bond_nonlinear_omp.cpp +++ b/src/USER-OMP/bond_nonlinear_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_quartic_omp.cpp b/src/USER-OMP/bond_quartic_omp.cpp index fd0ccaf79d..60d3a5601c 100644 --- a/src/USER-OMP/bond_quartic_omp.cpp +++ b/src/USER-OMP/bond_quartic_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "pair.h" #include diff --git a/src/USER-OMP/bond_table_omp.cpp b/src/USER-OMP/bond_table_omp.cpp index 1616988385..8e1e792c73 100644 --- a/src/USER-OMP/bond_table_omp.cpp +++ b/src/USER-OMP/bond_table_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/dihedral_charmm_omp.cpp b/src/USER-OMP/dihedral_charmm_omp.cpp index b09863613e..49dbd54035 100644 --- a/src/USER-OMP/dihedral_charmm_omp.cpp +++ b/src/USER-OMP/dihedral_charmm_omp.cpp @@ -21,7 +21,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "pair.h" #include "update.h" diff --git a/src/USER-OMP/dihedral_class2_omp.cpp b/src/USER-OMP/dihedral_class2_omp.cpp index 03ac9d9bab..6c2bc02ff4 100644 --- a/src/USER-OMP/dihedral_class2_omp.cpp +++ b/src/USER-OMP/dihedral_class2_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp index c64cad9fc3..d77e9d6b3e 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_fourier_omp.cpp b/src/USER-OMP/dihedral_fourier_omp.cpp index 94bdae3795..e853f56051 100644 --- a/src/USER-OMP/dihedral_fourier_omp.cpp +++ b/src/USER-OMP/dihedral_fourier_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_harmonic_omp.cpp b/src/USER-OMP/dihedral_harmonic_omp.cpp index 10ccbd3d9f..84aa584d9e 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index 8c8e29cac0..51b07754e2 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "math_const.h" diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp index 38961e1746..4cb6919a96 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_nharmonic_omp.cpp b/src/USER-OMP/dihedral_nharmonic_omp.cpp index e74238265d..203884531b 100644 --- a/src/USER-OMP/dihedral_nharmonic_omp.cpp +++ b/src/USER-OMP/dihedral_nharmonic_omp.cpp @@ -20,10 +20,10 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "error.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/dihedral_opls_omp.cpp b/src/USER-OMP/dihedral_opls_omp.cpp index 64eaffe6fe..af12bb866e 100644 --- a/src/USER-OMP/dihedral_opls_omp.cpp +++ b/src/USER-OMP/dihedral_opls_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_quadratic_omp.cpp b/src/USER-OMP/dihedral_quadratic_omp.cpp index 8df622b847..8cea62aaea 100644 --- a/src/USER-OMP/dihedral_quadratic_omp.cpp +++ b/src/USER-OMP/dihedral_quadratic_omp.cpp @@ -20,10 +20,10 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "error.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/dihedral_table_omp.cpp b/src/USER-OMP/dihedral_table_omp.cpp index 792ee90c26..928af079e8 100644 --- a/src/USER-OMP/dihedral_table_omp.cpp +++ b/src/USER-OMP/dihedral_table_omp.cpp @@ -22,11 +22,12 @@ #include "dihedral_table_omp.h" #include "atom.h" #include "comm.h" -#include "neighbor.h" #include "domain.h" +#include "neighbor.h" #include "force.h" #include "update.h" #include "error.h" +#include "timer.h" #include "math_const.h" #include "math_extra.h" diff --git a/src/USER-OMP/domain_omp.cpp b/src/USER-OMP/domain_omp.cpp index 584e56b1f0..a18931c551 100644 --- a/src/USER-OMP/domain_omp.cpp +++ b/src/USER-OMP/domain_omp.cpp @@ -15,7 +15,6 @@ Contributing author : Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include "domain.h" #include "accelerator_omp.h" #include "atom.h" diff --git a/src/USER-OMP/fix_gravity_omp.cpp b/src/USER-OMP/fix_gravity_omp.cpp index eae918ec52..ae00c44ffb 100644 --- a/src/USER-OMP/fix_gravity_omp.cpp +++ b/src/USER-OMP/fix_gravity_omp.cpp @@ -22,7 +22,7 @@ #include "fix_gravity_omp.h" #include "atom.h" #include "update.h" -#include "domain.h" +#include "timer.h" #include "input.h" #include "modify.h" #include "respa.h" diff --git a/src/USER-OMP/fix_nh_omp.cpp b/src/USER-OMP/fix_nh_omp.cpp index 76a47b71fd..2abd739f71 100644 --- a/src/USER-OMP/fix_nh_omp.cpp +++ b/src/USER-OMP/fix_nh_omp.cpp @@ -16,15 +16,13 @@ ------------------------------------------------------------------------- */ #include "fix_nh_omp.h" +#include #include "atom.h" #include "compute.h" #include "domain.h" #include "error.h" #include "modify.h" -#include -#include - using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_nh_sphere_omp.cpp b/src/USER-OMP/fix_nh_sphere_omp.cpp index a32f0f8b51..64bc536bb0 100644 --- a/src/USER-OMP/fix_nh_sphere_omp.cpp +++ b/src/USER-OMP/fix_nh_sphere_omp.cpp @@ -15,12 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "fix_nh_sphere_omp.h" #include "atom.h" -#include "atom_vec.h" #include "compute.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/fix_nvt_sllod_omp.cpp b/src/USER-OMP/fix_nvt_sllod_omp.cpp index e439647c12..6944cf15af 100644 --- a/src/USER-OMP/fix_nvt_sllod_omp.cpp +++ b/src/USER-OMP/fix_nvt_sllod_omp.cpp @@ -15,18 +15,19 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_nvt_sllod_omp.h" #include #include -#include "fix_nvt_sllod_omp.h" #include "math_extra.h" #include "atom.h" -#include "domain.h" #include "group.h" #include "modify.h" #include "fix.h" #include "fix_deform.h" #include "compute.h" #include "error.h" +#include "domain.h" +#include "timer.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_omp.cpp b/src/USER-OMP/fix_omp.cpp index a4587b1c14..1fca1e739b 100644 --- a/src/USER-OMP/fix_omp.cpp +++ b/src/USER-OMP/fix_omp.cpp @@ -24,13 +24,10 @@ #include "neigh_request.h" #include "universe.h" #include "update.h" -#include "integrate.h" -#include "min.h" #include "timer.h" #include "fix_omp.h" #include "thr_data.h" -#include "thr_omp.h" #include "pair_hybrid.h" #include "bond_hybrid.h" @@ -40,8 +37,11 @@ #include "kspace.h" #include -#include -#include + +#if defined(_OPENMP) +#include +#endif + #include "suffix.h" diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index 45da91305d..5c50c54bff 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -39,7 +39,7 @@ #include "pair_reaxc_omp.h" #include "atom.h" #include "comm.h" -#include "domain.h" +#include "timer.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/USER-OMP/fix_rigid_nh_omp.cpp b/src/USER-OMP/fix_rigid_nh_omp.cpp index e6a6e065bf..74b2a92775 100644 --- a/src/USER-OMP/fix_rigid_nh_omp.cpp +++ b/src/USER-OMP/fix_rigid_nh_omp.cpp @@ -15,11 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_rigid_nh_omp.h" #include #include - -#include "fix_rigid_nh_omp.h" - #include "atom.h" #include "atom_vec_ellipsoid.h" #include "atom_vec_line.h" @@ -32,6 +30,7 @@ #include "kspace.h" #include "modify.h" #include "update.h" +#include "timer.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/fix_rigid_nph_omp.cpp b/src/USER-OMP/fix_rigid_nph_omp.cpp index 7db45ed9bf..af59b65996 100644 --- a/src/USER-OMP/fix_rigid_nph_omp.cpp +++ b/src/USER-OMP/fix_rigid_nph_omp.cpp @@ -19,7 +19,7 @@ #include #include "fix_rigid_nph_omp.h" -#include "domain.h" +#include "timer.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_rigid_npt_omp.cpp b/src/USER-OMP/fix_rigid_npt_omp.cpp index a041706f38..744b27ce01 100644 --- a/src/USER-OMP/fix_rigid_npt_omp.cpp +++ b/src/USER-OMP/fix_rigid_npt_omp.cpp @@ -19,7 +19,7 @@ #include #include "fix_rigid_npt_omp.h" -#include "domain.h" +#include "timer.h" #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_rigid_omp.cpp b/src/USER-OMP/fix_rigid_omp.cpp index 20478b3ca1..2e97adab35 100644 --- a/src/USER-OMP/fix_rigid_omp.cpp +++ b/src/USER-OMP/fix_rigid_omp.cpp @@ -15,18 +15,17 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_rigid_omp.h" #include #include - -#include "fix_rigid_omp.h" - #include "atom.h" #include "atom_vec_ellipsoid.h" #include "atom_vec_line.h" #include "atom_vec_tri.h" #include "comm.h" -#include "domain.h" #include "error.h" +#include "domain.h" +#include "timer.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/fix_rigid_small_omp.cpp b/src/USER-OMP/fix_rigid_small_omp.cpp index 1f6173497d..f8fea815c8 100644 --- a/src/USER-OMP/fix_rigid_small_omp.cpp +++ b/src/USER-OMP/fix_rigid_small_omp.cpp @@ -25,6 +25,7 @@ #include "atom_vec_tri.h" #include "comm.h" #include "domain.h" +#include "timer.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index c2b493f425..3bff179b44 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_cossq_omp.cpp b/src/USER-OMP/improper_cossq_omp.cpp index 3b328e5b78..0f99f2732f 100644 --- a/src/USER-OMP/improper_cossq_omp.cpp +++ b/src/USER-OMP/improper_cossq_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index fe1fc45bec..fdc29c74b1 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_fourier_omp.cpp b/src/USER-OMP/improper_fourier_omp.cpp index b5af428cb9..b49b895c78 100644 --- a/src/USER-OMP/improper_fourier_omp.cpp +++ b/src/USER-OMP/improper_fourier_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index 6e02d0968e..32e837fdfe 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_ring_omp.cpp b/src/USER-OMP/improper_ring_omp.cpp index e198b99337..6d6c1094ec 100644 --- a/src/USER-OMP/improper_ring_omp.cpp +++ b/src/USER-OMP/improper_ring_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_umbrella_omp.cpp b/src/USER-OMP/improper_umbrella_omp.cpp index ceaca35074..f3fdf4570f 100644 --- a/src/USER-OMP/improper_umbrella_omp.cpp +++ b/src/USER-OMP/improper_umbrella_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/msm_cg_omp.cpp b/src/USER-OMP/msm_cg_omp.cpp index 8a920e05d5..94c64cd0cf 100644 --- a/src/USER-OMP/msm_cg_omp.cpp +++ b/src/USER-OMP/msm_cg_omp.cpp @@ -16,6 +16,7 @@ Original MSM class by: Paul Crozier, Stan Moore, Stephen Bond, (all SNL) ------------------------------------------------------------------------- */ +#include "msm_cg_omp.h" #include #include #include @@ -29,9 +30,8 @@ #include "force.h" #include "neighbor.h" #include "memory.h" -#include "msm_cg_omp.h" - #include "math_const.h" +#include "timer.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-OMP/msm_omp.cpp b/src/USER-OMP/msm_omp.cpp index 74cbb56be7..51aaa35d63 100644 --- a/src/USER-OMP/msm_omp.cpp +++ b/src/USER-OMP/msm_omp.cpp @@ -16,6 +16,7 @@ ------------------------------------------------------------------------- */ #include "msm_omp.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" @@ -23,8 +24,8 @@ #include "force.h" #include "memory.h" #include "math_const.h" +#include "timer.h" -#include #if defined(_OPENMP) #include diff --git a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp index d9e0fb9297..a6a3f3e748 100644 --- a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp +++ b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp @@ -20,6 +20,7 @@ #include "domain.h" #include "my_page.h" #include "error.h" +#include "timer.h" using namespace LAMMPS_NS; using namespace NeighConst; diff --git a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp index 02d98ff6ab..5a87ad1ea6 100644 --- a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp +++ b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp @@ -18,7 +18,7 @@ #include "atom.h" #include "atom_vec.h" #include "molecule.h" -#include "domain.h" +#include "timer.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/npair_halffull_newtoff_omp.cpp b/src/USER-OMP/npair_halffull_newtoff_omp.cpp index 947e4e1ad2..6f90f82752 100644 --- a/src/USER-OMP/npair_halffull_newtoff_omp.cpp +++ b/src/USER-OMP/npair_halffull_newtoff_omp.cpp @@ -18,7 +18,7 @@ #include "atom.h" #include "atom_vec.h" #include "molecule.h" -#include "domain.h" +#include "timer.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/npair_halffull_newton_omp.cpp b/src/USER-OMP/npair_halffull_newton_omp.cpp index 6e158d372d..6cf8ab8ac2 100644 --- a/src/USER-OMP/npair_halffull_newton_omp.cpp +++ b/src/USER-OMP/npair_halffull_newton_omp.cpp @@ -18,7 +18,7 @@ #include "atom.h" #include "atom_vec.h" #include "molecule.h" -#include "domain.h" +#include "timer.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/pair_brownian_omp.cpp b/src/USER-OMP/pair_brownian_omp.cpp index cef9fb0955..6367976c7d 100644 --- a/src/USER-OMP/pair_brownian_omp.cpp +++ b/src/USER-OMP/pair_brownian_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_brownian_omp.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" @@ -26,6 +26,7 @@ #include "random_mars.h" #include "math_const.h" #include "math_special.h" +#include "timer.h" #include "fix_wall.h" diff --git a/src/USER-OMP/pair_brownian_poly_omp.cpp b/src/USER-OMP/pair_brownian_poly_omp.cpp index 239a820242..dcb4124634 100644 --- a/src/USER-OMP/pair_brownian_poly_omp.cpp +++ b/src/USER-OMP/pair_brownian_poly_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_brownian_poly_omp.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp index d0db6262b1..87d637e80d 100644 --- a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp @@ -22,6 +22,7 @@ #include #include "atom.h" #include "comm.h" +#include "domain.h" #include "fix_drude.h" #include "force.h" #include "neighbor.h" @@ -30,7 +31,7 @@ #include "math_const.h" #include "error.h" #include "suffix.h" -#include "domain.h" +#include "timer.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp index e2c1da1a89..18fc207015 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_lj_cut_tip4p_long_omp.h" +#include #include "atom.h" #include "domain.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lubricate_poly_omp.cpp b/src/USER-OMP/pair_lubricate_poly_omp.cpp index 3a5f03364d..04ac59b121 100644 --- a/src/USER-OMP/pair_lubricate_poly_omp.cpp +++ b/src/USER-OMP/pair_lubricate_poly_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_lubricate_poly_omp.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-OMP/pppm_cg_omp.cpp b/src/USER-OMP/pppm_cg_omp.cpp index 2b4619f685..f20fa37683 100644 --- a/src/USER-OMP/pppm_cg_omp.cpp +++ b/src/USER-OMP/pppm_cg_omp.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_cg_omp.h" #include #include -#include "pppm_cg_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" @@ -28,6 +28,7 @@ #include "memory.h" #include "math_const.h" #include "math_special.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pppm_disp_omp.cpp b/src/USER-OMP/pppm_disp_omp.cpp index 435341a31c..295bd66266 100644 --- a/src/USER-OMP/pppm_disp_omp.cpp +++ b/src/USER-OMP/pppm_disp_omp.cpp @@ -16,15 +16,16 @@ Rolf Isele-Holder (RWTH Aachen University) ------------------------------------------------------------------------- */ +#include "pppm_disp_omp.h" #include #include -#include "pppm_disp_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" #include "force.h" #include "memory.h" #include "math_const.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pppm_disp_tip4p_omp.cpp b/src/USER-OMP/pppm_disp_tip4p_omp.cpp index a53c5b2ac5..04dec7365e 100644 --- a/src/USER-OMP/pppm_disp_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_disp_tip4p_omp.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_disp_tip4p_omp.h" #include #include -#include "pppm_disp_tip4p_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" @@ -27,6 +27,7 @@ #include "memory.h" #include "math_const.h" #include "math_special.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pppm_omp.cpp b/src/USER-OMP/pppm_omp.cpp index 66190b3f51..73b257efa9 100644 --- a/src/USER-OMP/pppm_omp.cpp +++ b/src/USER-OMP/pppm_omp.cpp @@ -15,9 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_omp.h" #include #include -#include "pppm_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" @@ -27,6 +27,7 @@ #include "memory.h" #include "math_const.h" #include "math_special.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/respa_omp.cpp b/src/USER-OMP/respa_omp.cpp index 9c8555c66d..4a7757723f 100644 --- a/src/USER-OMP/respa_omp.cpp +++ b/src/USER-OMP/respa_omp.cpp @@ -19,9 +19,9 @@ #include #include "respa_omp.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "atom.h" +#include "domain.h" #include "force.h" #include "pair.h" #include "bond.h" @@ -37,6 +37,7 @@ #include "timer.h" #include "memory.h" #include "error.h" +#include "timer.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/thr_data.h b/src/USER-OMP/thr_data.h index 3cea1b0018..edff17cad3 100644 --- a/src/USER-OMP/thr_data.h +++ b/src/USER-OMP/thr_data.h @@ -18,10 +18,6 @@ #ifndef LMP_THR_DATA_H #define LMP_THR_DATA_H -#if defined(_OPENMP) -#include -#endif - #include "timer.h" namespace LAMMPS_NS { @@ -35,7 +31,7 @@ class ThrData { public: ThrData(int tid, class Timer *t); - ~ThrData() { delete _timer; _timer = NULL; }; + ~ThrData() { delete _timer; _timer = nullptr; }; void check_tid(int); // thread id consistency check int get_tid() const { return _tid; }; // our thread id. @@ -140,7 +136,7 @@ class ThrData { // disabled default methods private: - ThrData() : _tid(-1), _timer(NULL) {}; + ThrData() : _tid(-1), _timer(nullptr) {}; }; //////////////////////////////////////////////////////////////////////// diff --git a/src/USER-OMP/thr_omp.cpp b/src/USER-OMP/thr_omp.cpp index 22f751e6c0..51030358d3 100644 --- a/src/USER-OMP/thr_omp.cpp +++ b/src/USER-OMP/thr_omp.cpp @@ -22,7 +22,6 @@ #include "comm.h" #include "error.h" #include "force.h" -#include "memory.h" #include "modify.h" #include "neighbor.h" #include "timer.h" @@ -34,7 +33,6 @@ #include "angle.h" #include "dihedral.h" #include "improper.h" -#include "kspace.h" #include "compute.h" #include "math_const.h" diff --git a/src/USER-OMP/thr_omp.h b/src/USER-OMP/thr_omp.h index 87d921290e..062d77bc0e 100644 --- a/src/USER-OMP/thr_omp.h +++ b/src/USER-OMP/thr_omp.h @@ -18,10 +18,13 @@ #ifndef LMP_THR_OMP_H #define LMP_THR_OMP_H +#if defined(_OPENMP) +#include +#endif #include "pointers.h" #include "error.h" -#include "fix_omp.h" -#include "thr_data.h" +#include "fix_omp.h" // IWYU pragma: export +#include "thr_data.h" // IWYU pragma: export namespace LAMMPS_NS { @@ -31,8 +34,6 @@ class Bond; class Angle; class Dihedral; class Improper; -class KSpace; -class Fix; class ThrOMP { diff --git a/src/special.cpp b/src/special.cpp index b64aa96e2b..3dd817bc7f 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -19,7 +19,7 @@ #include "comm.h" #include "modify.h" #include "fix.h" -#include "accelerator_kokkos.h" +#include "accelerator_kokkos.h" // IWYU pragma: export #include "atom_masks.h" #include "memory.h" -- GitLab From b4f60ef477d86cf541bb10d7e3262e03c3fed036 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 16:51:48 -0400 Subject: [PATCH 169/236] starting to work on includes in USER-OMP --- src/USER-OMP/angle_charmm_omp.cpp | 8 ++------ src/USER-OMP/angle_class2_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_delta_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_periodic_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_shift_exp_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_shift_omp.cpp | 8 ++------ src/USER-OMP/angle_cosine_squared_omp.cpp | 8 ++------ src/USER-OMP/angle_dipole_omp.cpp | 8 ++------ src/USER-OMP/angle_fourier_omp.cpp | 8 ++------ src/USER-OMP/angle_fourier_simple_omp.cpp | 8 ++------ src/USER-OMP/angle_harmonic_omp.cpp | 8 ++------ src/USER-OMP/angle_quartic_omp.cpp | 8 ++------ src/USER-OMP/angle_sdk_omp.cpp | 8 ++------ src/USER-OMP/angle_table_omp.cpp | 8 ++------ src/USER-OMP/bond_class2_omp.cpp | 2 +- src/USER-OMP/bond_fene_expand_omp.cpp | 2 +- src/USER-OMP/bond_fene_omp.cpp | 2 +- src/USER-OMP/bond_gromos_omp.cpp | 4 +--- src/USER-OMP/bond_harmonic_omp.cpp | 2 +- src/USER-OMP/bond_harmonic_shift_cut_omp.cpp | 2 +- src/USER-OMP/bond_harmonic_shift_omp.cpp | 2 +- src/USER-OMP/bond_morse_omp.cpp | 2 +- src/USER-OMP/bond_nonlinear_omp.cpp | 2 +- src/USER-OMP/bond_quartic_omp.cpp | 2 +- src/USER-OMP/bond_table_omp.cpp | 2 +- src/USER-OMP/dihedral_charmm_omp.cpp | 5 ++--- src/USER-OMP/dihedral_class2_omp.cpp | 2 +- .../dihedral_cosine_shift_exp_omp.cpp | 2 +- src/USER-OMP/dihedral_fourier_omp.cpp | 6 ++---- src/USER-OMP/dihedral_harmonic_omp.cpp | 2 +- src/USER-OMP/dihedral_helix_omp.cpp | 2 +- src/USER-OMP/dihedral_multi_harmonic_omp.cpp | 2 +- src/USER-OMP/dihedral_nharmonic_omp.cpp | 2 +- src/USER-OMP/dihedral_opls_omp.cpp | 2 +- src/USER-OMP/dihedral_quadratic_omp.cpp | 2 +- src/USER-OMP/dihedral_table_omp.cpp | 11 +++-------- src/USER-OMP/domain_omp.cpp | 1 - src/USER-OMP/ewald_omp.cpp | 7 +++---- src/USER-OMP/fix_gravity_omp.cpp | 7 ------- src/USER-OMP/fix_neigh_history_omp.cpp | 7 +------ src/USER-OMP/fix_nh_omp.cpp | 4 +--- src/USER-OMP/fix_nh_sphere_omp.cpp | 3 --- src/USER-OMP/fix_nve_omp.cpp | 1 - src/USER-OMP/fix_nve_sphere_omp.cpp | 8 +------- src/USER-OMP/fix_nvt_sllod_omp.cpp | 5 ++--- src/USER-OMP/fix_omp.cpp | 10 +++++----- src/USER-OMP/fix_qeq_comb_omp.cpp | 8 ++------ src/USER-OMP/fix_qeq_reax_omp.cpp | 19 +++++++------------ src/USER-OMP/fix_rigid_nh_omp.cpp | 5 ++--- src/USER-OMP/fix_rigid_nph_omp.cpp | 3 +-- src/USER-OMP/fix_rigid_npt_omp.cpp | 3 +-- src/USER-OMP/fix_rigid_omp.cpp | 7 +++---- src/USER-OMP/fix_rigid_small_omp.cpp | 4 +--- src/USER-OMP/improper_class2_omp.cpp | 2 +- src/USER-OMP/improper_cossq_omp.cpp | 2 +- src/USER-OMP/improper_cvff_omp.cpp | 2 +- src/USER-OMP/improper_fourier_omp.cpp | 2 +- src/USER-OMP/improper_harmonic_omp.cpp | 2 +- src/USER-OMP/improper_ring_omp.cpp | 6 ++---- src/USER-OMP/improper_umbrella_omp.cpp | 2 +- src/USER-OMP/msm_cg_omp.cpp | 10 ++++++---- src/USER-OMP/msm_omp.cpp | 8 ++------ src/USER-OMP/npair_full_bin_atomonly_omp.cpp | 2 -- src/USER-OMP/npair_full_bin_ghost_omp.cpp | 1 - src/USER-OMP/npair_full_multi_omp.cpp | 1 - src/USER-OMP/npair_full_nsq_ghost_omp.cpp | 1 - src/USER-OMP/npair_full_nsq_omp.cpp | 1 - .../npair_half_bin_atomonly_newton_omp.cpp | 3 --- .../npair_half_bin_newtoff_ghost_omp.cpp | 1 - src/USER-OMP/npair_half_bin_newtoff_omp.cpp | 1 - src/USER-OMP/npair_half_bin_newton_omp.cpp | 2 -- .../npair_half_bin_newton_tri_omp.cpp | 1 - src/USER-OMP/npair_half_multi_newtoff_omp.cpp | 1 - src/USER-OMP/npair_half_multi_newton_omp.cpp | 1 - src/USER-OMP/npair_halffull_newtoff_omp.cpp | 2 +- src/USER-OMP/npair_halffull_newton_omp.cpp | 2 +- src/USER-OMP/pair_brownian_omp.cpp | 3 ++- src/USER-OMP/pair_brownian_poly_omp.cpp | 2 +- src/USER-OMP/pair_lj_cut_thole_long_omp.cpp | 3 ++- src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp | 2 +- src/USER-OMP/pair_lubricate_poly_omp.cpp | 2 +- src/USER-OMP/pppm_cg_omp.cpp | 12 ++++++------ src/USER-OMP/pppm_disp_omp.cpp | 9 +++++++-- src/USER-OMP/pppm_disp_tip4p_omp.cpp | 11 +++++------ src/USER-OMP/pppm_omp.cpp | 11 +++++++---- src/USER-OMP/pppm_tip4p_omp.cpp | 9 ++++++--- src/USER-OMP/reaxc_multi_body_omp.cpp | 7 +++---- src/USER-OMP/reaxc_valence_angles_omp.cpp | 6 ++++-- src/USER-OMP/respa_omp.cpp | 9 ++------- src/USER-OMP/thr_data.h | 8 ++------ src/USER-OMP/thr_omp.cpp | 2 -- src/USER-OMP/thr_omp.h | 9 +++++---- src/USER-SMD/pair_smd_tlsph.cpp | 8 +++----- src/special.cpp | 2 +- 95 files changed, 162 insertions(+), 293 deletions(-) diff --git a/src/USER-OMP/angle_charmm_omp.cpp b/src/USER-OMP/angle_charmm_omp.cpp index 118ba00226..f135446915 100644 --- a/src/USER-OMP/angle_charmm_omp.cpp +++ b/src/USER-OMP/angle_charmm_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_charmm_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_class2_omp.cpp b/src/USER-OMP/angle_class2_omp.cpp index e072d136e1..0cf5489663 100644 --- a/src/USER-OMP/angle_class2_omp.cpp +++ b/src/USER-OMP/angle_class2_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_class2_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_delta_omp.cpp b/src/USER-OMP/angle_cosine_delta_omp.cpp index a6dfb20433..7f4d994c4f 100644 --- a/src/USER-OMP/angle_cosine_delta_omp.cpp +++ b/src/USER-OMP/angle_cosine_delta_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_delta_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_omp.cpp b/src/USER-OMP/angle_cosine_omp.cpp index 9097c8569c..0543c94799 100644 --- a/src/USER-OMP/angle_cosine_omp.cpp +++ b/src/USER-OMP/angle_cosine_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_periodic_omp.cpp b/src/USER-OMP/angle_cosine_periodic_omp.cpp index 3fcea7ad1d..907315f83b 100644 --- a/src/USER-OMP/angle_cosine_periodic_omp.cpp +++ b/src/USER-OMP/angle_cosine_periodic_omp.cpp @@ -16,20 +16,16 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_periodic_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" +#include "timer.h" #include "math_special.h" -#include - #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace MathSpecial; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp index 6bd2feb023..6c42319905 100644 --- a/src/USER-OMP/angle_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_exp_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_shift_exp_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_shift_omp.cpp b/src/USER-OMP/angle_cosine_shift_omp.cpp index 56486faac1..5c0afcf316 100644 --- a/src/USER-OMP/angle_cosine_shift_omp.cpp +++ b/src/USER-OMP/angle_cosine_shift_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_shift_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_cosine_squared_omp.cpp b/src/USER-OMP/angle_cosine_squared_omp.cpp index 6dd2a3bb3b..27c47b90d8 100644 --- a/src/USER-OMP/angle_cosine_squared_omp.cpp +++ b/src/USER-OMP/angle_cosine_squared_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_cosine_squared_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_dipole_omp.cpp b/src/USER-OMP/angle_dipole_omp.cpp index da2e819ee2..6af5b44a03 100644 --- a/src/USER-OMP/angle_dipole_omp.cpp +++ b/src/USER-OMP/angle_dipole_omp.cpp @@ -16,20 +16,16 @@ ------------------------------------------------------------------------- */ #include "angle_dipole_omp.h" +#include #include "atom.h" #include "comm.h" #include "error.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_fourier_omp.cpp b/src/USER-OMP/angle_fourier_omp.cpp index b2f9b47e05..98527c2028 100644 --- a/src/USER-OMP/angle_fourier_omp.cpp +++ b/src/USER-OMP/angle_fourier_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_fourier_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_fourier_simple_omp.cpp b/src/USER-OMP/angle_fourier_simple_omp.cpp index 93532a30e5..71d0197b72 100644 --- a/src/USER-OMP/angle_fourier_simple_omp.cpp +++ b/src/USER-OMP/angle_fourier_simple_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_fourier_simple_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_harmonic_omp.cpp b/src/USER-OMP/angle_harmonic_omp.cpp index 824b254287..ee08bbd8ad 100644 --- a/src/USER-OMP/angle_harmonic_omp.cpp +++ b/src/USER-OMP/angle_harmonic_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_harmonic_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_quartic_omp.cpp b/src/USER-OMP/angle_quartic_omp.cpp index fff08ddb39..5745948222 100644 --- a/src/USER-OMP/angle_quartic_omp.cpp +++ b/src/USER-OMP/angle_quartic_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_quartic_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_sdk_omp.cpp b/src/USER-OMP/angle_sdk_omp.cpp index e8c762092c..e0b1da0baf 100644 --- a/src/USER-OMP/angle_sdk_omp.cpp +++ b/src/USER-OMP/angle_sdk_omp.cpp @@ -16,20 +16,16 @@ ------------------------------------------------------------------------- */ #include "angle_sdk_omp.h" +#include #include "atom.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "comm.h" #include "force.h" -#include "math_const.h" - -#include - #include "lj_sdk_common.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace LJSDKParms; #define SMALL 0.001 diff --git a/src/USER-OMP/angle_table_omp.cpp b/src/USER-OMP/angle_table_omp.cpp index d9d80b744d..4f6edf2073 100644 --- a/src/USER-OMP/angle_table_omp.cpp +++ b/src/USER-OMP/angle_table_omp.cpp @@ -16,19 +16,15 @@ ------------------------------------------------------------------------- */ #include "angle_table_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include "math_const.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define SMALL 0.001 diff --git a/src/USER-OMP/bond_class2_omp.cpp b/src/USER-OMP/bond_class2_omp.cpp index fdd73c20b0..7d1b693faf 100644 --- a/src/USER-OMP/bond_class2_omp.cpp +++ b/src/USER-OMP/bond_class2_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_fene_expand_omp.cpp b/src/USER-OMP/bond_fene_expand_omp.cpp index a8eec11760..aefae6dcf7 100644 --- a/src/USER-OMP/bond_fene_expand_omp.cpp +++ b/src/USER-OMP/bond_fene_expand_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "error.h" #include "update.h" diff --git a/src/USER-OMP/bond_fene_omp.cpp b/src/USER-OMP/bond_fene_omp.cpp index be7dcd4b49..2b579114ba 100644 --- a/src/USER-OMP/bond_fene_omp.cpp +++ b/src/USER-OMP/bond_fene_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "error.h" #include "update.h" diff --git a/src/USER-OMP/bond_gromos_omp.cpp b/src/USER-OMP/bond_gromos_omp.cpp index 8f0926c0e9..ba23217a1f 100644 --- a/src/USER-OMP/bond_gromos_omp.cpp +++ b/src/USER-OMP/bond_gromos_omp.cpp @@ -20,9 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" - -#include +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/bond_harmonic_omp.cpp b/src/USER-OMP/bond_harmonic_omp.cpp index a3bb69c53c..5515284f9a 100644 --- a/src/USER-OMP/bond_harmonic_omp.cpp +++ b/src/USER-OMP/bond_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp index 5c16e27a32..a871fa8c04 100644 --- a/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_cut_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_harmonic_shift_omp.cpp b/src/USER-OMP/bond_harmonic_shift_omp.cpp index 39e957c137..4117da9159 100644 --- a/src/USER-OMP/bond_harmonic_shift_omp.cpp +++ b/src/USER-OMP/bond_harmonic_shift_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_morse_omp.cpp b/src/USER-OMP/bond_morse_omp.cpp index c0203de0d6..e6526dc8dc 100644 --- a/src/USER-OMP/bond_morse_omp.cpp +++ b/src/USER-OMP/bond_morse_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_nonlinear_omp.cpp b/src/USER-OMP/bond_nonlinear_omp.cpp index 8fa3daf8ab..0d1a648415 100644 --- a/src/USER-OMP/bond_nonlinear_omp.cpp +++ b/src/USER-OMP/bond_nonlinear_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/bond_quartic_omp.cpp b/src/USER-OMP/bond_quartic_omp.cpp index fd0ccaf79d..60d3a5601c 100644 --- a/src/USER-OMP/bond_quartic_omp.cpp +++ b/src/USER-OMP/bond_quartic_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "pair.h" #include diff --git a/src/USER-OMP/bond_table_omp.cpp b/src/USER-OMP/bond_table_omp.cpp index 1616988385..8e1e792c73 100644 --- a/src/USER-OMP/bond_table_omp.cpp +++ b/src/USER-OMP/bond_table_omp.cpp @@ -20,7 +20,7 @@ #include "comm.h" #include "force.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include diff --git a/src/USER-OMP/dihedral_charmm_omp.cpp b/src/USER-OMP/dihedral_charmm_omp.cpp index b09863613e..95ad9af6a6 100644 --- a/src/USER-OMP/dihedral_charmm_omp.cpp +++ b/src/USER-OMP/dihedral_charmm_omp.cpp @@ -15,13 +15,12 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include #include "dihedral_charmm_omp.h" +#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "pair.h" #include "update.h" diff --git a/src/USER-OMP/dihedral_class2_omp.cpp b/src/USER-OMP/dihedral_class2_omp.cpp index 03ac9d9bab..6c2bc02ff4 100644 --- a/src/USER-OMP/dihedral_class2_omp.cpp +++ b/src/USER-OMP/dihedral_class2_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp index c64cad9fc3..d77e9d6b3e 100644 --- a/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp +++ b/src/USER-OMP/dihedral_cosine_shift_exp_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_fourier_omp.cpp b/src/USER-OMP/dihedral_fourier_omp.cpp index 94bdae3795..93dbd773ca 100644 --- a/src/USER-OMP/dihedral_fourier_omp.cpp +++ b/src/USER-OMP/dihedral_fourier_omp.cpp @@ -15,20 +15,18 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "dihedral_fourier_omp.h" +#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" -#include "math_const.h" #include "suffix.h" using namespace LAMMPS_NS; -using namespace MathConst; #define TOLERANCE 0.05 diff --git a/src/USER-OMP/dihedral_harmonic_omp.cpp b/src/USER-OMP/dihedral_harmonic_omp.cpp index 10ccbd3d9f..84aa584d9e 100644 --- a/src/USER-OMP/dihedral_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_helix_omp.cpp b/src/USER-OMP/dihedral_helix_omp.cpp index 8c8e29cac0..51b07754e2 100644 --- a/src/USER-OMP/dihedral_helix_omp.cpp +++ b/src/USER-OMP/dihedral_helix_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "math_const.h" diff --git a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp index 38961e1746..4cb6919a96 100644 --- a/src/USER-OMP/dihedral_multi_harmonic_omp.cpp +++ b/src/USER-OMP/dihedral_multi_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_nharmonic_omp.cpp b/src/USER-OMP/dihedral_nharmonic_omp.cpp index e74238265d..203884531b 100644 --- a/src/USER-OMP/dihedral_nharmonic_omp.cpp +++ b/src/USER-OMP/dihedral_nharmonic_omp.cpp @@ -20,10 +20,10 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "error.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/dihedral_opls_omp.cpp b/src/USER-OMP/dihedral_opls_omp.cpp index 64eaffe6fe..af12bb866e 100644 --- a/src/USER-OMP/dihedral_opls_omp.cpp +++ b/src/USER-OMP/dihedral_opls_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/dihedral_quadratic_omp.cpp b/src/USER-OMP/dihedral_quadratic_omp.cpp index 8df622b847..8cea62aaea 100644 --- a/src/USER-OMP/dihedral_quadratic_omp.cpp +++ b/src/USER-OMP/dihedral_quadratic_omp.cpp @@ -20,10 +20,10 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" #include "force.h" #include "update.h" #include "error.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/dihedral_table_omp.cpp b/src/USER-OMP/dihedral_table_omp.cpp index 792ee90c26..6b10027b9d 100644 --- a/src/USER-OMP/dihedral_table_omp.cpp +++ b/src/USER-OMP/dihedral_table_omp.cpp @@ -15,19 +15,14 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include - #include "dihedral_table_omp.h" +#include #include "atom.h" #include "comm.h" -#include "neighbor.h" #include "domain.h" +#include "neighbor.h" #include "force.h" -#include "update.h" -#include "error.h" - +#include "timer.h" #include "math_const.h" #include "math_extra.h" diff --git a/src/USER-OMP/domain_omp.cpp b/src/USER-OMP/domain_omp.cpp index 584e56b1f0..a18931c551 100644 --- a/src/USER-OMP/domain_omp.cpp +++ b/src/USER-OMP/domain_omp.cpp @@ -15,7 +15,6 @@ Contributing author : Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include "domain.h" #include "accelerator_omp.h" #include "atom.h" diff --git a/src/USER-OMP/ewald_omp.cpp b/src/USER-OMP/ewald_omp.cpp index b56fc25142..aadf63741d 100644 --- a/src/USER-OMP/ewald_omp.cpp +++ b/src/USER-OMP/ewald_omp.cpp @@ -15,15 +15,14 @@ Contributing authors: Roy Pollock (LLNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include #include "ewald_omp.h" +#include +#include #include "atom.h" #include "comm.h" #include "force.h" #include "memory.h" - -#include - +#include "timer.h" #include "math_const.h" #include "suffix.h" diff --git a/src/USER-OMP/fix_gravity_omp.cpp b/src/USER-OMP/fix_gravity_omp.cpp index eae918ec52..fa6b698821 100644 --- a/src/USER-OMP/fix_gravity_omp.cpp +++ b/src/USER-OMP/fix_gravity_omp.cpp @@ -15,19 +15,12 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "fix_gravity_omp.h" #include "atom.h" #include "update.h" -#include "domain.h" #include "input.h" #include "modify.h" -#include "respa.h" #include "variable.h" -#include "error.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_neigh_history_omp.cpp b/src/USER-OMP/fix_neigh_history_omp.cpp index be03e1d8f2..c2bc8af5e0 100644 --- a/src/USER-OMP/fix_neigh_history_omp.cpp +++ b/src/USER-OMP/fix_neigh_history_omp.cpp @@ -11,19 +11,14 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include #include "fix_neigh_history_omp.h" +#include #include "my_page.h" #include "atom.h" #include "comm.h" -#include "neighbor.h" #include "neigh_list.h" -#include "force.h" #include "pair.h" -#include "update.h" #include "memory.h" -#include "modify.h" #include "error.h" #if defined(_OPENMP) diff --git a/src/USER-OMP/fix_nh_omp.cpp b/src/USER-OMP/fix_nh_omp.cpp index 76a47b71fd..2abd739f71 100644 --- a/src/USER-OMP/fix_nh_omp.cpp +++ b/src/USER-OMP/fix_nh_omp.cpp @@ -16,15 +16,13 @@ ------------------------------------------------------------------------- */ #include "fix_nh_omp.h" +#include #include "atom.h" #include "compute.h" #include "domain.h" #include "error.h" #include "modify.h" -#include -#include - using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_nh_sphere_omp.cpp b/src/USER-OMP/fix_nh_sphere_omp.cpp index a32f0f8b51..64bc536bb0 100644 --- a/src/USER-OMP/fix_nh_sphere_omp.cpp +++ b/src/USER-OMP/fix_nh_sphere_omp.cpp @@ -15,12 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "fix_nh_sphere_omp.h" #include "atom.h" -#include "atom_vec.h" #include "compute.h" -#include "group.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/fix_nve_omp.cpp b/src/USER-OMP/fix_nve_omp.cpp index c61ad7155c..61ed82b16f 100644 --- a/src/USER-OMP/fix_nve_omp.cpp +++ b/src/USER-OMP/fix_nve_omp.cpp @@ -13,7 +13,6 @@ #include "fix_nve_omp.h" #include "atom.h" -#include "force.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_nve_sphere_omp.cpp b/src/USER-OMP/fix_nve_sphere_omp.cpp index 2286120bee..ccdd654874 100644 --- a/src/USER-OMP/fix_nve_sphere_omp.cpp +++ b/src/USER-OMP/fix_nve_sphere_omp.cpp @@ -11,16 +11,10 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_nve_sphere_omp.h" +#include #include "atom.h" -#include "atom_vec.h" -#include "update.h" -#include "respa.h" #include "force.h" -#include "error.h" #include "math_vector.h" #include "math_extra.h" diff --git a/src/USER-OMP/fix_nvt_sllod_omp.cpp b/src/USER-OMP/fix_nvt_sllod_omp.cpp index e439647c12..208dfb9432 100644 --- a/src/USER-OMP/fix_nvt_sllod_omp.cpp +++ b/src/USER-OMP/fix_nvt_sllod_omp.cpp @@ -15,18 +15,17 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include -#include #include "fix_nvt_sllod_omp.h" +#include #include "math_extra.h" #include "atom.h" -#include "domain.h" #include "group.h" #include "modify.h" #include "fix.h" #include "fix_deform.h" #include "compute.h" #include "error.h" +#include "domain.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_omp.cpp b/src/USER-OMP/fix_omp.cpp index a4587b1c14..1fca1e739b 100644 --- a/src/USER-OMP/fix_omp.cpp +++ b/src/USER-OMP/fix_omp.cpp @@ -24,13 +24,10 @@ #include "neigh_request.h" #include "universe.h" #include "update.h" -#include "integrate.h" -#include "min.h" #include "timer.h" #include "fix_omp.h" #include "thr_data.h" -#include "thr_omp.h" #include "pair_hybrid.h" #include "bond_hybrid.h" @@ -40,8 +37,11 @@ #include "kspace.h" #include -#include -#include + +#if defined(_OPENMP) +#include +#endif + #include "suffix.h" diff --git a/src/USER-OMP/fix_qeq_comb_omp.cpp b/src/USER-OMP/fix_qeq_comb_omp.cpp index 2f0a90a790..b0573dfa97 100644 --- a/src/USER-OMP/fix_qeq_comb_omp.cpp +++ b/src/USER-OMP/fix_qeq_comb_omp.cpp @@ -15,24 +15,20 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_qeq_comb_omp.h" #include #include #include -#include "fix_qeq_comb_omp.h" -#include "fix_omp.h" +#include "pair_comb.h" #include "atom.h" #include "comm.h" #include "force.h" #include "group.h" #include "memory.h" -#include "modify.h" #include "error.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "respa.h" #include "update.h" -#include "pair_comb_omp.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index 45da91305d..55e2b73812 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -31,27 +31,22 @@ High Performance Computing Applications, to appear. ------------------------------------------------------------------------- */ -#include -#include -#include -#include #include "fix_qeq_reax_omp.h" -#include "pair_reaxc_omp.h" +#include +#include +#include "pair_reaxc.h" #include "atom.h" #include "comm.h" -#include "domain.h" -#include "neighbor.h" #include "neigh_list.h" -#include "neigh_request.h" #include "update.h" -#include "force.h" -#include "group.h" -#include "pair.h" -#include "respa.h" #include "memory.h" #include "error.h" #include "reaxc_defs.h" +#if defined(_OPENMP) +#include +#endif + using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-OMP/fix_rigid_nh_omp.cpp b/src/USER-OMP/fix_rigid_nh_omp.cpp index e6a6e065bf..74b2a92775 100644 --- a/src/USER-OMP/fix_rigid_nh_omp.cpp +++ b/src/USER-OMP/fix_rigid_nh_omp.cpp @@ -15,11 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_rigid_nh_omp.h" #include #include - -#include "fix_rigid_nh_omp.h" - #include "atom.h" #include "atom_vec_ellipsoid.h" #include "atom_vec_line.h" @@ -32,6 +30,7 @@ #include "kspace.h" #include "modify.h" #include "update.h" +#include "timer.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/fix_rigid_nph_omp.cpp b/src/USER-OMP/fix_rigid_nph_omp.cpp index 7db45ed9bf..31d53868c8 100644 --- a/src/USER-OMP/fix_rigid_nph_omp.cpp +++ b/src/USER-OMP/fix_rigid_nph_omp.cpp @@ -17,9 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include "fix_rigid_nph_omp.h" -#include "domain.h" +#include #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_rigid_npt_omp.cpp b/src/USER-OMP/fix_rigid_npt_omp.cpp index a041706f38..1e7c139d52 100644 --- a/src/USER-OMP/fix_rigid_npt_omp.cpp +++ b/src/USER-OMP/fix_rigid_npt_omp.cpp @@ -17,9 +17,8 @@ Miller et al., J Chem Phys. 116, 8649-8659 (2002) ------------------------------------------------------------------------- */ -#include #include "fix_rigid_npt_omp.h" -#include "domain.h" +#include #include "modify.h" #include "error.h" diff --git a/src/USER-OMP/fix_rigid_omp.cpp b/src/USER-OMP/fix_rigid_omp.cpp index 20478b3ca1..b807ddba7c 100644 --- a/src/USER-OMP/fix_rigid_omp.cpp +++ b/src/USER-OMP/fix_rigid_omp.cpp @@ -15,18 +15,17 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "fix_rigid_omp.h" #include +#include #include - -#include "fix_rigid_omp.h" - #include "atom.h" #include "atom_vec_ellipsoid.h" #include "atom_vec_line.h" #include "atom_vec_tri.h" #include "comm.h" -#include "domain.h" #include "error.h" +#include "domain.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/fix_rigid_small_omp.cpp b/src/USER-OMP/fix_rigid_small_omp.cpp index 1f6173497d..0aa15ee408 100644 --- a/src/USER-OMP/fix_rigid_small_omp.cpp +++ b/src/USER-OMP/fix_rigid_small_omp.cpp @@ -15,10 +15,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include - #include "fix_rigid_small_omp.h" - +#include #include "atom.h" #include "atom_vec_ellipsoid.h" #include "atom_vec_line.h" diff --git a/src/USER-OMP/improper_class2_omp.cpp b/src/USER-OMP/improper_class2_omp.cpp index c2b493f425..3bff179b44 100644 --- a/src/USER-OMP/improper_class2_omp.cpp +++ b/src/USER-OMP/improper_class2_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_cossq_omp.cpp b/src/USER-OMP/improper_cossq_omp.cpp index 3b328e5b78..0f99f2732f 100644 --- a/src/USER-OMP/improper_cossq_omp.cpp +++ b/src/USER-OMP/improper_cossq_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_cvff_omp.cpp b/src/USER-OMP/improper_cvff_omp.cpp index fe1fc45bec..fdc29c74b1 100644 --- a/src/USER-OMP/improper_cvff_omp.cpp +++ b/src/USER-OMP/improper_cvff_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_fourier_omp.cpp b/src/USER-OMP/improper_fourier_omp.cpp index b5af428cb9..b49b895c78 100644 --- a/src/USER-OMP/improper_fourier_omp.cpp +++ b/src/USER-OMP/improper_fourier_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_harmonic_omp.cpp b/src/USER-OMP/improper_harmonic_omp.cpp index 6e02d0968e..32e837fdfe 100644 --- a/src/USER-OMP/improper_harmonic_omp.cpp +++ b/src/USER-OMP/improper_harmonic_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/improper_ring_omp.cpp b/src/USER-OMP/improper_ring_omp.cpp index e198b99337..c8fe685faa 100644 --- a/src/USER-OMP/improper_ring_omp.cpp +++ b/src/USER-OMP/improper_ring_omp.cpp @@ -15,15 +15,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "improper_ring_omp.h" +#include #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" -#include "update.h" -#include "error.h" #include "math_special.h" #include "suffix.h" diff --git a/src/USER-OMP/improper_umbrella_omp.cpp b/src/USER-OMP/improper_umbrella_omp.cpp index ceaca35074..f3fdf4570f 100644 --- a/src/USER-OMP/improper_umbrella_omp.cpp +++ b/src/USER-OMP/improper_umbrella_omp.cpp @@ -20,7 +20,7 @@ #include "atom.h" #include "comm.h" #include "neighbor.h" -#include "domain.h" +#include "timer.h" #include "force.h" #include "update.h" #include "error.h" diff --git a/src/USER-OMP/msm_cg_omp.cpp b/src/USER-OMP/msm_cg_omp.cpp index 8a920e05d5..3c5439db5d 100644 --- a/src/USER-OMP/msm_cg_omp.cpp +++ b/src/USER-OMP/msm_cg_omp.cpp @@ -16,10 +16,10 @@ Original MSM class by: Paul Crozier, Stan Moore, Stephen Bond, (all SNL) ------------------------------------------------------------------------- */ +#include "msm_cg_omp.h" #include #include #include -#include #include #include "atom.h" @@ -29,12 +29,14 @@ #include "force.h" #include "neighbor.h" #include "memory.h" -#include "msm_cg_omp.h" +#include "thr_omp.h" +#include "timer.h" -#include "math_const.h" +#if defined(_OPENMP) +#include +#endif using namespace LAMMPS_NS; -using namespace MathConst; #define OFFSET 16384 #define SMALLQ 0.00001 diff --git a/src/USER-OMP/msm_omp.cpp b/src/USER-OMP/msm_omp.cpp index 74cbb56be7..81f84e8f6f 100644 --- a/src/USER-OMP/msm_omp.cpp +++ b/src/USER-OMP/msm_omp.cpp @@ -16,15 +16,11 @@ ------------------------------------------------------------------------- */ #include "msm_omp.h" -#include "atom.h" +#include #include "comm.h" #include "domain.h" #include "error.h" -#include "force.h" -#include "memory.h" -#include "math_const.h" - -#include +#include "timer.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp index d9e0fb9297..0f791e204d 100644 --- a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp +++ b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp @@ -13,11 +13,9 @@ #include "npair_full_bin_atomonly_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/npair_full_bin_ghost_omp.cpp b/src/USER-OMP/npair_full_bin_ghost_omp.cpp index b915aca002..d541381143 100644 --- a/src/USER-OMP/npair_full_bin_ghost_omp.cpp +++ b/src/USER-OMP/npair_full_bin_ghost_omp.cpp @@ -13,7 +13,6 @@ #include "npair_full_bin_ghost_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_full_multi_omp.cpp b/src/USER-OMP/npair_full_multi_omp.cpp index 9bc196e17a..57b60f665b 100644 --- a/src/USER-OMP/npair_full_multi_omp.cpp +++ b/src/USER-OMP/npair_full_multi_omp.cpp @@ -13,7 +13,6 @@ #include "npair_full_multi_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_full_nsq_ghost_omp.cpp b/src/USER-OMP/npair_full_nsq_ghost_omp.cpp index b33f76bb22..242c4e300c 100644 --- a/src/USER-OMP/npair_full_nsq_ghost_omp.cpp +++ b/src/USER-OMP/npair_full_nsq_ghost_omp.cpp @@ -13,7 +13,6 @@ #include "npair_full_nsq_ghost_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_full_nsq_omp.cpp b/src/USER-OMP/npair_full_nsq_omp.cpp index 1d0f26d638..08a034d5ab 100644 --- a/src/USER-OMP/npair_full_nsq_omp.cpp +++ b/src/USER-OMP/npair_full_nsq_omp.cpp @@ -13,7 +13,6 @@ #include "npair_full_nsq_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp index 02d98ff6ab..a69779d96d 100644 --- a/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp +++ b/src/USER-OMP/npair_half_bin_atomonly_newton_omp.cpp @@ -13,12 +13,9 @@ #include "npair_half_bin_atomonly_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "domain.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp index 24fe75ec55..5f8ffdab29 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newtoff_ghost_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_bin_newtoff_ghost_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_bin_newtoff_omp.cpp index ff74b54d7d..35807645cf 100644 --- a/src/USER-OMP/npair_half_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newtoff_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_bin_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_bin_newton_omp.cpp b/src/USER-OMP/npair_half_bin_newton_omp.cpp index f7d969ba27..2700d6863b 100644 --- a/src/USER-OMP/npair_half_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newton_omp.cpp @@ -13,11 +13,9 @@ #include "npair_half_bin_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "group.h" #include "molecule.h" #include "domain.h" #include "my_page.h" diff --git a/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp index c843d623cd..d94845898c 100644 --- a/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_bin_newton_tri_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_bin_newton_tri_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_multi_newtoff_omp.cpp b/src/USER-OMP/npair_half_multi_newtoff_omp.cpp index 705d1b8d9f..c06737dc1c 100644 --- a/src/USER-OMP/npair_half_multi_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newtoff_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_multi_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_multi_newton_omp.cpp b/src/USER-OMP/npair_half_multi_newton_omp.cpp index f16dd027a0..50df756be4 100644 --- a/src/USER-OMP/npair_half_multi_newton_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newton_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_multi_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_halffull_newtoff_omp.cpp b/src/USER-OMP/npair_halffull_newtoff_omp.cpp index 947e4e1ad2..6f90f82752 100644 --- a/src/USER-OMP/npair_halffull_newtoff_omp.cpp +++ b/src/USER-OMP/npair_halffull_newtoff_omp.cpp @@ -18,7 +18,7 @@ #include "atom.h" #include "atom_vec.h" #include "molecule.h" -#include "domain.h" +#include "timer.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/npair_halffull_newton_omp.cpp b/src/USER-OMP/npair_halffull_newton_omp.cpp index 6e158d372d..6cf8ab8ac2 100644 --- a/src/USER-OMP/npair_halffull_newton_omp.cpp +++ b/src/USER-OMP/npair_halffull_newton_omp.cpp @@ -18,7 +18,7 @@ #include "atom.h" #include "atom_vec.h" #include "molecule.h" -#include "domain.h" +#include "timer.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/pair_brownian_omp.cpp b/src/USER-OMP/pair_brownian_omp.cpp index cef9fb0955..6367976c7d 100644 --- a/src/USER-OMP/pair_brownian_omp.cpp +++ b/src/USER-OMP/pair_brownian_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_brownian_omp.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" @@ -26,6 +26,7 @@ #include "random_mars.h" #include "math_const.h" #include "math_special.h" +#include "timer.h" #include "fix_wall.h" diff --git a/src/USER-OMP/pair_brownian_poly_omp.cpp b/src/USER-OMP/pair_brownian_poly_omp.cpp index 239a820242..dcb4124634 100644 --- a/src/USER-OMP/pair_brownian_poly_omp.cpp +++ b/src/USER-OMP/pair_brownian_poly_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_brownian_poly_omp.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp index d0db6262b1..87d637e80d 100644 --- a/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_thole_long_omp.cpp @@ -22,6 +22,7 @@ #include #include "atom.h" #include "comm.h" +#include "domain.h" #include "fix_drude.h" #include "force.h" #include "neighbor.h" @@ -30,7 +31,7 @@ #include "math_const.h" #include "error.h" #include "suffix.h" -#include "domain.h" +#include "timer.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp index e2c1da1a89..18fc207015 100644 --- a/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp +++ b/src/USER-OMP/pair_lj_cut_tip4p_long_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_lj_cut_tip4p_long_omp.h" +#include #include "atom.h" #include "domain.h" #include "comm.h" diff --git a/src/USER-OMP/pair_lubricate_poly_omp.cpp b/src/USER-OMP/pair_lubricate_poly_omp.cpp index 3a5f03364d..04ac59b121 100644 --- a/src/USER-OMP/pair_lubricate_poly_omp.cpp +++ b/src/USER-OMP/pair_lubricate_poly_omp.cpp @@ -12,8 +12,8 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_lubricate_poly_omp.h" +#include #include "atom.h" #include "comm.h" #include "domain.h" diff --git a/src/USER-OMP/pppm_cg_omp.cpp b/src/USER-OMP/pppm_cg_omp.cpp index 2b4619f685..1117979f1f 100644 --- a/src/USER-OMP/pppm_cg_omp.cpp +++ b/src/USER-OMP/pppm_cg_omp.cpp @@ -15,20 +15,20 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_cg_omp.h" +#include #include #include -#include "pppm_cg_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" -#include "error.h" -#include "fix_omp.h" #include "force.h" -#include "neighbor.h" -#include "memory.h" #include "math_const.h" #include "math_special.h" - +#include "timer.h" +#if defined(_OPENMP) +#include +#endif #include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; diff --git a/src/USER-OMP/pppm_disp_omp.cpp b/src/USER-OMP/pppm_disp_omp.cpp index 435341a31c..de902b1a57 100644 --- a/src/USER-OMP/pppm_disp_omp.cpp +++ b/src/USER-OMP/pppm_disp_omp.cpp @@ -16,15 +16,20 @@ Rolf Isele-Holder (RWTH Aachen University) ------------------------------------------------------------------------- */ +#include "pppm_disp_omp.h" +#include #include #include -#include "pppm_disp_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" +#include "error.h" #include "force.h" -#include "memory.h" #include "math_const.h" +#include "timer.h" +#if defined(_OPENMP) +#include +#endif #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pppm_disp_tip4p_omp.cpp b/src/USER-OMP/pppm_disp_tip4p_omp.cpp index a53c5b2ac5..fc9466e395 100644 --- a/src/USER-OMP/pppm_disp_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_disp_tip4p_omp.cpp @@ -15,23 +15,22 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_disp_tip4p_omp.h" +#include #include #include -#include "pppm_disp_tip4p_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_omp.h" #include "force.h" -#include "memory.h" #include "math_const.h" -#include "math_special.h" - +#if defined(_OPENMP) +#include +#endif #include "suffix.h" using namespace LAMMPS_NS; using namespace MathConst; -using namespace MathSpecial; #ifdef FFT_SINGLE #define ZEROF 0.0f diff --git a/src/USER-OMP/pppm_omp.cpp b/src/USER-OMP/pppm_omp.cpp index 66190b3f51..3ef3de1ab7 100644 --- a/src/USER-OMP/pppm_omp.cpp +++ b/src/USER-OMP/pppm_omp.cpp @@ -15,18 +15,21 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_omp.h" +#include #include #include -#include "pppm_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" -#include "error.h" -#include "fix_omp.h" #include "force.h" -#include "memory.h" #include "math_const.h" #include "math_special.h" +#include "timer.h" + +#if defined(_OPENMP) +#include +#endif #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pppm_tip4p_omp.cpp b/src/USER-OMP/pppm_tip4p_omp.cpp index 5fe44d2b71..d7c12613d9 100644 --- a/src/USER-OMP/pppm_tip4p_omp.cpp +++ b/src/USER-OMP/pppm_tip4p_omp.cpp @@ -15,18 +15,21 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ +#include "pppm_tip4p_omp.h" +#include #include #include -#include "pppm_tip4p_omp.h" #include "atom.h" #include "comm.h" #include "domain.h" #include "error.h" -#include "fix_omp.h" #include "force.h" -#include "memory.h" #include "math_const.h" #include "math_special.h" +#include "timer.h" +#if defined(_OPENMP) +#include +#endif #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/reaxc_multi_body_omp.cpp b/src/USER-OMP/reaxc_multi_body_omp.cpp index 164999b986..5f4b6d4eb0 100644 --- a/src/USER-OMP/reaxc_multi_body_omp.cpp +++ b/src/USER-OMP/reaxc_multi_body_omp.cpp @@ -27,14 +27,13 @@ ----------------------------------------------------------------------*/ #include "reaxc_multi_body_omp.h" +#include +#include +#include "fix_omp.h" #include #include "pair_reaxc_omp.h" -#include "thr_data.h" #include "reaxc_defs.h" - -#include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" -#include "reaxc_vector.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/reaxc_valence_angles_omp.cpp b/src/USER-OMP/reaxc_valence_angles_omp.cpp index 7fbe87d6e5..104fadbbae 100644 --- a/src/USER-OMP/reaxc_valence_angles_omp.cpp +++ b/src/USER-OMP/reaxc_valence_angles_omp.cpp @@ -27,13 +27,15 @@ ----------------------------------------------------------------------*/ #include "reaxc_valence_angles_omp.h" +#include +#include #include "pair_reaxc_omp.h" -#include "thr_data.h" +#include "fix_omp.h" +#include "error.h" #include "reaxc_defs.h" #include "reaxc_types.h" #include "reaxc_valence_angles.h" -#include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_vector.h" diff --git a/src/USER-OMP/respa_omp.cpp b/src/USER-OMP/respa_omp.cpp index 9c8555c66d..5add419253 100644 --- a/src/USER-OMP/respa_omp.cpp +++ b/src/USER-OMP/respa_omp.cpp @@ -15,13 +15,11 @@ Contributing authors: Mark Stevens (SNL), Paul Crozier (SNL) ------------------------------------------------------------------------- */ -#include -#include #include "respa_omp.h" #include "neighbor.h" -#include "domain.h" #include "comm.h" #include "atom.h" +#include "domain.h" #include "force.h" #include "pair.h" #include "bond.h" @@ -32,11 +30,8 @@ #include "output.h" #include "update.h" #include "modify.h" -#include "compute.h" -#include "fix_respa.h" -#include "timer.h" -#include "memory.h" #include "error.h" +#include "timer.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/thr_data.h b/src/USER-OMP/thr_data.h index 3cea1b0018..edff17cad3 100644 --- a/src/USER-OMP/thr_data.h +++ b/src/USER-OMP/thr_data.h @@ -18,10 +18,6 @@ #ifndef LMP_THR_DATA_H #define LMP_THR_DATA_H -#if defined(_OPENMP) -#include -#endif - #include "timer.h" namespace LAMMPS_NS { @@ -35,7 +31,7 @@ class ThrData { public: ThrData(int tid, class Timer *t); - ~ThrData() { delete _timer; _timer = NULL; }; + ~ThrData() { delete _timer; _timer = nullptr; }; void check_tid(int); // thread id consistency check int get_tid() const { return _tid; }; // our thread id. @@ -140,7 +136,7 @@ class ThrData { // disabled default methods private: - ThrData() : _tid(-1), _timer(NULL) {}; + ThrData() : _tid(-1), _timer(nullptr) {}; }; //////////////////////////////////////////////////////////////////////// diff --git a/src/USER-OMP/thr_omp.cpp b/src/USER-OMP/thr_omp.cpp index 22f751e6c0..51030358d3 100644 --- a/src/USER-OMP/thr_omp.cpp +++ b/src/USER-OMP/thr_omp.cpp @@ -22,7 +22,6 @@ #include "comm.h" #include "error.h" #include "force.h" -#include "memory.h" #include "modify.h" #include "neighbor.h" #include "timer.h" @@ -34,7 +33,6 @@ #include "angle.h" #include "dihedral.h" #include "improper.h" -#include "kspace.h" #include "compute.h" #include "math_const.h" diff --git a/src/USER-OMP/thr_omp.h b/src/USER-OMP/thr_omp.h index 87d921290e..062d77bc0e 100644 --- a/src/USER-OMP/thr_omp.h +++ b/src/USER-OMP/thr_omp.h @@ -18,10 +18,13 @@ #ifndef LMP_THR_OMP_H #define LMP_THR_OMP_H +#if defined(_OPENMP) +#include +#endif #include "pointers.h" #include "error.h" -#include "fix_omp.h" -#include "thr_data.h" +#include "fix_omp.h" // IWYU pragma: export +#include "thr_data.h" // IWYU pragma: export namespace LAMMPS_NS { @@ -31,8 +34,6 @@ class Bond; class Angle; class Dihedral; class Improper; -class KSpace; -class Fix; class ThrOMP { diff --git a/src/USER-SMD/pair_smd_tlsph.cpp b/src/USER-SMD/pair_smd_tlsph.cpp index 0dff905962..82b7c8ff9d 100644 --- a/src/USER-SMD/pair_smd_tlsph.cpp +++ b/src/USER-SMD/pair_smd_tlsph.cpp @@ -1776,9 +1776,8 @@ void PairTlsph::init_style() { optional granular history list ------------------------------------------------------------------------- */ -void PairTlsph::init_list(int id, NeighList *ptr) { - if (id == 0) - list = ptr; +void PairTlsph::init_list(int id, class NeighList *ptr) { + if (id == 0) list = ptr; } /* ---------------------------------------------------------------------- @@ -1786,8 +1785,7 @@ void PairTlsph::init_list(int id, NeighList *ptr) { ------------------------------------------------------------------------- */ double PairTlsph::memory_usage() { - - return 118 * nmax * sizeof(double); + return 118.0 * nmax * sizeof(double); } /* ---------------------------------------------------------------------- diff --git a/src/special.cpp b/src/special.cpp index b64aa96e2b..3dd817bc7f 100644 --- a/src/special.cpp +++ b/src/special.cpp @@ -19,7 +19,7 @@ #include "comm.h" #include "modify.h" #include "fix.h" -#include "accelerator_kokkos.h" +#include "accelerator_kokkos.h" // IWYU pragma: export #include "atom_masks.h" #include "memory.h" -- GitLab From 2f646150873b170cbbd4318bc937967effc0d195 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 11 Jul 2019 22:31:16 -0400 Subject: [PATCH 170/236] more work on includes in USER-OMP --- src/USER-OMP/npair_full_bin_atomonly_omp.cpp | 2 -- src/USER-OMP/npair_full_bin_ghost_omp.cpp | 1 - src/USER-OMP/npair_full_bin_omp.cpp | 2 -- src/USER-OMP/npair_full_multi_omp.cpp | 1 - src/USER-OMP/npair_full_nsq_ghost_omp.cpp | 1 - src/USER-OMP/npair_full_nsq_omp.cpp | 1 - src/USER-OMP/npair_half_multi_newton_tri_omp.cpp | 1 - src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp | 1 - src/USER-OMP/npair_half_nsq_newtoff_omp.cpp | 1 - src/USER-OMP/npair_half_nsq_newton_omp.cpp | 1 - src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp | 1 - src/USER-OMP/npair_half_respa_bin_newton_omp.cpp | 1 - src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp | 1 - src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp | 1 - src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp | 1 - src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp | 2 -- src/USER-OMP/npair_half_size_bin_newton_omp.cpp | 2 -- src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp | 1 - src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp | 2 -- src/USER-OMP/npair_half_size_nsq_newton_omp.cpp | 2 -- src/USER-OMP/npair_halffull_newtoff_omp.cpp | 4 ---- src/USER-OMP/npair_halffull_newton_omp.cpp | 3 --- src/USER-OMP/pair_beck_omp.cpp | 4 ++-- src/USER-OMP/pair_born_coul_wolf_omp.cpp | 4 ++-- src/USER-OMP/pair_born_omp.cpp | 4 ++-- src/USER-OMP/pair_buck_omp.cpp | 4 ++-- src/USER-OMP/pair_coul_cut_omp.cpp | 4 ++-- src/USER-OMP/pair_coul_debye_omp.cpp | 4 ++-- src/USER-OMP/pair_coul_dsf_omp.cpp | 5 ++--- src/USER-OMP/pair_coul_wolf_omp.cpp | 4 ++-- src/USER-OMP/pair_dpd_omp.cpp | 4 ++-- 31 files changed, 18 insertions(+), 52 deletions(-) diff --git a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp index 09c4f2d78d..3bda2e4c5a 100644 --- a/src/USER-OMP/npair_full_bin_atomonly_omp.cpp +++ b/src/USER-OMP/npair_full_bin_atomonly_omp.cpp @@ -18,10 +18,8 @@ #include "atom_vec.h" #include "my_page.h" #include "error.h" -#include "timer.h" using namespace LAMMPS_NS; -using namespace NeighConst; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/npair_full_bin_ghost_omp.cpp b/src/USER-OMP/npair_full_bin_ghost_omp.cpp index d541381143..b0b0070df5 100644 --- a/src/USER-OMP/npair_full_bin_ghost_omp.cpp +++ b/src/USER-OMP/npair_full_bin_ghost_omp.cpp @@ -22,7 +22,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace NeighConst; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/npair_full_bin_omp.cpp b/src/USER-OMP/npair_full_bin_omp.cpp index e1f75c06e2..d3e30b4932 100644 --- a/src/USER-OMP/npair_full_bin_omp.cpp +++ b/src/USER-OMP/npair_full_bin_omp.cpp @@ -13,7 +13,6 @@ #include "npair_full_bin_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" @@ -23,7 +22,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace NeighConst; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/npair_full_multi_omp.cpp b/src/USER-OMP/npair_full_multi_omp.cpp index 57b60f665b..707db2edcf 100644 --- a/src/USER-OMP/npair_full_multi_omp.cpp +++ b/src/USER-OMP/npair_full_multi_omp.cpp @@ -22,7 +22,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace NeighConst; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/npair_full_nsq_ghost_omp.cpp b/src/USER-OMP/npair_full_nsq_ghost_omp.cpp index 242c4e300c..527df58fd6 100644 --- a/src/USER-OMP/npair_full_nsq_ghost_omp.cpp +++ b/src/USER-OMP/npair_full_nsq_ghost_omp.cpp @@ -22,7 +22,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace NeighConst; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/npair_full_nsq_omp.cpp b/src/USER-OMP/npair_full_nsq_omp.cpp index 08a034d5ab..2719f5dc2c 100644 --- a/src/USER-OMP/npair_full_nsq_omp.cpp +++ b/src/USER-OMP/npair_full_nsq_omp.cpp @@ -23,7 +23,6 @@ #include "error.h" using namespace LAMMPS_NS; -using namespace NeighConst; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp index ce93e85485..8b78b311dd 100644 --- a/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_multi_newton_tri_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_multi_newton_tri_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp index add4c44d9e..f0eb211425 100644 --- a/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp +++ b/src/USER-OMP/npair_half_nsq_newtoff_ghost_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_nsq_newtoff_ghost_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp index 01da73cf1e..55b9f9e512 100644 --- a/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_nsq_newtoff_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_nsq_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_nsq_newton_omp.cpp index 3815b1b85b..223da622e8 100644 --- a/src/USER-OMP/npair_half_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_nsq_newton_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_nsq_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp index f094691b71..9bb4d277fe 100644 --- a/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newtoff_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_respa_bin_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp index de7ef5f7d5..9ed0ae482d 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_omp.cpp @@ -12,7 +12,6 @@ ------------------------------------------------------------------------- */ #include "npair_half_respa_bin_newton_omp.h" -#include "neighbor.h" #include "npair_omp.h" #include "neigh_list.h" #include "atom.h" diff --git a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp index f20d101bc9..cd03684940 100644 --- a/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_respa_bin_newton_tri_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_respa_bin_newton_tri_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp index 0f726cdd7f..b1e7467ec7 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newtoff_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_respa_nsq_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp index 2783e1255e..c22965895d 100644 --- a/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_respa_nsq_newton_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_respa_nsq_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp index dff2a762d5..1b437482c4 100644 --- a/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newtoff_omp.cpp @@ -11,10 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_bin_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp index 3053b81594..8e0581d4ce 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_omp.cpp @@ -11,10 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_bin_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp index b02bfa345e..38a2c0d61f 100644 --- a/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp +++ b/src/USER-OMP/npair_half_size_bin_newton_tri_omp.cpp @@ -13,7 +13,6 @@ #include "npair_half_size_bin_newton_tri_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp index 717012b226..d1505e1b2e 100644 --- a/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newtoff_omp.cpp @@ -11,10 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_nsq_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp index 5a55029d30..9027b0728d 100644 --- a/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp +++ b/src/USER-OMP/npair_half_size_nsq_newton_omp.cpp @@ -11,10 +11,8 @@ See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ -#include #include "npair_half_size_nsq_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" diff --git a/src/USER-OMP/npair_halffull_newtoff_omp.cpp b/src/USER-OMP/npair_halffull_newtoff_omp.cpp index 6f90f82752..7d2fe4f109 100644 --- a/src/USER-OMP/npair_halffull_newtoff_omp.cpp +++ b/src/USER-OMP/npair_halffull_newtoff_omp.cpp @@ -13,12 +13,8 @@ #include "npair_halffull_newtoff_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" -#include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "timer.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/npair_halffull_newton_omp.cpp b/src/USER-OMP/npair_halffull_newton_omp.cpp index 6cf8ab8ac2..3fcc8c2e98 100644 --- a/src/USER-OMP/npair_halffull_newton_omp.cpp +++ b/src/USER-OMP/npair_halffull_newton_omp.cpp @@ -13,12 +13,9 @@ #include "npair_halffull_newton_omp.h" #include "npair_omp.h" -#include "neighbor.h" #include "neigh_list.h" #include "atom.h" #include "atom_vec.h" -#include "molecule.h" -#include "timer.h" #include "my_page.h" #include "error.h" diff --git a/src/USER-OMP/pair_beck_omp.cpp b/src/USER-OMP/pair_beck_omp.cpp index 90c3777932..8d0605fae9 100644 --- a/src/USER-OMP/pair_beck_omp.cpp +++ b/src/USER-OMP/pair_beck_omp.cpp @@ -12,14 +12,14 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_beck_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "math_special.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_born_coul_wolf_omp.cpp b/src/USER-OMP/pair_born_coul_wolf_omp.cpp index 567eddc9cb..55da972c4e 100644 --- a/src/USER-OMP/pair_born_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_born_coul_wolf_omp.cpp @@ -12,14 +12,14 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_born_coul_wolf_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "math_const.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_born_omp.cpp b/src/USER-OMP/pair_born_omp.cpp index fce2013745..35ad4fcb48 100644 --- a/src/USER-OMP/pair_born_omp.cpp +++ b/src/USER-OMP/pair_born_omp.cpp @@ -12,13 +12,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_born_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_buck_omp.cpp b/src/USER-OMP/pair_buck_omp.cpp index cc7e81b9c5..8d5c80513a 100644 --- a/src/USER-OMP/pair_buck_omp.cpp +++ b/src/USER-OMP/pair_buck_omp.cpp @@ -12,13 +12,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_buck_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_coul_cut_omp.cpp b/src/USER-OMP/pair_coul_cut_omp.cpp index 056daf210a..267beeecbd 100644 --- a/src/USER-OMP/pair_coul_cut_omp.cpp +++ b/src/USER-OMP/pair_coul_cut_omp.cpp @@ -12,13 +12,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_coul_cut_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_coul_debye_omp.cpp b/src/USER-OMP/pair_coul_debye_omp.cpp index d202e314bf..4d3f92c495 100644 --- a/src/USER-OMP/pair_coul_debye_omp.cpp +++ b/src/USER-OMP/pair_coul_debye_omp.cpp @@ -12,13 +12,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_coul_debye_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_coul_dsf_omp.cpp b/src/USER-OMP/pair_coul_dsf_omp.cpp index 217fb844c3..bd7f5cfed2 100644 --- a/src/USER-OMP/pair_coul_dsf_omp.cpp +++ b/src/USER-OMP/pair_coul_dsf_omp.cpp @@ -12,14 +12,13 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_coul_dsf_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" - +#include "timer.h" #include "suffix.h" #include "math_const.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_coul_wolf_omp.cpp b/src/USER-OMP/pair_coul_wolf_omp.cpp index 0913a2b188..92d5bd7b15 100644 --- a/src/USER-OMP/pair_coul_wolf_omp.cpp +++ b/src/USER-OMP/pair_coul_wolf_omp.cpp @@ -12,14 +12,14 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_coul_wolf_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "math_const.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; diff --git a/src/USER-OMP/pair_dpd_omp.cpp b/src/USER-OMP/pair_dpd_omp.cpp index 77db3d9183..b7f3a7f4d4 100644 --- a/src/USER-OMP/pair_dpd_omp.cpp +++ b/src/USER-OMP/pair_dpd_omp.cpp @@ -12,15 +12,15 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include #include "pair_dpd_omp.h" +#include #include "atom.h" #include "comm.h" #include "force.h" -#include "neighbor.h" #include "neigh_list.h" #include "update.h" #include "random_mars.h" +#include "timer.h" #include "suffix.h" using namespace LAMMPS_NS; -- GitLab From a1f0c0079de6d0c7d94fc63f6d9cd76e70b5ce2b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jul 2019 15:40:24 -0400 Subject: [PATCH 171/236] some cleanup for missed steps in previous change sets --- src/KSPACE/pppm.h | 5 +---- src/KSPACE/pppm_disp.h | 5 +---- src/MPIIO/dump_xyz_mpiio.cpp | 1 - src/USER-AWPMD/atom_vec_wavepacket.cpp | 1 - src/USER-AWPMD/fix_nve_awpmd.cpp | 7 +++---- src/USER-AWPMD/fix_nve_awpmd.h | 3 +-- src/USER-AWPMD/pair_awpmd_cut.cpp | 8 ++++++-- src/USER-BOCS/compute_pressure_bocs.cpp | 1 + src/USER-CGSDK/pair_lj_sdk.cpp | 2 -- src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp | 1 - src/USER-DPD/fix_shardlow.cpp | 3 ++- src/USER-OMP/pair_reaxc_omp.cpp | 11 ++++------- src/accelerator_kokkos.h | 16 ++++++++-------- src/finish.cpp | 4 ++-- 14 files changed, 29 insertions(+), 39 deletions(-) diff --git a/src/KSPACE/pppm.h b/src/KSPACE/pppm.h index 1ce1a0d666..b84dfe26c4 100644 --- a/src/KSPACE/pppm.h +++ b/src/KSPACE/pppm.h @@ -20,8 +20,7 @@ KSpaceStyle(pppm,PPPM) #ifndef LMP_PPPM_H #define LMP_PPPM_H -#include "lmptype.h" -#include +#include "kspace.h" #ifdef FFT_SINGLE typedef float FFT_SCALAR; @@ -31,8 +30,6 @@ typedef double FFT_SCALAR; #define MPI_FFT_SCALAR MPI_DOUBLE #endif -#include "kspace.h" - namespace LAMMPS_NS { class PPPM : public KSpace { diff --git a/src/KSPACE/pppm_disp.h b/src/KSPACE/pppm_disp.h index ccbeb60f3c..8582e98acd 100644 --- a/src/KSPACE/pppm_disp.h +++ b/src/KSPACE/pppm_disp.h @@ -20,8 +20,7 @@ KSpaceStyle(pppm/disp,PPPMDisp) #ifndef LMP_PPPM_DISP_H #define LMP_PPPM_DISP_H -#include "lmptype.h" -#include +#include "kspace.h" #ifdef FFT_SINGLE typedef float FFT_SCALAR; @@ -31,8 +30,6 @@ typedef double FFT_SCALAR; #define MPI_FFT_SCALAR MPI_DOUBLE #endif -#include "kspace.h" - namespace LAMMPS_NS { diff --git a/src/MPIIO/dump_xyz_mpiio.cpp b/src/MPIIO/dump_xyz_mpiio.cpp index ee0532399a..f5caab3a9c 100644 --- a/src/MPIIO/dump_xyz_mpiio.cpp +++ b/src/MPIIO/dump_xyz_mpiio.cpp @@ -21,7 +21,6 @@ #include #include "domain.h" #include "update.h" -#include "modify.h" #include "compute.h" #include "memory.h" #include "error.h" diff --git a/src/USER-AWPMD/atom_vec_wavepacket.cpp b/src/USER-AWPMD/atom_vec_wavepacket.cpp index 3dc624e4b8..bce334a7b3 100644 --- a/src/USER-AWPMD/atom_vec_wavepacket.cpp +++ b/src/USER-AWPMD/atom_vec_wavepacket.cpp @@ -16,7 +16,6 @@ ------------------------------------------------------------------------- */ #include "atom_vec_wavepacket.h" -#include #include #include "atom.h" #include "comm.h" diff --git a/src/USER-AWPMD/fix_nve_awpmd.cpp b/src/USER-AWPMD/fix_nve_awpmd.cpp index 57ad17f3e6..a147a11081 100644 --- a/src/USER-AWPMD/fix_nve_awpmd.cpp +++ b/src/USER-AWPMD/fix_nve_awpmd.cpp @@ -16,14 +16,13 @@ ------------------------------------------------------------------------- */ #include "fix_nve_awpmd.h" -#include -#include -#include +#include "pair_awpmd_cut.h" #include "atom.h" #include "force.h" #include "update.h" #include "respa.h" #include "error.h" +#include "utils.h" #include "TCP/wpmd_split.h" @@ -62,7 +61,7 @@ void FixNVEAwpmd::init() dtv = update->dt; dtf = 0.5 * update->dt * force->ftm2v; - if (strstr(update->integrate_style,"respa")) + if (utils::strmatch(update->integrate_style,"^respa")) step_respa = ((Respa *) update->integrate)->step; awpmd_pair=(PairAWPMDCut *)force->pair; diff --git a/src/USER-AWPMD/fix_nve_awpmd.h b/src/USER-AWPMD/fix_nve_awpmd.h index 140d234308..832f5821a3 100644 --- a/src/USER-AWPMD/fix_nve_awpmd.h +++ b/src/USER-AWPMD/fix_nve_awpmd.h @@ -25,7 +25,6 @@ FixStyle(nve/awpmd,FixNVEAwpmd) #define LMP_FIX_NVE_awpmd_H #include "fix.h" -#include "pair_awpmd_cut.h" namespace LAMMPS_NS { @@ -45,7 +44,7 @@ class FixNVEAwpmd : public Fix { double *step_respa; int mass_require; - PairAWPMDCut *awpmd_pair; + class PairAWPMDCut *awpmd_pair; }; } diff --git a/src/USER-AWPMD/pair_awpmd_cut.cpp b/src/USER-AWPMD/pair_awpmd_cut.cpp index ae2fbc59fa..75ebb0e251 100644 --- a/src/USER-AWPMD/pair_awpmd_cut.cpp +++ b/src/USER-AWPMD/pair_awpmd_cut.cpp @@ -16,10 +16,11 @@ ------------------------------------------------------------------------- */ #include "pair_awpmd_cut.h" +#include #include -#include -#include #include +#include +#include #include "atom.h" #include "update.h" #include "min.h" @@ -32,6 +33,9 @@ #include "memory.h" #include "error.h" +#include "logexc.h" +#include "vector_3.h" +#include "TCP/wpmd.h" #include "TCP/wpmd_split.h" using namespace LAMMPS_NS; diff --git a/src/USER-BOCS/compute_pressure_bocs.cpp b/src/USER-BOCS/compute_pressure_bocs.cpp index ee1ad33f88..d0a24b99a3 100644 --- a/src/USER-BOCS/compute_pressure_bocs.cpp +++ b/src/USER-BOCS/compute_pressure_bocs.cpp @@ -16,6 +16,7 @@ #include "compute_pressure_bocs.h" #include +#include #include #include #include "atom.h" diff --git a/src/USER-CGSDK/pair_lj_sdk.cpp b/src/USER-CGSDK/pair_lj_sdk.cpp index 6ad77a6183..1301dc4155 100644 --- a/src/USER-CGSDK/pair_lj_sdk.cpp +++ b/src/USER-CGSDK/pair_lj_sdk.cpp @@ -24,7 +24,6 @@ #include "comm.h" #include "force.h" #include "neigh_list.h" -#include "math_const.h" #include "memory.h" #include "error.h" @@ -32,7 +31,6 @@ #include "lj_sdk_common.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace LJSDKParms; /* ---------------------------------------------------------------------- */ diff --git a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp index 1095521de3..f168089fae 100644 --- a/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp +++ b/src/USER-CGSDK/pair_lj_sdk_coul_msm.cpp @@ -23,7 +23,6 @@ #include "force.h" #include "kspace.h" #include "neigh_list.h" -#include "memory.h" #include "error.h" #include "lj_sdk_common.h" diff --git a/src/USER-DPD/fix_shardlow.cpp b/src/USER-DPD/fix_shardlow.cpp index f181436f91..b0efeb634d 100644 --- a/src/USER-DPD/fix_shardlow.cpp +++ b/src/USER-DPD/fix_shardlow.cpp @@ -37,15 +37,16 @@ #include #include #include +#include #include "atom.h" #include "force.h" #include "update.h" #include "error.h" -#include "atom_vec.h" #include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" +#include "npair.h" #include "memory.h" #include "domain.h" #include "modify.h" diff --git a/src/USER-OMP/pair_reaxc_omp.cpp b/src/USER-OMP/pair_reaxc_omp.cpp index 2f17515130..aedd438066 100644 --- a/src/USER-OMP/pair_reaxc_omp.cpp +++ b/src/USER-OMP/pair_reaxc_omp.cpp @@ -34,6 +34,8 @@ ------------------------------------------------------------------------- */ #include "pair_reaxc_omp.h" +#include +#include #include "atom.h" #include "update.h" #include "force.h" @@ -42,32 +44,27 @@ #include "neigh_list.h" #include "neigh_request.h" #include "modify.h" -#include "fix.h" #include "fix_reaxc.h" #include "citeme.h" #include "memory.h" #include "error.h" #include "timer.h" +#include "reaxc_defs.h" #include "reaxc_types.h" #include "reaxc_allocate.h" -#include "reaxc_control.h" -#include "reaxc_ffield.h" #include "reaxc_forces_omp.h" #include "reaxc_init_md_omp.h" #include "reaxc_io_tools.h" #include "reaxc_list.h" -#include "reaxc_lookup.h" #include "reaxc_reset_tools.h" #include "reaxc_tool_box.h" -#include "reaxc_traj.h" -#include "reaxc_vector.h" -#include "fix_reaxc_bonds.h" #if defined(_OPENMP) #include #endif +#include "suffix.h" using namespace LAMMPS_NS; #ifdef OMP_TIMING diff --git a/src/accelerator_kokkos.h b/src/accelerator_kokkos.h index 74bd470572..a3fff2fe16 100644 --- a/src/accelerator_kokkos.h +++ b/src/accelerator_kokkos.h @@ -19,14 +19,14 @@ #ifdef LMP_KOKKOS -#include "kokkos.h" -#include "atom_kokkos.h" -#include "comm_kokkos.h" -#include "comm_tiled_kokkos.h" -#include "domain_kokkos.h" -#include "neighbor_kokkos.h" -#include "memory_kokkos.h" -#include "modify_kokkos.h" +#include "kokkos.h" // IWYU pragma: export +#include "atom_kokkos.h" // IWYU pragma: export +#include "comm_kokkos.h" // IWYU pragma: export +#include "comm_tiled_kokkos.h" // IWYU pragma: export +#include "domain_kokkos.h" // IWYU pragma: export +#include "neighbor_kokkos.h" // IWYU pragma: export +#include "memory_kokkos.h" // IWYU pragma: export +#include "modify_kokkos.h" // IWYU pragma: export #define LAMMPS_INLINE KOKKOS_INLINE_FUNCTION diff --git a/src/finish.cpp b/src/finish.cpp index bef3ae89eb..9ab97ae410 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -16,8 +16,6 @@ #include #include #include -#include "timer.h" -#include "universe.h" #include "accelerator_kokkos.h" #include "atom.h" #include "atom_vec.h" @@ -32,6 +30,8 @@ #include "neigh_request.h" #include "memory.h" #include "error.h" +#include "timer.h" +#include "universe.h" #ifdef LMP_USER_OMP #include "modify.h" -- GitLab From 3d157e5ab4c7f8481ec2170ff3d557f0bd1b37cc Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 12 Jul 2019 18:00:59 -0400 Subject: [PATCH 172/236] more include handling cleanup in USER packages --- src/USER-DRUDE/fix_drude_transform.cpp | 1 + src/USER-DRUDE/fix_langevin_drude.cpp | 1 + src/USER-EFF/compute_temp_eff.cpp | 1 + src/USER-LB/fix_lb_fluid.cpp | 5 ++--- src/USER-LB/fix_lb_momentum.cpp | 5 ++--- src/USER-LB/fix_lb_pc.cpp | 5 +---- src/USER-LB/fix_lb_rigid_pc_sphere.cpp | 7 ++----- src/USER-LB/fix_lb_viscous.cpp | 4 +--- src/USER-MGPT/pair_mgpt.h | 2 -- src/USER-MOLFILE/dump_molfile.cpp | 5 ++--- src/USER-MOLFILE/reader_molfile.cpp | 4 +--- src/USER-OMP/fix_qeq_reax_omp.cpp | 1 + src/USER-OMP/pair_reaxc_omp.h | 1 - src/USER-OMP/reaxc_bond_orders_omp.cpp | 3 +++ src/USER-OMP/reaxc_bonds_omp.cpp | 7 +++---- src/USER-OMP/reaxc_forces_omp.cpp | 7 +++---- src/USER-OMP/reaxc_forces_omp.h | 1 - src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp | 4 +++- src/USER-OMP/reaxc_init_md_omp.cpp | 7 ++----- src/USER-OMP/reaxc_torsion_angles_omp.cpp | 5 ++--- src/USER-PTM/ptm_index.cpp | 1 + src/USER-PTM/ptm_initialize_data.cpp | 4 ++++ src/USER-PTM/ptm_initialize_data.h | 4 ---- 23 files changed, 36 insertions(+), 49 deletions(-) diff --git a/src/USER-DRUDE/fix_drude_transform.cpp b/src/USER-DRUDE/fix_drude_transform.cpp index 8e85f1dffd..4128c508d6 100644 --- a/src/USER-DRUDE/fix_drude_transform.cpp +++ b/src/USER-DRUDE/fix_drude_transform.cpp @@ -13,6 +13,7 @@ /** Fix Drude Transform ******************************************************/ #include "fix_drude_transform.h" +#include #include #include #include "fix_drude.h" diff --git a/src/USER-DRUDE/fix_langevin_drude.cpp b/src/USER-DRUDE/fix_langevin_drude.cpp index 1a16c3df96..d413c31bd7 100644 --- a/src/USER-DRUDE/fix_langevin_drude.cpp +++ b/src/USER-DRUDE/fix_langevin_drude.cpp @@ -12,6 +12,7 @@ ------------------------------------------------------------------------- */ #include "fix_langevin_drude.h" +#include #include #include #include "fix_drude.h" diff --git a/src/USER-EFF/compute_temp_eff.cpp b/src/USER-EFF/compute_temp_eff.cpp index 8e07e390fa..e9295ea680 100644 --- a/src/USER-EFF/compute_temp_eff.cpp +++ b/src/USER-EFF/compute_temp_eff.cpp @@ -17,6 +17,7 @@ #include "compute_temp_eff.h" #include +#include #include "atom.h" #include "update.h" #include "force.h" diff --git a/src/USER-LB/fix_lb_fluid.cpp b/src/USER-LB/fix_lb_fluid.cpp index 31c54aee76..8ad3dbe33e 100644 --- a/src/USER-LB/fix_lb_fluid.cpp +++ b/src/USER-LB/fix_lb_fluid.cpp @@ -20,15 +20,14 @@ #include #include #include -#include #include +#include +#include #include "comm.h" #include "memory.h" #include "error.h" #include "domain.h" #include "atom.h" -#include -#include #include "group.h" #include "random_mars.h" #include "update.h" diff --git a/src/USER-LB/fix_lb_momentum.cpp b/src/USER-LB/fix_lb_momentum.cpp index df17561380..10fffed018 100644 --- a/src/USER-LB/fix_lb_momentum.cpp +++ b/src/USER-LB/fix_lb_momentum.cpp @@ -18,16 +18,15 @@ Contributing author: Naveen Michaud-Agrawal (Johns Hopkins U) ------------------------------------------------------------------------- */ +#include "fix_lb_momentum.h" +#include #include #include -#include "fix_lb_momentum.h" #include "atom.h" -#include "domain.h" #include "group.h" #include "error.h" #include "fix_lb_fluid.h" #include "modify.h" -#include "comm.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/USER-LB/fix_lb_pc.cpp b/src/USER-LB/fix_lb_pc.cpp index ce6ca0c9a1..d61692419a 100644 --- a/src/USER-LB/fix_lb_pc.cpp +++ b/src/USER-LB/fix_lb_pc.cpp @@ -15,17 +15,14 @@ Contributing authors: Frances Mackay, Santtu Ollila, Colin Denniston (UWO) ------------------------------------------------------------------------- */ +#include "fix_lb_pc.h" #include -#include #include -#include "fix_lb_pc.h" #include "atom.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" #include "memory.h" -#include "comm.h" #include "domain.h" #include "fix_lb_fluid.h" #include "modify.h" diff --git a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp index 83dc751631..af1b01043d 100644 --- a/src/USER-LB/fix_lb_rigid_pc_sphere.cpp +++ b/src/USER-LB/fix_lb_rigid_pc_sphere.cpp @@ -16,21 +16,18 @@ Based on fix_rigid (version from 2008). ------------------------------------------------------------------------- */ +#include "fix_lb_rigid_pc_sphere.h" +#include #include -#include #include #include -#include "fix_lb_rigid_pc_sphere.h" #include "atom.h" -#include "atom_vec.h" #include "domain.h" #include "update.h" -#include "respa.h" #include "modify.h" #include "group.h" #include "comm.h" #include "force.h" -#include "output.h" #include "memory.h" #include "error.h" #include "fix_lb_fluid.h" diff --git a/src/USER-LB/fix_lb_viscous.cpp b/src/USER-LB/fix_lb_viscous.cpp index afe23477be..59fddebd67 100644 --- a/src/USER-LB/fix_lb_viscous.cpp +++ b/src/USER-LB/fix_lb_viscous.cpp @@ -15,10 +15,8 @@ Contributing authors: Frances Mackay, Santtu Ollila, Colin Denniston (UWO) ------------------------------------------------------------------------- */ -#include -#include -#include #include "fix_lb_viscous.h" +#include #include "atom.h" #include "update.h" #include "respa.h" diff --git a/src/USER-MGPT/pair_mgpt.h b/src/USER-MGPT/pair_mgpt.h index 3e861a0198..ff71edc9f3 100644 --- a/src/USER-MGPT/pair_mgpt.h +++ b/src/USER-MGPT/pair_mgpt.h @@ -30,8 +30,6 @@ PairStyle(mgpt,PairMGPT) #ifndef LMP_PAIR_MGPT_H #define LMP_PAIR_MGPT_H -#include -#include #include #include diff --git a/src/USER-MOLFILE/dump_molfile.cpp b/src/USER-MOLFILE/dump_molfile.cpp index 732fea74bd..d9d8ec3c97 100644 --- a/src/USER-MOLFILE/dump_molfile.cpp +++ b/src/USER-MOLFILE/dump_molfile.cpp @@ -15,15 +15,14 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include "dump_molfile.h" +#include #include #include -#include "dump_molfile.h" #include "domain.h" #include "atom.h" #include "comm.h" #include "update.h" -#include "output.h" #include "group.h" #include "memory.h" #include "error.h" diff --git a/src/USER-MOLFILE/reader_molfile.cpp b/src/USER-MOLFILE/reader_molfile.cpp index ca1a61850c..5cff56753b 100644 --- a/src/USER-MOLFILE/reader_molfile.cpp +++ b/src/USER-MOLFILE/reader_molfile.cpp @@ -15,11 +15,9 @@ Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ -#include +#include "reader_molfile.h" #include #include -#include "reader_molfile.h" -#include "atom.h" #include "comm.h" #include "memory.h" #include "error.h" diff --git a/src/USER-OMP/fix_qeq_reax_omp.cpp b/src/USER-OMP/fix_qeq_reax_omp.cpp index 55e2b73812..f7945b5579 100644 --- a/src/USER-OMP/fix_qeq_reax_omp.cpp +++ b/src/USER-OMP/fix_qeq_reax_omp.cpp @@ -42,6 +42,7 @@ #include "memory.h" #include "error.h" #include "reaxc_defs.h" +#include "reaxc_types.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/pair_reaxc_omp.h b/src/USER-OMP/pair_reaxc_omp.h index ad8c368aaf..0cae28f56b 100644 --- a/src/USER-OMP/pair_reaxc_omp.h +++ b/src/USER-OMP/pair_reaxc_omp.h @@ -22,7 +22,6 @@ PairStyle(reax/c/omp,PairReaxCOMP) #include "pair_reaxc.h" #include "thr_omp.h" -#include "suffix.h" namespace LAMMPS_NS { diff --git a/src/USER-OMP/reaxc_bond_orders_omp.cpp b/src/USER-OMP/reaxc_bond_orders_omp.cpp index 17715c6e26..d581819e00 100644 --- a/src/USER-OMP/reaxc_bond_orders_omp.cpp +++ b/src/USER-OMP/reaxc_bond_orders_omp.cpp @@ -27,6 +27,9 @@ ----------------------------------------------------------------------*/ #include "reaxc_bond_orders_omp.h" +#include +#include +#include "fix_omp.h" #include "reaxc_defs.h" #include "pair_reaxc_omp.h" #include "reaxc_types.h" diff --git a/src/USER-OMP/reaxc_bonds_omp.cpp b/src/USER-OMP/reaxc_bonds_omp.cpp index 12ba1dcbfe..b6a76b3f3a 100644 --- a/src/USER-OMP/reaxc_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_bonds_omp.cpp @@ -27,13 +27,12 @@ ----------------------------------------------------------------------*/ #include "reaxc_bonds_omp.h" +#include +#include +#include "fix_omp.h" #include "reaxc_defs.h" -#include "reaxc_bond_orders_omp.h" #include "pair_reaxc_omp.h" - #include "reaxc_list.h" -#include "reaxc_tool_box.h" -#include "reaxc_vector.h" #if defined(_OPENMP) #include diff --git a/src/USER-OMP/reaxc_forces_omp.cpp b/src/USER-OMP/reaxc_forces_omp.cpp index 1ada5e7e71..971667cc2d 100644 --- a/src/USER-OMP/reaxc_forces_omp.cpp +++ b/src/USER-OMP/reaxc_forces_omp.cpp @@ -27,19 +27,18 @@ ----------------------------------------------------------------------*/ #include "reaxc_forces_omp.h" +#include +#include +#include "fix_omp.h" #include "reaxc_defs.h" #include "pair_reaxc_omp.h" -#include "thr_data.h" #include "reaxc_bond_orders_omp.h" #include "reaxc_bonds_omp.h" #include "reaxc_hydrogen_bonds_omp.h" -#include "reaxc_io_tools.h" #include "reaxc_list.h" -#include "reaxc_lookup.h" #include "reaxc_multi_body_omp.h" #include "reaxc_nonbonded_omp.h" -#include "reaxc_tool_box.h" #include "reaxc_torsion_angles_omp.h" #include "reaxc_valence_angles_omp.h" #include "reaxc_vector.h" diff --git a/src/USER-OMP/reaxc_forces_omp.h b/src/USER-OMP/reaxc_forces_omp.h index d1e2a5c65a..6df0288656 100644 --- a/src/USER-OMP/reaxc_forces_omp.h +++ b/src/USER-OMP/reaxc_forces_omp.h @@ -30,7 +30,6 @@ #define __FORCES_OMP_H_ #include "reaxc_types.h" -#include "reaxc_defs.h" void Init_Force_FunctionsOMP( control_params* ); void Compute_ForcesOMP( reax_system*, control_params*, simulation_data*, diff --git a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp index e3c034a12e..d06966a92d 100644 --- a/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp +++ b/src/USER-OMP/reaxc_hydrogen_bonds_omp.cpp @@ -27,9 +27,11 @@ ----------------------------------------------------------------------*/ #include "reaxc_hydrogen_bonds_omp.h" +#include +#include +#include "fix_omp.h" #include "pair_reaxc_omp.h" #include "reaxc_defs.h" -#include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" #include "reaxc_valence_angles.h" // To access Calculate_Theta() #include "reaxc_valence_angles_omp.h" // To access Calculate_dCos_ThetaOMP() diff --git a/src/USER-OMP/reaxc_init_md_omp.cpp b/src/USER-OMP/reaxc_init_md_omp.cpp index 847e916666..9d40479ddf 100644 --- a/src/USER-OMP/reaxc_init_md_omp.cpp +++ b/src/USER-OMP/reaxc_init_md_omp.cpp @@ -27,18 +27,15 @@ ----------------------------------------------------------------------*/ #include "reaxc_init_md_omp.h" -#include "pair_reaxc_omp.h" +#include #include "reaxc_defs.h" -#include "reaxc_allocate.h" #include "reaxc_forces.h" #include "reaxc_forces_omp.h" #include "reaxc_io_tools.h" #include "reaxc_list.h" #include "reaxc_lookup.h" -#include "reaxc_reset_tools.h" -#include "reaxc_system_props.h" #include "reaxc_tool_box.h" -#include "reaxc_vector.h" +#include "error.h" // Functions defined in reaxc_init_md.cpp extern int Init_MPI_Datatypes(reax_system*, storage*, mpi_datatypes*, MPI_Comm, char*); diff --git a/src/USER-OMP/reaxc_torsion_angles_omp.cpp b/src/USER-OMP/reaxc_torsion_angles_omp.cpp index 9cd716b594..68bacb7202 100644 --- a/src/USER-OMP/reaxc_torsion_angles_omp.cpp +++ b/src/USER-OMP/reaxc_torsion_angles_omp.cpp @@ -27,14 +27,13 @@ ----------------------------------------------------------------------*/ #include "reaxc_torsion_angles_omp.h" +#include +#include "fix_omp.h" #include "pair_reaxc_omp.h" -#include "thr_data.h" #include "reaxc_defs.h" #include "reaxc_types.h" -#include "reaxc_bond_orders_omp.h" #include "reaxc_list.h" -#include "reaxc_tool_box.h" #include "reaxc_vector.h" #if defined(_OPENMP) diff --git a/src/USER-PTM/ptm_index.cpp b/src/USER-PTM/ptm_index.cpp index b50e5c4333..cedd35126d 100644 --- a/src/USER-PTM/ptm_index.cpp +++ b/src/USER-PTM/ptm_index.cpp @@ -22,6 +22,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include #include #include +#include static double calculate_interatomic_distance(int type, double scale) { assert(type >= 1 && type <= 8); diff --git a/src/USER-PTM/ptm_initialize_data.cpp b/src/USER-PTM/ptm_initialize_data.cpp index 1f0a5c94af..ff8245fe44 100644 --- a/src/USER-PTM/ptm_initialize_data.cpp +++ b/src/USER-PTM/ptm_initialize_data.cpp @@ -8,6 +8,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI */ #include "ptm_initialize_data.h" +#include "ptm_canonical_coloured.h" +#include "ptm_convex_hull_incremental.h" +#include "ptm_graph_tools.h" +#include "ptm_neighbour_ordering.h" #include diff --git a/src/USER-PTM/ptm_initialize_data.h b/src/USER-PTM/ptm_initialize_data.h index 20c9921962..4e7f3e8f0a 100644 --- a/src/USER-PTM/ptm_initialize_data.h +++ b/src/USER-PTM/ptm_initialize_data.h @@ -12,12 +12,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #include "ptm_graph_data.h" -#include "ptm_graph_tools.h" #include "ptm_deformation_gradient.h" #include "ptm_fundamental_mappings.h" -#include "ptm_neighbour_ordering.h" -#include "ptm_canonical_coloured.h" -#include "ptm_convex_hull_incremental.h" #include "ptm_alt_templates.h" -- GitLab From 2b5a6d3b7fe4cd96240c9970aa0ce089c318f8f5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 15 Jul 2019 18:05:20 -0400 Subject: [PATCH 173/236] clean up (some) includes in KOKKOS package --- src/KOKKOS/fix_dpd_energy_kokkos.cpp | 5 ----- src/KOKKOS/fix_eos_table_rx_kokkos.cpp | 3 --- src/KOKKOS/fix_langevin_kokkos.cpp | 7 ++----- src/KOKKOS/fix_qeq_reax_kokkos.cpp | 7 ------- src/KOKKOS/fix_reaxc_bonds_kokkos.cpp | 13 ------------- src/KOKKOS/fix_reaxc_species_kokkos.cpp | 10 ---------- src/KOKKOS/fix_rx_kokkos.cpp | 2 -- src/KOKKOS/fix_setforce_kokkos.cpp | 4 +--- src/KOKKOS/fix_setforce_kokkos.h | 3 +-- src/KOKKOS/fix_shardlow_kokkos.cpp | 10 +--------- src/KOKKOS/improper_class2_kokkos.cpp | 7 ------- src/KOKKOS/improper_harmonic_kokkos.cpp | 6 ------ src/KOKKOS/nbin_ssa_kokkos.cpp | 3 --- src/KOKKOS/npair_copy_kokkos.cpp | 7 ------- src/KOKKOS/npair_skip_kokkos.cpp | 4 ---- src/KOKKOS/pair_buck_coul_cut_kokkos.cpp | 4 ---- src/KOKKOS/pair_buck_coul_long_kokkos.cpp | 6 ------ src/KOKKOS/pair_buck_kokkos.cpp | 6 ------ src/KOKKOS/pair_coul_cut_kokkos.cpp | 9 --------- src/KOKKOS/pair_coul_debye_kokkos.cpp | 6 ------ src/KOKKOS/pair_coul_dsf_kokkos.cpp | 7 ------- src/KOKKOS/pair_coul_long_kokkos.cpp | 6 ------ src/KOKKOS/pair_coul_wolf_kokkos.cpp | 7 ------- src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp | 6 ------ src/KOKKOS/pair_eam_alloy_kokkos.cpp | 2 -- src/KOKKOS/pair_eam_fs_kokkos.cpp | 2 -- src/KOKKOS/pair_eam_kokkos.cpp | 3 --- src/KOKKOS/pair_exp6_rx_kokkos.cpp | 4 ---- src/KOKKOS/pair_hybrid_kokkos.cpp | 5 ----- src/KOKKOS/pair_hybrid_overlay_kokkos.cpp | 3 --- .../pair_lj_charmm_coul_charmm_implicit_kokkos.cpp | 7 ------- src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp | 5 ----- src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_class2_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp | 4 ---- src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp | 4 ---- src/KOKKOS/pair_lj_cut_kokkos.cpp | 7 ------- src/KOKKOS/pair_lj_expand_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_gromacs_kokkos.cpp | 6 ------ src/KOKKOS/pair_lj_sdk_kokkos.cpp | 5 ----- src/KOKKOS/pair_morse_kokkos.cpp | 4 ---- src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp | 5 ----- src/KOKKOS/pair_reaxc_kokkos.cpp | 5 ----- src/KOKKOS/pair_sw_kokkos.cpp | 4 ---- src/KOKKOS/pair_table_kokkos.cpp | 4 ---- src/KOKKOS/pair_table_rx_kokkos.cpp | 1 - src/KOKKOS/pair_tersoff_kokkos.cpp | 6 ------ src/KOKKOS/pair_tersoff_mod_kokkos.cpp | 6 ------ src/KOKKOS/pair_tersoff_zbl_kokkos.cpp | 4 ---- src/KOKKOS/pair_vashishta_kokkos.cpp | 4 ---- src/KOKKOS/pair_yukawa_kokkos.cpp | 5 ----- src/KOKKOS/pair_zbl_kokkos.cpp | 6 ------ src/KOKKOS/pppm_kokkos.cpp | 5 ----- src/KOKKOS/region_block_kokkos.cpp | 4 ---- src/KOKKOS/verlet_kokkos.cpp | 7 ------- 60 files changed, 5 insertions(+), 318 deletions(-) diff --git a/src/KOKKOS/fix_dpd_energy_kokkos.cpp b/src/KOKKOS/fix_dpd_energy_kokkos.cpp index debad0407a..20579a6dc5 100644 --- a/src/KOKKOS/fix_dpd_energy_kokkos.cpp +++ b/src/KOKKOS/fix_dpd_energy_kokkos.cpp @@ -12,14 +12,9 @@ ------------------------------------------------------------------------- */ #include "fix_dpd_energy_kokkos.h" -#include -#include #include "atom_masks.h" #include "atom_kokkos.h" -#include "force.h" #include "update.h" -#include "respa.h" -#include "modify.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp index d0280eeef0..89561c9a92 100644 --- a/src/KOKKOS/fix_eos_table_rx_kokkos.cpp +++ b/src/KOKKOS/fix_eos_table_rx_kokkos.cpp @@ -16,15 +16,12 @@ ------------------------------------------------------------------------- */ #include "fix_eos_table_rx_kokkos.h" -#include -#include #include "atom_kokkos.h" #include "error.h" #include "force.h" #include "memory_kokkos.h" #include "comm.h" #include -#include "modify.h" #include "atom_masks.h" #define MAXLINE 1024 diff --git a/src/KOKKOS/fix_langevin_kokkos.cpp b/src/KOKKOS/fix_langevin_kokkos.cpp index 23a43b38ef..651f790a25 100644 --- a/src/KOKKOS/fix_langevin_kokkos.cpp +++ b/src/KOKKOS/fix_langevin_kokkos.cpp @@ -13,21 +13,18 @@ #include "fix_langevin_kokkos.h" #include -#include -#include #include "atom_masks.h" #include "atom_kokkos.h" #include "force.h" +#include "group.h" #include "update.h" -#include "respa.h" #include "error.h" #include "memory_kokkos.h" -#include "group.h" -#include "random_mars.h" #include "compute.h" #include "comm.h" #include "modify.h" #include "input.h" +#include "region.h" #include "variable.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/fix_qeq_reax_kokkos.cpp b/src/KOKKOS/fix_qeq_reax_kokkos.cpp index 6f8392ab16..e51fbacaaf 100644 --- a/src/KOKKOS/fix_qeq_reax_kokkos.cpp +++ b/src/KOKKOS/fix_qeq_reax_kokkos.cpp @@ -18,24 +18,17 @@ #include "fix_qeq_reax_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "atom.h" #include "atom_masks.h" #include "atom_kokkos.h" #include "comm.h" #include "force.h" -#include "group.h" -#include "modify.h" #include "neighbor.h" #include "neigh_list_kokkos.h" #include "neigh_request.h" #include "update.h" #include "integrate.h" -#include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "pair_reaxc_kokkos.h" diff --git a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp index 347c477476..51702bc603 100644 --- a/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_bonds_kokkos.cpp @@ -15,26 +15,13 @@ Contributing author: Stan Moore (Sandia) ------------------------------------------------------------------------- */ -#include "fix_ave_atom.h" -#include -#include #include "fix_reaxc_bonds_kokkos.h" #include "atom.h" -#include "update.h" #include "pair_reaxc_kokkos.h" -#include "modify.h" -#include "neighbor.h" -#include "neigh_list.h" -#include "neigh_request.h" -#include "comm.h" #include "force.h" #include "compute.h" -#include "input.h" -#include "variable.h" #include "memory_kokkos.h" #include "error.h" -#include "reaxc_list.h" -#include "reaxc_types.h" #include "reaxc_defs.h" #include "atom_masks.h" diff --git a/src/KOKKOS/fix_reaxc_species_kokkos.cpp b/src/KOKKOS/fix_reaxc_species_kokkos.cpp index f32bea2c67..f3bce2f9c0 100644 --- a/src/KOKKOS/fix_reaxc_species_kokkos.cpp +++ b/src/KOKKOS/fix_reaxc_species_kokkos.cpp @@ -16,27 +16,17 @@ ------------------------------------------------------------------------- */ #include "fix_reaxc_species_kokkos.h" -#include -#include #include "atom.h" -#include #include "fix_ave_atom.h" -#include "domain.h" -#include "update.h" #include "reaxc_defs.h" #include "pair_reaxc_kokkos.h" -#include "modify.h" -#include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "comm.h" #include "force.h" -#include "compute.h" #include "input.h" -#include "variable.h" #include "memory_kokkos.h" #include "error.h" -#include "reaxc_list.h" #include "atom_masks.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/fix_rx_kokkos.cpp b/src/KOKKOS/fix_rx_kokkos.cpp index 050dda2400..e06fc14585 100644 --- a/src/KOKKOS/fix_rx_kokkos.cpp +++ b/src/KOKKOS/fix_rx_kokkos.cpp @@ -12,14 +12,12 @@ ------------------------------------------------------------------------- */ #include "fix_rx_kokkos.h" -#include #include #include "atom_masks.h" #include "atom_kokkos.h" #include "force.h" #include "memory_kokkos.h" #include "update.h" -#include "respa.h" #include "modify.h" #include "neighbor.h" #include "neigh_list_kokkos.h" diff --git a/src/KOKKOS/fix_setforce_kokkos.cpp b/src/KOKKOS/fix_setforce_kokkos.cpp index 03cfd3afb2..4165b100f5 100644 --- a/src/KOKKOS/fix_setforce_kokkos.cpp +++ b/src/KOKKOS/fix_setforce_kokkos.cpp @@ -13,20 +13,18 @@ #include "fix_setforce_kokkos.h" #include -#include #include "atom_kokkos.h" #include "update.h" #include "modify.h" #include "domain.h" #include "region.h" -#include "respa.h" #include "input.h" #include "variable.h" #include "memory_kokkos.h" #include "error.h" -#include "force.h" #include "atom_masks.h" #include "kokkos_base.h" +#include "region.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/KOKKOS/fix_setforce_kokkos.h b/src/KOKKOS/fix_setforce_kokkos.h index 3cbf3d3720..ecbfd71e36 100644 --- a/src/KOKKOS/fix_setforce_kokkos.h +++ b/src/KOKKOS/fix_setforce_kokkos.h @@ -23,7 +23,6 @@ FixStyle(setforce/kk/host,FixSetForceKokkos) #define LMP_FIX_SET_FORCE_KOKKOS_H #include "fix_setforce.h" -#include "region.h" #include "kokkos_type.h" namespace LAMMPS_NS { @@ -82,7 +81,7 @@ class FixSetForceKokkos : public FixSetForce { typename AT::t_f_array f; typename AT::t_int_1d_randomread mask; - Region* region; + class Region* region; }; } diff --git a/src/KOKKOS/fix_shardlow_kokkos.cpp b/src/KOKKOS/fix_shardlow_kokkos.cpp index 96f67ccb5e..9bd8594341 100644 --- a/src/KOKKOS/fix_shardlow_kokkos.cpp +++ b/src/KOKKOS/fix_shardlow_kokkos.cpp @@ -34,30 +34,22 @@ ------------------------------------------------------------------------- */ #include "fix_shardlow_kokkos.h" -#include +#include #include -#include #include "atom.h" #include "atom_masks.h" #include "atom_kokkos.h" #include "force.h" #include "update.h" -#include "respa.h" #include "error.h" -#include -#include "atom_vec.h" #include "comm.h" #include "neighbor.h" #include "neigh_list_kokkos.h" #include "neigh_request.h" #include "memory_kokkos.h" #include "domain.h" -#include "modify.h" -// #include "pair_dpd_fdt.h" #include "pair_dpd_fdt_energy_kokkos.h" -#include "pair.h" #include "npair_ssa_kokkos.h" -#include "citeme.h" using namespace LAMMPS_NS; using namespace FixConst; diff --git a/src/KOKKOS/improper_class2_kokkos.cpp b/src/KOKKOS/improper_class2_kokkos.cpp index 84b721bd2a..defd5e16f5 100644 --- a/src/KOKKOS/improper_class2_kokkos.cpp +++ b/src/KOKKOS/improper_class2_kokkos.cpp @@ -16,22 +16,15 @@ ------------------------------------------------------------------------- */ #include "improper_class2_kokkos.h" -#include #include -#include #include "atom_kokkos.h" -#include "comm.h" #include "neighbor_kokkos.h" -#include "domain.h" #include "force.h" -#include "update.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define TOLERANCE 0.05 #define SMALL 0.001 diff --git a/src/KOKKOS/improper_harmonic_kokkos.cpp b/src/KOKKOS/improper_harmonic_kokkos.cpp index 262ffe7700..7d6437dbf5 100644 --- a/src/KOKKOS/improper_harmonic_kokkos.cpp +++ b/src/KOKKOS/improper_harmonic_kokkos.cpp @@ -16,22 +16,16 @@ ------------------------------------------------------------------------- */ #include "improper_harmonic_kokkos.h" -#include #include -#include #include "atom_kokkos.h" #include "comm.h" #include "neighbor_kokkos.h" -#include "domain.h" #include "force.h" -#include "update.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define TOLERANCE 0.05 #define SMALL 0.001 diff --git a/src/KOKKOS/nbin_ssa_kokkos.cpp b/src/KOKKOS/nbin_ssa_kokkos.cpp index ecf0e08535..0e46f7fc61 100644 --- a/src/KOKKOS/nbin_ssa_kokkos.cpp +++ b/src/KOKKOS/nbin_ssa_kokkos.cpp @@ -19,11 +19,8 @@ #include "nbin_ssa_kokkos.h" #include "neighbor.h" #include "atom_kokkos.h" -#include "group.h" #include "domain.h" -#include "comm.h" #include "update.h" -#include "error.h" #include "atom_masks.h" // #include "memory_kokkos.h" diff --git a/src/KOKKOS/npair_copy_kokkos.cpp b/src/KOKKOS/npair_copy_kokkos.cpp index 7dde05745c..0ce0f4d3ff 100644 --- a/src/KOKKOS/npair_copy_kokkos.cpp +++ b/src/KOKKOS/npair_copy_kokkos.cpp @@ -12,14 +12,7 @@ ------------------------------------------------------------------------- */ #include "npair_copy_kokkos.h" -#include "neighbor.h" #include "neigh_list_kokkos.h" -#include "atom.h" -#include "atom_vec.h" -#include "molecule.h" -#include "domain.h" -#include "my_page.h" -#include "error.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/npair_skip_kokkos.cpp b/src/KOKKOS/npair_skip_kokkos.cpp index e614e624c9..bb393c9b95 100644 --- a/src/KOKKOS/npair_skip_kokkos.cpp +++ b/src/KOKKOS/npair_skip_kokkos.cpp @@ -12,13 +12,9 @@ ------------------------------------------------------------------------- */ #include "npair_skip_kokkos.h" -#include "neighbor.h" #include "neigh_list_kokkos.h" #include "atom_kokkos.h" #include "atom_vec.h" -#include "molecule.h" -#include "domain.h" -#include "my_page.h" #include "error.h" #include "atom_masks.h" diff --git a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp index e3843262a5..2a72617525 100644 --- a/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_cut_kokkos.cpp @@ -17,18 +17,14 @@ #include "pair_buck_coul_cut_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory_kokkos.h" diff --git a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp index 7457a0988f..fdf395684a 100644 --- a/src/KOKKOS/pair_buck_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_buck_coul_long_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_buck_coul_long_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_buck_kokkos.cpp b/src/KOKKOS/pair_buck_kokkos.cpp index 131622cac5..375d0dc1ea 100644 --- a/src/KOKKOS/pair_buck_kokkos.cpp +++ b/src/KOKKOS/pair_buck_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_buck_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_coul_cut_kokkos.cpp b/src/KOKKOS/pair_coul_cut_kokkos.cpp index e79f103363..5a1a6eefac 100644 --- a/src/KOKKOS/pair_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_coul_cut_kokkos.cpp @@ -13,26 +13,17 @@ #include "pair_coul_cut_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_coul_debye_kokkos.cpp b/src/KOKKOS/pair_coul_debye_kokkos.cpp index 0fe03af043..8dd7e4f3d2 100644 --- a/src/KOKKOS/pair_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_coul_debye_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_coul_debye_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_coul_dsf_kokkos.cpp index e94aae4754..836b12ba39 100644 --- a/src/KOKKOS/pair_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_dsf_kokkos.cpp @@ -17,20 +17,13 @@ #include "pair_coul_dsf_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list_kokkos.h" #include "neigh_request.h" #include "memory_kokkos.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "math_const.h" #include "error.h" #include "atom_masks.h" diff --git a/src/KOKKOS/pair_coul_long_kokkos.cpp b/src/KOKKOS/pair_coul_long_kokkos.cpp index 67132e11f6..84b89c6373 100644 --- a/src/KOKKOS/pair_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_coul_long_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_coul_long_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_coul_wolf_kokkos.cpp b/src/KOKKOS/pair_coul_wolf_kokkos.cpp index dbbb865961..3ca8f16a79 100644 --- a/src/KOKKOS/pair_coul_wolf_kokkos.cpp +++ b/src/KOKKOS/pair_coul_wolf_kokkos.cpp @@ -17,19 +17,12 @@ #include "pair_coul_wolf_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list_kokkos.h" #include "neigh_request.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "math_const.h" #include "memory_kokkos.h" #include "error.h" diff --git a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp index 27a7a59c2a..21fd32a2c8 100644 --- a/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp +++ b/src/KOKKOS/pair_dpd_fdt_energy_kokkos.cpp @@ -17,20 +17,14 @@ #include "pair_dpd_fdt_energy_kokkos.h" #include -#include -#include -#include #include "atom_kokkos.h" -#include "atom_vec.h" #include "comm.h" #include "update.h" -#include "fix.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "memory_kokkos.h" -#include "modify.h" #include "error.h" #include "atom_masks.h" #include "kokkos.h" diff --git a/src/KOKKOS/pair_eam_alloy_kokkos.cpp b/src/KOKKOS/pair_eam_alloy_kokkos.cpp index aa33d44eee..48bf63386a 100644 --- a/src/KOKKOS/pair_eam_alloy_kokkos.cpp +++ b/src/KOKKOS/pair_eam_alloy_kokkos.cpp @@ -17,8 +17,6 @@ #include "pair_eam_alloy_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "pair_kokkos.h" diff --git a/src/KOKKOS/pair_eam_fs_kokkos.cpp b/src/KOKKOS/pair_eam_fs_kokkos.cpp index 9832a16a73..6536dd745a 100644 --- a/src/KOKKOS/pair_eam_fs_kokkos.cpp +++ b/src/KOKKOS/pair_eam_fs_kokkos.cpp @@ -17,8 +17,6 @@ #include "pair_eam_fs_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "pair_kokkos.h" diff --git a/src/KOKKOS/pair_eam_kokkos.cpp b/src/KOKKOS/pair_eam_kokkos.cpp index 4c6fadfe92..f6eef5b53c 100644 --- a/src/KOKKOS/pair_eam_kokkos.cpp +++ b/src/KOKKOS/pair_eam_kokkos.cpp @@ -17,9 +17,6 @@ #include "pair_eam_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "pair_kokkos.h" #include "atom_kokkos.h" diff --git a/src/KOKKOS/pair_exp6_rx_kokkos.cpp b/src/KOKKOS/pair_exp6_rx_kokkos.cpp index 31a48fe154..8698687377 100644 --- a/src/KOKKOS/pair_exp6_rx_kokkos.cpp +++ b/src/KOKKOS/pair_exp6_rx_kokkos.cpp @@ -17,18 +17,15 @@ #include "pair_exp6_rx_kokkos.h" #include -#include #include #include #include "atom.h" #include "comm.h" #include "force.h" #include "neigh_list.h" -#include "math_const.h" #include "math_special_kokkos.h" #include "memory_kokkos.h" #include "error.h" -#include "modify.h" #include "fix.h" #include #include "atom_masks.h" @@ -41,7 +38,6 @@ #endif using namespace LAMMPS_NS; -using namespace MathConst; using namespace MathSpecialKokkos; #define MAXLINE 1024 diff --git a/src/KOKKOS/pair_hybrid_kokkos.cpp b/src/KOKKOS/pair_hybrid_kokkos.cpp index c767d9f470..b5b0a9d02b 100644 --- a/src/KOKKOS/pair_hybrid_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_kokkos.cpp @@ -12,19 +12,14 @@ ------------------------------------------------------------------------- */ #include "pair_hybrid_kokkos.h" -#include -#include #include -#include #include "atom_kokkos.h" #include "force.h" #include "pair.h" #include "neighbor.h" #include "neigh_request.h" #include "update.h" -#include "comm.h" #include "memory_kokkos.h" -#include "error.h" #include "respa.h" #include "atom_masks.h" #include "kokkos.h" diff --git a/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp b/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp index cb1389d38e..0cebd79c88 100644 --- a/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp +++ b/src/KOKKOS/pair_hybrid_overlay_kokkos.cpp @@ -12,13 +12,10 @@ ------------------------------------------------------------------------- */ #include "pair_hybrid_overlay_kokkos.h" -#include #include #include #include "atom.h" #include "force.h" -#include "neighbor.h" -#include "neigh_request.h" #include "error.h" using namespace LAMMPS_NS; diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp index b7c3766d5f..ae6cb61b60 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_implicit_kokkos.cpp @@ -16,27 +16,20 @@ ------------------------------------------------------------------------- */ #include "pair_lj_charmm_coul_charmm_implicit_kokkos.h" -#include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp index c6a1e3211d..9cdef267e2 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_charmm_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_lj_charmm_coul_charmm_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp index 4ba0651601..441070248d 100644 --- a/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_charmm_coul_long_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_lj_charmm_coul_long_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp index ef8fe7a128..1f7642e965 100644 --- a/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_cut_kokkos.cpp @@ -13,8 +13,6 @@ #include "pair_lj_class2_coul_cut_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" @@ -24,15 +22,12 @@ #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp index 5a25d0250b..c88ff9378e 100644 --- a/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_coul_long_kokkos.cpp @@ -13,26 +13,20 @@ #include "pair_lj_class2_coul_long_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_class2_kokkos.cpp b/src/KOKKOS/pair_lj_class2_kokkos.cpp index 6d673b2d01..9900e7361f 100644 --- a/src/KOKKOS/pair_lj_class2_kokkos.cpp +++ b/src/KOKKOS/pair_lj_class2_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_lj_class2_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp index 9201a116b5..1601e4a4b2 100644 --- a/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_cut_kokkos.cpp @@ -13,26 +13,20 @@ #include "pair_lj_cut_coul_cut_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp index 8935333c74..6e7d1eeb8b 100644 --- a/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_debye_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_lj_cut_coul_debye_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp index aea70faec4..b7dc7cc26d 100644 --- a/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_dsf_kokkos.cpp @@ -17,18 +17,14 @@ #include "pair_lj_cut_coul_dsf_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory_kokkos.h" diff --git a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp index 53d27f2447..122d59af82 100644 --- a/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_coul_long_kokkos.cpp @@ -13,18 +13,14 @@ #include "pair_lj_cut_coul_long_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory_kokkos.h" diff --git a/src/KOKKOS/pair_lj_cut_kokkos.cpp b/src/KOKKOS/pair_lj_cut_kokkos.cpp index ee29e12322..df750b7524 100644 --- a/src/KOKKOS/pair_lj_cut_kokkos.cpp +++ b/src/KOKKOS/pair_lj_cut_kokkos.cpp @@ -12,27 +12,20 @@ ------------------------------------------------------------------------- */ #include "pair_lj_cut_kokkos.h" -#include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_expand_kokkos.cpp b/src/KOKKOS/pair_lj_expand_kokkos.cpp index 061fc205fb..38bebc364f 100644 --- a/src/KOKKOS/pair_lj_expand_kokkos.cpp +++ b/src/KOKKOS/pair_lj_expand_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_lj_expand_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp index 4df9fdea9e..a46a5c0441 100644 --- a/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_coul_gromacs_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_lj_gromacs_coul_gromacs_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp index 2d395c39d5..23ed5e5595 100644 --- a/src/KOKKOS/pair_lj_gromacs_kokkos.cpp +++ b/src/KOKKOS/pair_lj_gromacs_kokkos.cpp @@ -17,26 +17,20 @@ #include "pair_lj_gromacs_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_lj_sdk_kokkos.cpp b/src/KOKKOS/pair_lj_sdk_kokkos.cpp index 14c53c38bf..25f081d255 100644 --- a/src/KOKKOS/pair_lj_sdk_kokkos.cpp +++ b/src/KOKKOS/pair_lj_sdk_kokkos.cpp @@ -14,19 +14,15 @@ #include "pair_lj_sdk_kokkos.h" #include #include -#include #include #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" #include "force.h" #include "neighbor.h" -#include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" @@ -34,7 +30,6 @@ #include "lj_sdk_common.h" using namespace LAMMPS_NS; -using namespace MathConst; using namespace LJSDKParms; #define KOKKOS_CUDA_MAX_THREADS 256 diff --git a/src/KOKKOS/pair_morse_kokkos.cpp b/src/KOKKOS/pair_morse_kokkos.cpp index d679477321..d3e3042a34 100644 --- a/src/KOKKOS/pair_morse_kokkos.cpp +++ b/src/KOKKOS/pair_morse_kokkos.cpp @@ -17,18 +17,14 @@ #include "pair_morse_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" #include "math_const.h" #include "memory_kokkos.h" diff --git a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp index 81a4aa7a82..75247859ed 100644 --- a/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp +++ b/src/KOKKOS/pair_multi_lucy_rx_kokkos.cpp @@ -22,9 +22,7 @@ ------------------------------------------------------------------------------------------- */ #include "pair_multi_lucy_rx_kokkos.h" -#include #include -#include #include #include "math_const.h" #include "atom_kokkos.h" @@ -33,9 +31,6 @@ #include "neigh_list.h" #include "memory_kokkos.h" #include "error.h" -#include "citeme.h" -#include "modify.h" -#include "fix.h" #include "atom_masks.h" #include "neigh_request.h" #include "kokkos.h" diff --git a/src/KOKKOS/pair_reaxc_kokkos.cpp b/src/KOKKOS/pair_reaxc_kokkos.cpp index ca897a377c..d0ad1f1b09 100644 --- a/src/KOKKOS/pair_reaxc_kokkos.cpp +++ b/src/KOKKOS/pair_reaxc_kokkos.cpp @@ -17,7 +17,6 @@ #include "pair_reaxc_kokkos.h" #include -#include #include #include #include "kokkos.h" @@ -27,9 +26,6 @@ #include "neighbor.h" #include "neigh_request.h" #include "neigh_list_kokkos.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "math_const.h" #include "math_special.h" #include "memory_kokkos.h" @@ -38,7 +34,6 @@ #include "reaxc_defs.h" #include "reaxc_lookup.h" #include "reaxc_tool_box.h" -#include "modify.h" #define TEAMSIZE 128 diff --git a/src/KOKKOS/pair_sw_kokkos.cpp b/src/KOKKOS/pair_sw_kokkos.cpp index dbd45747f0..e85afa362f 100644 --- a/src/KOKKOS/pair_sw_kokkos.cpp +++ b/src/KOKKOS/pair_sw_kokkos.cpp @@ -17,9 +17,6 @@ #include "pair_sw_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "pair_kokkos.h" #include "atom_kokkos.h" @@ -30,7 +27,6 @@ #include "memory_kokkos.h" #include "neighbor.h" #include "neigh_list_kokkos.h" -#include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" #include "math_const.h" diff --git a/src/KOKKOS/pair_table_kokkos.cpp b/src/KOKKOS/pair_table_kokkos.cpp index 01966d708a..5ee24ad479 100644 --- a/src/KOKKOS/pair_table_kokkos.cpp +++ b/src/KOKKOS/pair_table_kokkos.cpp @@ -16,14 +16,10 @@ ------------------------------------------------------------------------- */ #include "pair_table_kokkos.h" -#include -#include -#include #include #include "kokkos.h" #include "atom.h" #include "force.h" -#include "comm.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" diff --git a/src/KOKKOS/pair_table_rx_kokkos.cpp b/src/KOKKOS/pair_table_rx_kokkos.cpp index 7c2d20c68d..daebeda8db 100644 --- a/src/KOKKOS/pair_table_rx_kokkos.cpp +++ b/src/KOKKOS/pair_table_rx_kokkos.cpp @@ -18,7 +18,6 @@ #include "pair_table_rx_kokkos.h" #include #include -#include #include #include "kokkos.h" #include "atom.h" diff --git a/src/KOKKOS/pair_tersoff_kokkos.cpp b/src/KOKKOS/pair_tersoff_kokkos.cpp index b68af84425..b360b20ef3 100644 --- a/src/KOKKOS/pair_tersoff_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_kokkos.cpp @@ -17,9 +17,6 @@ #include "pair_tersoff_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" @@ -27,9 +24,6 @@ #include "neighbor.h" #include "neigh_request.h" #include "neigh_list_kokkos.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "math_const.h" #include "memory_kokkos.h" #include "error.h" diff --git a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp index b6921179c0..81ef486999 100644 --- a/src/KOKKOS/pair_tersoff_mod_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_mod_kokkos.cpp @@ -17,9 +17,6 @@ #include "pair_tersoff_mod_kokkos.h" #include -#include -#include -#include #include "kokkos.h" #include "atom_kokkos.h" #include "comm.h" @@ -27,9 +24,6 @@ #include "neighbor.h" #include "neigh_request.h" #include "neigh_list_kokkos.h" -#include "update.h" -#include "integrate.h" -#include "respa.h" #include "math_const.h" #include "memory_kokkos.h" #include "error.h" diff --git a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp index 60ff0a7269..4593f32e36 100644 --- a/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_tersoff_zbl_kokkos.cpp @@ -17,8 +17,6 @@ #include "pair_tersoff_zbl_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "atom_kokkos.h" @@ -28,8 +26,6 @@ #include "neigh_request.h" #include "neigh_list_kokkos.h" #include "update.h" -#include "integrate.h" -#include "respa.h" #include "math_const.h" #include "memory_kokkos.h" #include "error.h" diff --git a/src/KOKKOS/pair_vashishta_kokkos.cpp b/src/KOKKOS/pair_vashishta_kokkos.cpp index febb171c83..614d3334d5 100644 --- a/src/KOKKOS/pair_vashishta_kokkos.cpp +++ b/src/KOKKOS/pair_vashishta_kokkos.cpp @@ -17,8 +17,6 @@ #include "pair_vashishta_kokkos.h" #include -#include -#include #include #include "kokkos.h" #include "pair_kokkos.h" @@ -28,9 +26,7 @@ #include "force.h" #include "comm.h" #include "memory_kokkos.h" -#include "neighbor.h" #include "neigh_list_kokkos.h" -#include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" #include "math_const.h" diff --git a/src/KOKKOS/pair_yukawa_kokkos.cpp b/src/KOKKOS/pair_yukawa_kokkos.cpp index acfeb2fbdc..6dfffd4a54 100644 --- a/src/KOKKOS/pair_yukawa_kokkos.cpp +++ b/src/KOKKOS/pair_yukawa_kokkos.cpp @@ -17,24 +17,19 @@ #include "pair_yukawa_kokkos.h" #include -#include #include "kokkos.h" #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" using namespace LAMMPS_NS; -using namespace MathConst; #define KOKKOS_CUDA_MAX_THREADS 256 #define KOKKOS_CUDA_MIN_BLOCKS 8 diff --git a/src/KOKKOS/pair_zbl_kokkos.cpp b/src/KOKKOS/pair_zbl_kokkos.cpp index 0f21331266..5697dd5b00 100644 --- a/src/KOKKOS/pair_zbl_kokkos.cpp +++ b/src/KOKKOS/pair_zbl_kokkos.cpp @@ -17,19 +17,14 @@ #include "pair_zbl_kokkos.h" #include -#include -#include #include #include "atom_kokkos.h" -#include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" -#include "integrate.h" #include "respa.h" -#include "math_const.h" #include "memory_kokkos.h" #include "error.h" #include "atom_masks.h" @@ -39,7 +34,6 @@ // "The Stopping and Range of Ions in Matter" volume 1, Pergamon, 1985. using namespace LAMMPS_NS; -using namespace MathConst; using namespace PairZBLConstants; /* ---------------------------------------------------------------------- */ diff --git a/src/KOKKOS/pppm_kokkos.cpp b/src/KOKKOS/pppm_kokkos.cpp index 1842524e23..3e70602f67 100644 --- a/src/KOKKOS/pppm_kokkos.cpp +++ b/src/KOKKOS/pppm_kokkos.cpp @@ -17,9 +17,6 @@ #include "pppm_kokkos.h" #include -#include -#include -#include #include #include "atom_kokkos.h" #include "comm.h" @@ -27,8 +24,6 @@ #include "neighbor.h" #include "force.h" #include "pair.h" -#include "bond.h" -#include "angle.h" #include "domain.h" #include "fft3d_wrap.h" #include "remap_wrap.h" diff --git a/src/KOKKOS/region_block_kokkos.cpp b/src/KOKKOS/region_block_kokkos.cpp index a5734f6ba7..b28230290e 100644 --- a/src/KOKKOS/region_block_kokkos.cpp +++ b/src/KOKKOS/region_block_kokkos.cpp @@ -12,10 +12,6 @@ ------------------------------------------------------------------------- */ #include "region_block_kokkos.h" -#include -#include -#include "domain.h" -#include "force.h" #include "atom_kokkos.h" #include "atom_masks.h" diff --git a/src/KOKKOS/verlet_kokkos.cpp b/src/KOKKOS/verlet_kokkos.cpp index d555b74d23..2d2f0a9815 100644 --- a/src/KOKKOS/verlet_kokkos.cpp +++ b/src/KOKKOS/verlet_kokkos.cpp @@ -12,11 +12,9 @@ ------------------------------------------------------------------------- */ #include "verlet_kokkos.h" -#include #include "neighbor.h" #include "domain.h" #include "comm.h" -#include "atom.h" #include "atom_kokkos.h" #include "atom_masks.h" #include "force.h" @@ -29,15 +27,10 @@ #include "output.h" #include "update.h" #include "modify.h" -#include "compute.h" -#include "fix.h" #include "timer.h" #include "memory_kokkos.h" -#include "error.h" #include "kokkos.h" -#include - using namespace LAMMPS_NS; template -- GitLab From 658cda9b670da84e66a695d4f98364ac5202c4f4 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Tue, 16 Jul 2019 15:02:24 -0500 Subject: [PATCH 174/236] Updated kim_query documentation to new format --- doc/src/kim_commands.txt | 71 +++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index a6551734f1..46e437a871 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -35,8 +35,7 @@ kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657 kim_interactions C H O kim_init Sim_LAMMPS_IFF_OtherInfo_AuthorList_Year_Species__SM_064312669787_000 real kim_interactions fixed_types -kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\] :pre - +kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] :pre [Description:] @@ -104,16 +103,12 @@ The URL for the Model Page is constructed from the "extended KIM ID"_https://openkim.org/about-kim-ids/ of the IM: https://openkim.org/id/extended_KIM_ID -or -https://openkim.org/id/short_KIM_ID :pre For example for the Stillinger-Weber potential listed above the Model Page is located at: "https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005"_https://openkim.org/id/SW_StillingerWeber_1985_Si__MO_405512056662_005 -or -"https://openkim.org/id/MO_405512056662_005"_https://openkim.org/id/MO_405512056662_005 :pre See the "current list of KIM PMs and SMs archived in OpenKIM"_https://openkim.org/browse/models/by-species. @@ -354,16 +349,34 @@ of the IM set by {kim_init} for material properties archived in "OpenKIM"_https://openkim.org. The {kim_query} command must be preceded by a {kim_init} command. The result of the query is stored in a "string style variable"_variable.html, the name of which is given as the first -argument of the {kim_query command}. The second required argument -{query_function} is the name of the query function to be called -(e.g. {get_lattice_constant_fcc}). -All following arguments are parameters handed over to the web query -in the format {keyword=value}. The list of supported keywords and -the type and format of their values depend on the query function -used. - -NOTE: The current list of supported query functions is available on the OpenKIM -webpage at "https://query.openkim.org"_https://query.openkim.org/ +argument of the {kim_query command}. (For the case of multiple +return values, the optional {split} keyword can be used after the +variable name to separate the results into multiple variables; see +the "example"_#split_example below.) +The second required argument {query_function} is the name of the +query function to be called (e.g. {get_lattice_constant_cubic}). +All following "arguments"_Commands_parse.html are parameters handed over to +the web query in the format {keyword=value}, where {value} is always +an array of one or more comma-separated items in brackets. +The list of supported keywords and the type and format of their values +depend on the query function used. The current list of query functions +is available on the OpenKIM webpage at +"https://openkim.org/doc/repository/kim-query"_https://openkim.org/doc/repository/kim-query. + +NOTE: All query functions require the {model} keyword, which identifies +the IM whose predictions are being queried. This keyword is automatically +generated by {kim_query} based on the IM set in {kim_init} and must not +be specified as an argument to {kim_query}. + +NOTE: Each {query_function} is associated with a default method (implemented +as a "KIM Test"_https://openkim.org/getting-started/kim-tests/) +used to compute this property. In cases where there are multiple +methods in OpenKIM for computing a property, a {method} keyword can +be provided to select the method of choice. See the +"query documentation"_https://openkim.org/doc/repository/kim-query +to see which methods are available for a given {query function}. + +{kim_query} Usage Examples and Further Clarifications: :h6 The data obtained by {kim_query} commands can be used as part of the setup or analysis phases of LAMMPS simulations. Some examples are given below. @@ -372,7 +385,7 @@ or analysis phases of LAMMPS simulations. Some examples are given below. kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p -kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\] +kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] lattice fcc $\{a0\} ... :pre @@ -389,11 +402,12 @@ Note that in {unit_conversion_mode} the results obtained from a For example, in the above script, the lattice command would need to be changed to: "lattice fcc $\{a0\}*$\{_u_distance\}". +:link(split_example) [Define an equilibrium hcp crystal] kim_init EAM_Dynamo_Mendelev_2007_Zr__MO_848899341753_000 metal boundary p p p -kim_query latconst split get_lattice_constant_hcp species=\["Zr"\] units=\["angstrom"\] +kim_query latconst split get_lattice_constant_hexagonal crystal=\["hcp"\] species=\["Zr"\] units=\["angstrom"\] variable a0 equal latconst_1 variable c0 equal latconst_2 variable c_to_a equal $\{c0\}/$\{a0\} @@ -414,16 +428,27 @@ the returned values is determined by the type of query performed. kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p -kim_query a0 get_lattice_constant_fcc species=\["Al"\] units=\["angstrom"\] -kim_query alpha get_linear_thermal_expansion_fcc species=\["Al"\] units=\{"1/K"\} +kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] +kim_query alpha get_linear_thermal_expansion_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\{"1/K"\} temperature=[293.15] temperature_units=["K"] variable DeltaT equal 300 lattice fcc $\{a0\}*$\{alpha\}*$\{DeltaT\} ... :pre As in the previous example, the equilibrium lattice constant is obtained for the Ercolessi and Adams (1994) potential. However, in this case the -crystal is scaled to the appropriate lattice constant at 300 K by using -the linear thermal expansion coefficient predicted by the potential. +crystal is scaled to the appropriate lattice constant at room temperature +(293.15 K) by using the linear thermal expansion constant predicted by the +potential. + +NOTE: When passing numerical values as arguments (as in the case +of the temperature in the above example) it is also possible to pass a +tolerance indicating how close to the value is considered a match. +If no tolerance is passed a default value is used. If multiple results +are returned (indicating that the tolerance is too large), {kim_query} +will return an error. See the +"query documentation"_https://openkim.org/doc/repository/kim-query +to see which numerical arguments and tolerances are available for a +given {query function}. [Compute defect formation energy] @@ -432,7 +457,7 @@ kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal ... Build fcc crystal containing some defect and compute the total energy ... which is stored in the variable {Etot} ... -kim_query Ec get_cohesive_energy_fcc species=\["Al"\] units=\["eV"\] +kim_query Ec get_cohesive_energy_cubic crystal=\["fcc"\] species=\["Al"\] units=\["eV"\] variable Eform equal $\{Etot\} - count(all)*$\{Ec\} ... :pre -- GitLab From b61b48235b3e3551a6ad71e188995d6532a5a622 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Tue, 16 Jul 2019 15:19:28 -0500 Subject: [PATCH 175/236] Updated openkim.org documentation URLs to new /doc/* locations --- doc/src/kim_commands.txt | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 46e437a871..7c88fd084a 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -57,17 +57,17 @@ Reliability :h5 All content archived in OpenKIM is reviewed by the "KIM Editor"_https://openkim.org/governance/ for quality. IMs in OpenKIM are archived with full provenance control. Each is associated with a maintainer responsible for the integrity of the content. All changes are tracked and recorded. -IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/getting-started/kim-tests/ that compute a host of material properties, and "KIM Verification Checks"_https://openkim.org/about-verification-checks/ that provide the user with information on various aspects of the IM behavior and coding correctness. This information is displayed on the IM's page accessible through the "OpenKIM browse interface"_https://openkim.org/browse. :ul +IMs in OpenKIM are exhaustively tested using "KIM Tests"_https://openkim.org/doc/evaluation/kim-tests/ that compute a host of material properties, and "KIM Verification Checks"_https://openkim.org/doc/evaluation/kim-verification-checks/ that provide the user with information on various aspects of the IM behavior and coding correctness. This information is displayed on the IM's page accessible through the "OpenKIM browse interface"_https://openkim.org/browse. :ul Reproducibility :h5 -Each IM in OpenKIM is issued a unique identifier ("KIM ID"_https://openkim.org/about-kim-ids/), which includes a version number (last three digits). Any changes that can result in different numerical values lead to a version increment in the KIM ID. This makes it possible to reproduce simulations since the specific version of a specific IM used can be retrieved using its KIM ID. +Each IM in OpenKIM is issued a unique identifier ("KIM ID"_https://openkim.org/doc/schema/kim-ids/), which includes a version number (last three digits). Any changes that can result in different numerical values lead to a version increment in the KIM ID. This makes it possible to reproduce simulations since the specific version of a specific IM used can be retrieved using its KIM ID. OpenKIM is a member organization of "DataCite"_https://datacite.org/ and issues digital object identifiers (DOIs) to all IMs archived in OpenKIM. This makes it possible to cite the IM code used in a simulation in a publications to give credit to the developers and further facilitate reproducibility. :ul Convenience :h5 IMs in OpenKIM are distributed in binary form along with LAMMPS and can be used in a LAMMPS input script simply by providing their KIM ID in the {kim_init} command documented on this page. -The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"_https://openkim.org/getting-started/kim-tests/) as part of a LAMMPS input script setup and analysis. +The {kim_query} web query tool provides the ability to use the predictions of IMs for supported material properties (computed via "KIM Tests"_https://openkim.org/doc/evaluation/kim-tests/) as part of a LAMMPS input script setup and analysis. Support is provided for unit conversion between the "unit style"_units.html used in the LAMMPS input script and the units required by the OpenKIM IM. This makes it possible to use a single input script with IMs using different units without change and minimizes the likelihood of errors due to incompatible units. :ul :link(IM_types) @@ -80,10 +80,11 @@ The second type is called a {KIM Simulator Model} (SM). A KIM SM is an IM that i With these two IM types, OpenKIM can archive and test almost all IMs that can be used by LAMMPS. (It is easy to contribute new IMs to OpenKIM, see -the "upload instructions"_https://openkim.org/getting-started/adding-content/.) +the "upload instructions"_https://openkim.org/doc/repository/adding-content/.) OpenKIM IMs are uniquely identified by a -"KIM ID"_https://openkim.org/about-kim-ids/. The extended KIM ID consists of +"KIM ID"_https://openkim.org/doc/schema/kim-ids/. +The extended KIM ID consists of a human-readable prefix identifying the type of IM, authors, publication year, and supported species, separated by two underscores from the KIM ID itself, which begins with an IM code @@ -100,7 +101,7 @@ authorship and citation information, test and verification check results, visualizations of results, a wiki with documentation and user comments, and access to raw files, and other information. The URL for the Model Page is constructed from the -"extended KIM ID"_https://openkim.org/about-kim-ids/ of the IM: +"extended KIM ID"_https://openkim.org/doc/schema/kim-ids/ of the IM: https://openkim.org/id/extended_KIM_ID :pre @@ -141,7 +142,7 @@ would not include {units} and {atom_style} commands. The required arguments of {kim_init} are the {model} name of the IM to be used in the simulation (for an IM archived in OpenKIM this is -its "extended KIM ID"_https://openkim.org/about-kim-ids/), and +its "extended KIM ID"_https://openkim.org/doc/schema/kim-ids/, and the {user_units}, which are the LAMMPS "units style"_units.html used in the input script. (Any dimensioned numerical values in the input script and values read in from files are expected to be in the @@ -219,7 +220,7 @@ _u_density :pre If desired, the input script can be designed to work with these conversion factors so that the script will work without change with any OpenKIM IM. (This approach is used in the -"OpenKIM Testing Framework"_https://openkim.org/getting-started/kim-tests/.) +"OpenKIM Testing Framework"_https://openkim.org/doc/evaluation/kim-tests/.) For example, the script given above for the cohesive energy of fcc Al can be rewritten to work with any IM regardless of units. The following script constructs an fcc lattice with a lattice parameter defined in @@ -369,7 +370,7 @@ generated by {kim_query} based on the IM set in {kim_init} and must not be specified as an argument to {kim_query}. NOTE: Each {query_function} is associated with a default method (implemented -as a "KIM Test"_https://openkim.org/getting-started/kim-tests/) +as a "KIM Test"_https://openkim.org/doc/evaluation/kim-tests/) used to compute this property. In cases where there are multiple methods in OpenKIM for computing a property, a {method} keyword can be provided to select the method of choice. See the -- GitLab From 5b4f77b919b251ba8130abb9b15946999f738faa Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Tue, 16 Jul 2019 16:20:48 -0500 Subject: [PATCH 176/236] kim_query check for explicit 'model=' key in arguments (give error if present). --- src/KIM/kim_query.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index 6e77b8f859..dc8d0544f6 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -113,6 +113,13 @@ void KimQuery::command(int narg, char **arg) narg--; } function = arg[1]; + for (int i = 2; i < narg; ++i) + { + if (0 == strncmp("model=",arg[i], 6)) { + error->all(FLERR,"Illegal 'model' key in kim_query command"); + } + } + #if defined(LMP_KIM_CURL) @@ -258,9 +265,9 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg, if (value[0] == '[') { int len = strlen(value)-1; - if (value[len-1] == ']') { + if (value[len] == ']') { retval = new char[len]; - value[len-1] = '\0'; + value[len] = '\0'; strcpy(retval,value+1); } else { retval = new char[len+2]; -- GitLab From 354f4d19fd67094ca50ef83cb627abdf85f9a087 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Tue, 16 Jul 2019 22:11:23 -0500 Subject: [PATCH 177/236] Update to kim-api-2.1.0 release --- cmake/Modules/Packages/KIM.cmake | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 5803ea23c4..5c0b8e2ee8 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -21,10 +21,8 @@ if(PKG_KIM) enable_language(Fortran) include(ExternalProject) ExternalProject_Add(kim_build - GIT_REPOSITORY https://github.com/openkim/kim-api.git - GIT_TAG SimulatorModels - #URL https://s3.openkim.org/kim-api/kim-api-2.0.2.txz - #URL_MD5 537d9c0abd30f85b875ebb584f9143fa + URL https://s3.openkim.org/kim-api/kim-api-2.1.0.txz + URL_MD5 9ada58e677a545a1987b1ecb98e39d7e BINARY_DIR build CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- GitLab From 92518e53f4146abf236a73e5ffed4b5db0b0e37d Mon Sep 17 00:00:00 2001 From: jrgissing Date: Wed, 17 Jul 2019 22:58:40 -0600 Subject: [PATCH 178/236] Revert "spelling: attempt add file paths to false positives" This reverts commit 0c4af8b820f4d6f559d07086db91a2c1dee67a47. --- doc/utils/sphinx-config/conf.py | 3 --- doc/utils/sphinx-config/custom_filters.py | 9 --------- 2 files changed, 12 deletions(-) delete mode 100644 doc/utils/sphinx-config/custom_filters.py diff --git a/doc/utils/sphinx-config/conf.py b/doc/utils/sphinx-config/conf.py index 646fbd2e94..29de3af156 100644 --- a/doc/utils/sphinx-config/conf.py +++ b/doc/utils/sphinx-config/conf.py @@ -312,6 +312,3 @@ if spelling_spec: spelling_lang='en_US' spelling_word_list_filename='false_positives.txt' - - from custom_filters import PathFilter - spelling_filters = [PathFilter] diff --git a/doc/utils/sphinx-config/custom_filters.py b/doc/utils/sphinx-config/custom_filters.py deleted file mode 100644 index 3df26854e4..0000000000 --- a/doc/utils/sphinx-config/custom_filters.py +++ /dev/null @@ -1,9 +0,0 @@ -class PathFilter(Filter): - r"""Filter skipping over simple file paths - """ - _DOC_ERRORS = ["zA"] - _pattern = re.compile(r"\/[^\s].*") - def _skip(self,word): - if self._pattern.match(word): - return True - return False -- GitLab From 8cf1084decf4a5c765ab67b6d94c73aadac6e9e3 Mon Sep 17 00:00:00 2001 From: jrgissing Date: Wed, 17 Jul 2019 23:05:28 -0600 Subject: [PATCH 179/236] bond/react: use Unix path in docs --- doc/src/fix_bond_react.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_bond_react.txt b/doc/src/fix_bond_react.txt index 7310545e1c..37b916cbea 100644 --- a/doc/src/fix_bond_react.txt +++ b/doc/src/fix_bond_react.txt @@ -52,7 +52,7 @@ react = mandatory argument indicating new reaction specification :l [Examples:] -For unabridged example scripts and files, see \examples\USER\misc\bond_react. +For unabridged example scripts and files, see examples/USER/misc/bond_react. molecule mol1 pre_reacted_topology.txt molecule mol2 post_reacted_topology.txt -- GitLab From 87154da7f5c95ed22d3f7085e0d5a40733788dca Mon Sep 17 00:00:00 2001 From: jrgissing Date: Wed, 17 Jul 2019 23:24:12 -0600 Subject: [PATCH 180/236] another Unix path correction --- doc/src/fix_bond_react.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/fix_bond_react.txt b/doc/src/fix_bond_react.txt index 37b916cbea..3f428e2103 100644 --- a/doc/src/fix_bond_react.txt +++ b/doc/src/fix_bond_react.txt @@ -135,7 +135,7 @@ constant-topology parts of your system separately. The dynamic group contains only atoms not involved in a reaction at a given timestep, and therefore should be used by a subsequent system-wide time integrator such as nvt, npt, or nve, as shown in the second example -above (full examples can be found at \examples\USER\misc\bond_react). +above (full examples can be found at examples/USER/misc/bond_react). The time integration command should be placed after the fix bond/react command due to the internal dynamic grouping performed by fix bond/react. -- GitLab From 9239c9dedb0563aa00ffe12d08d54a44c574af47 Mon Sep 17 00:00:00 2001 From: Adrian-Diaz Date: Fri, 19 Jul 2019 17:13:44 -0600 Subject: [PATCH 181/236] patch niche rcb issue --- src/rcb.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/rcb.cpp b/src/rcb.cpp index 83cdccdf80..ac7ac60b1f 100644 --- a/src/rcb.cpp +++ b/src/rcb.cpp @@ -467,6 +467,38 @@ void RCB::compute(int dimension, int n, double **x, double *wt, } } + //check if zero box width is the result due to dots being on box vertices + //select half of the box in this case along the best dim + //the best dim is chosen according to the optimum volume (to minimize surface area) + + if(largest==0.0){ + double best_volume=0; + double current_volume; + int dim1o,dim2o; + for (dim = 0; dim < dimension; dim++){ + if(dim==0){ + dim1o=1; + dim2o=2; + } + if(dim==1){ + dim1o=0; + dim2o=2; + } + if(dim==2){ + dim1o=0; + dim2o=1; + } + valuehalf = 0.5*(lo[dim] + hi[dim]); + current_volume = (hi[dim1o]-lo[dim1o]) + *(hi[dim2o]-lo[dim2o])*(valuehalf-lo[dim]); + //chose cut that minimizes surface area by maximizing volume; + if(current_volume>best_volume){ best_volume = current_volume; + valuehalf_select = valuehalf; + dim_select = dim; + } + } + } + // copy results for best dim cut into dim,valuehalf,dotmark dim = dim_select; -- GitLab From f2978475afd78e28232289b19b7bd7b1fbe2d7a2 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Sun, 21 Jul 2019 15:17:53 -0500 Subject: [PATCH 182/236] Update docs * bring homebrew install notes up-to-date * update openkim docs --- doc/src/Build_extras.txt | 18 ++++++---------- doc/src/Examples.txt | 4 +++- doc/src/Install_mac.txt | 43 +++++++++++++------------------------- doc/src/Intro_features.txt | 4 ++-- doc/src/fix_adapt.txt | 3 +-- doc/src/kim_commands.txt | 3 +++ 6 files changed, 30 insertions(+), 45 deletions(-) diff --git a/doc/src/Build_extras.txt b/doc/src/Build_extras.txt index 1d9a7abfcf..e6791de21b 100644 --- a/doc/src/Build_extras.txt +++ b/doc/src/Build_extras.txt @@ -176,19 +176,13 @@ use with LAMMPS. If you want to use the "kim_query"_kim_commands.html command, you also need to have libcurl installed with the matching development headers and the curl-config tool. -Note that in LAMMPS jargon, a KIM model driver is a pair style -(e.g. EAM or Tersoff). A KIM model is a pair style for a particular -element or alloy and set of parameters, e.g. EAM for Cu with a -specific EAM potential file. Also note that when downloading and -installing from source -the KIM API library with all its models, may take a long time (tens of -minutes to hours) to build. Of course you only need to do that once. - -See the list of KIM model drivers here: -https://openkim.org/browse/model-drivers/alphabetical +See "Obtaining KIM Models"_http://openkim.org/doc/usage/obtaining-models to +learn how to install a pre-build binary of the OpenKIM Repository of Models. +See the list of all KIM models here: https://openkim.org/browse/models -See the list of all KIM models here: -https://openkim.org/browse/models/by-model-drivers +(Also note that when downloading and installing from source +the KIM API library with all its models, may take a long time (tens of +minutes to hours) to build. Of course you only need to do that once.) [CMake build]: diff --git a/doc/src/Examples.txt b/doc/src/Examples.txt index fcf01de383..36d0ac86f9 100644 --- a/doc/src/Examples.txt +++ b/doc/src/Examples.txt @@ -73,7 +73,7 @@ granregion: use of fix wall/region/gran as boundary on granular particles hugoniostat: Hugoniostat shock dynamics hyper: global and local hyperdynamics of diffusion on Pt surface indent: spherical indenter into a 2d solid -kim: use of potentials in Knowledge Base for Interatomic Models (KIM) +kim: use of potentials from the "OpenKIM Repository"_openkim latte: examples for using fix latte for DFTB via the LATTE library meam: MEAM test for SiC and shear (same as shear examples) melt: rapid melt of 3d LJ system @@ -153,3 +153,5 @@ illustrate how to use the command(s) provided in that package. Many of the sub-directories have their own README files which give further instructions. See the "Packages_details"_Packages_details.html doc page for more info on specific USER packages. + +:link(openkim,https://openkim.org) diff --git a/doc/src/Install_mac.txt b/doc/src/Install_mac.txt index 3ab119522c..e277f7e0e4 100644 --- a/doc/src/Install_mac.txt +++ b/doc/src/Install_mac.txt @@ -10,47 +10,34 @@ Documentation"_ld - "LAMMPS Commands"_lc :c Download an executable for Mac :h3 LAMMPS can be downloaded, built, and configured for OS X on a Mac with -"Homebrew"_homebrew. Only four of the LAMMPS packages are unavailable -at this time because of additional needs not yet met: KIM, GPU, -USER-INTEL, USER-ATC. +"Homebrew"_homebrew. The following LAMMPS packages are unavailable at this +time because of additional needs not yet met: GPU, KOKKOS, LATTE, MSCG, +MESSAGE, MPIIO POEMS VORONOI. After installing Homebrew, you can install LAMMPS on your system with the following commands: -% brew tap homebrew/science -% brew install lammps # serial version -% brew install lammps --with-mpi # mpi support :pre +% brew install lammps :pre -This will install the executable "lammps", a python module named -"lammps", and additional resources with all the standard packages. To -get the location of the additional resources type this: - -% brew info lammps :pre - -This command also tells you additional installation options available. -The user-packages are available as options, just install them like -this example for the USER-OMP package: - -% brew install lammps --enable-user-omp :pre - -It is usually best to install LAMMPS with the most up to date source -files, which can be done with the "--HEAD" option: - -% brew install lammps --HEAD :pre - -To re-install the LAMMPS HEAD, run this command occasionally (make sure -to use the desired options). - -% brew install --force lammps --HEAD $\{options\} :pre +This will install the executables "lammps_serial" and "lammps_mpi", as well as +the LAMMPS "doc", "potentials", "tools", "bench", and "examples" directories. Once LAMMPS is installed, you can test the installation with the Lennard-Jones benchmark file: % brew test lammps -v :pre +The LAMMPS binary is built with the "KIM package"_Build_extras#kim which +results in homebrew also installing the `kim-api` binaries when LAMMPS is +installed. In order to use potentials from "openkim.org"_openkim, you can +install the `openkim-models` package + +% brew install openkim-models :pre + If you have problems with the installation you can post issues to "this link"_homebrew. Thanks to Derek Thomas (derekt at cello.t.u-tokyo.ac.jp) for setting up the Homebrew capability. -:link(homebrew,https://github.com/Homebrew/homebrew-science/issues) +:link(homebrew,https://github.com/Homebrew/homebrew-core/issues) +:link(openkim,https://openkim.org) diff --git a/doc/src/Intro_features.txt b/doc/src/Intro_features.txt index 629e8210b7..d133fd8064 100644 --- a/doc/src/Intro_features.txt +++ b/doc/src/Intro_features.txt @@ -92,8 +92,8 @@ commands) implicit solvent potentials: hydrodynamic lubrication, Debye force-field compatibility with common CHARMM, AMBER, DREIDING, \ OPLS, GROMACS, COMPASS options - access to "KIM archive"_http://openkim.org of potentials via \ - "pair kim"_pair_kim.html + access to the "OpenKIM Repository"_http://openkim.org of potentials via \ + "kim_init, kim_interactions, and kim_query"_kim_commands.html commands hybrid potentials: multiple pair, bond, angle, dihedral, improper \ potentials can be used in one simulation overlaid potentials: superposition of multiple pair potentials :ul diff --git a/doc/src/fix_adapt.txt b/doc/src/fix_adapt.txt index 0d862a890d..4f047ec42d 100644 --- a/doc/src/fix_adapt.txt +++ b/doc/src/fix_adapt.txt @@ -149,8 +149,7 @@ meaning of these parameters: "spin/neel"_pair_spin_neel.html: coulombic_cutoff: type global: "table"_pair_table.html: table_cutoff: type pairs: "ufm"_pair_ufm.html: epsilon,sigma: type pairs: -"soft"_pair_soft.html: a: type pairs: -"kim"_pair_kim.html: PARAM_FREE_*:i,j,...: global :tb(c=3,s=:) +"soft"_pair_soft.html: a: type pairs: :tb(c=3,s=:) NOTE: It is easy to add new pairwise potentials and their parameters to this list. All it typically takes is adding an extract() method to diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 7c88fd084a..169f96e6e8 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -116,6 +116,9 @@ See the "current list of KIM PMs and SMs archived in OpenKIM"_https://openkim.or This list is sorted by species and can be filtered to display only IMs for certain species combinations. +See "Obtaining KIM Models"_http://openkim.org/doc/usage/obtaining-models to +learn how to install a pre-build binary of the OpenKIM Repository of Models. + NOTE: It is also possible to locally install IMs not archived in OpenKIM, in which case their names do not have to conform to the KIM ID format. -- GitLab From c831cee21dad5e5009960498930e0543f692c2a2 Mon Sep 17 00:00:00 2001 From: Rupert Nash Date: Mon, 22 Jul 2019 09:46:01 +0100 Subject: [PATCH 183/236] Fix typos in documentation --- doc/src/compute_momentum.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/compute_momentum.txt b/doc/src/compute_momentum.txt index fc5243583e..2c6ec78cf3 100644 --- a/doc/src/compute_momentum.txt +++ b/doc/src/compute_momentum.txt @@ -29,7 +29,7 @@ the mass and velocity of the particle. [Output info:] -This compute calculates a global vector (the summed momentum) on +This compute calculates a global vector (the summed momentum) of length 3. This value can be used by any command that uses a global vector value from a compute as input. See the "Howto output"_Howto_output.html doc page for an overview of LAMMPS output -- GitLab From f5beb418e8e983d6eb32908cb1da18168b0820ca Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Mon, 22 Jul 2019 10:54:53 -0500 Subject: [PATCH 184/236] Put in KIM ID for IFF model in kim_commands usage examples --- doc/src/kim_commands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 7c88fd084a..dbe0608b5e 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -33,7 +33,7 @@ kim_interactions Si kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode kim_interactions C H O -kim_init Sim_LAMMPS_IFF_OtherInfo_AuthorList_Year_Species__SM_064312669787_000 real +Sim_LAMMPS_IFF_PCFF_HeinzMishraLinEmami_2015Ver1v5_FccmetalsMineralsSolvents Polymers__SM_064312669787_000 real kim_interactions fixed_types kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] :pre -- GitLab From 320be3bcef1b9e08a9a6c4b184fe6b1f687509da Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 Jul 2019 14:22:36 -0400 Subject: [PATCH 185/236] undo changes to poems library and package as they fail regression testing --- lib/poems/POEMSChain.h | 99 +++--- lib/poems/SystemProcessor.h | 439 ++++++++++++----------- lib/poems/body.cpp | 15 +- lib/poems/body.h | 23 +- lib/poems/body23joint.cpp | 17 +- lib/poems/body23joint.h | 9 +- lib/poems/colmatmap.cpp | 2 - lib/poems/colmatmap.h | 6 +- lib/poems/colmatrix.cpp | 5 +- lib/poems/colmatrix.h | 45 ++- lib/poems/defines.h | 7 +- lib/poems/eulerparameters.cpp | 46 ++- lib/poems/eulerparameters.h | 9 +- lib/poems/fastmatrixops.cpp | 143 ++++---- lib/poems/fastmatrixops.h | 17 +- lib/poems/fixedpoint.cpp | 5 - lib/poems/fixedpoint.h | 5 +- lib/poems/freebodyjoint.cpp | 136 ++++--- lib/poems/freebodyjoint.h | 11 +- lib/poems/inertialframe.cpp | 6 +- lib/poems/inertialframe.h | 7 +- lib/poems/joint.cpp | 23 +- lib/poems/joint.h | 12 +- lib/poems/mat3x3.cpp | 5 +- lib/poems/mat3x3.h | 17 +- lib/poems/mat4x4.cpp | 4 - lib/poems/mat4x4.h | 15 +- lib/poems/mat6x6.cpp | 4 - lib/poems/mat6x6.h | 6 +- lib/poems/matrices.h | 13 +- lib/poems/matrix.cpp | 2 - lib/poems/matrix.h | 10 +- lib/poems/matrixfun.cpp | 58 ++- lib/poems/matrixfun.h | 35 +- lib/poems/mixedjoint.cpp | 141 ++++---- lib/poems/mixedjoint.h | 16 +- lib/poems/norm.cpp | 8 - lib/poems/norm.h | 14 +- lib/poems/onbody.cpp | 9 +- lib/poems/onbody.h | 118 +++--- lib/poems/onfunctions.cpp | 49 ++- lib/poems/onfunctions.h | 8 +- lib/poems/onsolver.cpp | 16 +- lib/poems/onsolver.h | 51 ++- lib/poems/particle.cpp | 3 +- lib/poems/particle.h | 12 +- lib/poems/poemslist.h | 74 ++-- lib/poems/poemsnodelib.h | 11 +- lib/poems/poemsobject.cpp | 2 - lib/poems/poemsobject.h | 4 +- lib/poems/poemstree.h | 4 +- lib/poems/poemstreenode.cpp | 2 - lib/poems/poemstreenode.h | 47 +-- lib/poems/point.cpp | 8 +- lib/poems/point.h | 18 +- lib/poems/prismaticjoint.cpp | 6 - lib/poems/prismaticjoint.h | 9 +- lib/poems/revolutejoint.cpp | 6 - lib/poems/revolutejoint.h | 8 +- lib/poems/rigidbody.cpp | 5 +- lib/poems/rigidbody.h | 5 +- lib/poems/rowmatrix.cpp | 4 +- lib/poems/rowmatrix.h | 6 +- lib/poems/solver.cpp | 5 +- lib/poems/solver.h | 23 +- lib/poems/sphericaljoint.cpp | 206 ++++++----- lib/poems/sphericaljoint.h | 9 +- lib/poems/system.cpp | 632 ++++++++++++++++----------------- lib/poems/system.h | 58 ++- lib/poems/vect3.cpp | 11 - lib/poems/vect3.h | 12 +- lib/poems/vect4.cpp | 4 - lib/poems/vect4.h | 13 +- lib/poems/vect6.cpp | 4 - lib/poems/vect6.h | 6 +- lib/poems/virtualcolmatrix.cpp | 2 - lib/poems/virtualcolmatrix.h | 40 +-- lib/poems/virtualmatrix.cpp | 6 +- lib/poems/virtualmatrix.h | 3 +- lib/poems/virtualrowmatrix.cpp | 2 - lib/poems/virtualrowmatrix.h | 11 +- lib/poems/workspace.cpp | 21 +- lib/poems/workspace.h | 78 ++-- src/POEMS/fix_poems.cpp | 2 +- src/POEMS/fix_poems.h | 3 +- 85 files changed, 1407 insertions(+), 1664 deletions(-) diff --git a/lib/poems/POEMSChain.h b/lib/poems/POEMSChain.h index 8baa293dbd..9f0db59333 100644 --- a/lib/poems/POEMSChain.h +++ b/lib/poems/POEMSChain.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: PoemsChain.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -19,59 +19,56 @@ #define POEMSCHAIN_H_ #include "poemslist.h" -#include -namespace POEMS { struct ChildRingData { - List * childRing; - int entranceNodeId; + List * childRing; + int entranceNodeId; }; struct POEMSChain{ - ~POEMSChain(){ - for(int i = 0; i < childChains.GetNumElements(); i++) - { - delete childChains(i); - } - listOfNodes.DeleteValues(); - } - //void printTreeStructure(int tabs); - //void getTreeAsList(List * temp); - List listOfNodes; - List childChains; - POEMSChain * parentChain; - List childRings; - - - void printTreeStructure(int tabs){ - for(int i = 0; i < tabs; i++) - { - std::cout << "\t"; - } - std::cout << "Chain: "; - for(int i = 0; i < listOfNodes.GetNumElements(); i++) - { - std::cout << *(listOfNodes(i)) << " "; - } - std::cout << std::endl; - for(int i = 0; i < childChains.GetNumElements(); i++) - { - childChains(i)->printTreeStructure(tabs + 1); - } - } - void getTreeAsList(List * temp) - { - for(int i = 0; i < listOfNodes.GetNumElements(); i++) - { - int * integer = new int; - *integer = *(listOfNodes(i)); - temp->Append(integer); - } - for(int i = 0; i < childChains.GetNumElements(); i++) - { - childChains(i)->getTreeAsList(temp); - } - } + ~POEMSChain(){ + for(int i = 0; i < childChains.GetNumElements(); i++) + { + delete childChains(i); + } + listOfNodes.DeleteValues(); + } + //void printTreeStructure(int tabs); + //void getTreeAsList(List * temp); + List listOfNodes; + List childChains; + POEMSChain * parentChain; + List childRings; + + + void printTreeStructure(int tabs){ + for(int i = 0; i < tabs; i++) + { + cout << "\t"; + } + cout << "Chain: "; + for(int i = 0; i < listOfNodes.GetNumElements(); i++) + { + cout << *(listOfNodes(i)) << " "; + } + cout << endl; + for(int i = 0; i < childChains.GetNumElements(); i++) + { + childChains(i)->printTreeStructure(tabs + 1); + } + } + void getTreeAsList(List * temp) + { + for(int i = 0; i < listOfNodes.GetNumElements(); i++) + { + int * integer = new int; + *integer = *(listOfNodes(i)); + temp->Append(integer); + } + for(int i = 0; i < childChains.GetNumElements(); i++) + { + childChains(i)->getTreeAsList(temp); + } + } }; -} #endif diff --git a/lib/poems/SystemProcessor.h b/lib/poems/SystemProcessor.h index a6001d96d0..3be168c34d 100644 --- a/lib/poems/SystemProcessor.h +++ b/lib/poems/SystemProcessor.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: SystemProcessor.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,61 +11,59 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef _SYS_PROCESSOR_H_ #define _SYS_PROCESSOR_H_ -#include #include "poemslist.h" #include "poemstree.h" #include "POEMSChain.h" -namespace POEMS { struct POEMSNode { - List links; - List taken; - int idNumber; - bool visited; - - ~POEMSNode(){ - for(int i = 0; i < taken.GetNumElements(); i++) - { - delete taken(i); - } - }; + List links; + List taken; + int idNumber; + bool visited; + + ~POEMSNode(){ + for(int i = 0; i < taken.GetNumElements(); i++) + { + delete taken(i); + } + }; }; class SystemProcessor{ private: - Tree nodes; - static void POEMSNodeDelete_cb(void *node) { - delete (POEMSNode *) node; - } - List headsOfSystems; - List > ringsInSystem; - POEMSNode * findSingleLink(TreeNode * aNode); - POEMSChain * AddNewChain(POEMSNode * currentNode); - bool setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNode); + Tree nodes; + static void POEMSNodeDelete_cb(void *node) { + delete (POEMSNode *) node; + } + List headsOfSystems; + List > ringsInSystem; + POEMSNode * findSingleLink(TreeNode * aNode); + POEMSChain * AddNewChain(POEMSNode * currentNode); + bool setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNode); public: - SystemProcessor(void); - - ~SystemProcessor(void) { - headsOfSystems.DeleteValues(); - for(int i = 0; i < ringsInSystem.GetNumElements(); i++) - { - for(int k = 0; k < ringsInSystem(i)->GetNumElements(); i++) - { - delete (*ringsInSystem(i))(k); - } - } - }; - void processArray(int** links, int numLinks); - List * getSystemData(); - int getNumberOfHeadChains(); + SystemProcessor(void); + + ~SystemProcessor(void) { + headsOfSystems.DeleteValues(); + for(int i = 0; i < ringsInSystem.GetNumElements(); i++) + { + for(int k = 0; k < ringsInSystem(i)->GetNumElements(); i++) + { + delete (*ringsInSystem(i))(k); + } + } + }; + void processArray(int** links, int numLinks); + List * getSystemData(); + int getNumberOfHeadChains(); }; SystemProcessor::SystemProcessor(void){ @@ -75,145 +73,145 @@ SystemProcessor::SystemProcessor(void){ void SystemProcessor::processArray(int** links, int numLinks) { - bool * false_var; //holds the value false; needed because a constant cannot be put into a list; the list requires a - //reference. - for(int i = 0; i < numLinks; i++) //go through all the links in the input array - { - if(!nodes.Find(links[i][0])) //if the first node in the pair is not found in the storage tree - { - POEMSNode * newNode = new POEMSNode; //make a new node -// forDeletion.Append(newNode); - newNode->idNumber = links[i][0]; //set its ID to the value - newNode->visited = false; //set it to be unvisited - nodes.Insert(links[i][0], links[i][0], (void *) newNode); //and add it to the tree storage structure - } - if(!nodes.Find(links[i][1])) //repeat process for the other half of each link - { - POEMSNode * newNode = new POEMSNode; -// forDeletion.Append(newNode); - newNode->idNumber = links[i][1]; - newNode->visited = false; - nodes.Insert(links[i][1], links[i][1], (void *) newNode); - } - POEMSNode * firstNode = (POEMSNode *)nodes.Find(links[i][0]); //now that we are sure both nodes exist, - POEMSNode * secondNode = (POEMSNode *)nodes.Find(links[i][1]); //we can get both of them out of the tree - firstNode->links.Append(secondNode); //and add the link from the first to the second... - false_var = new bool; - *false_var = false; //make a new false boolean to note that the link between these two - firstNode->taken.Append(false_var); //has not already been taken, and append it to the taken list - secondNode->links.Append(firstNode); //repeat process for link from second node to first - false_var = new bool; - *false_var = false; - secondNode->taken.Append(false_var); - } - - TreeNode * temp = nodes.GetRoot(); //get the root node of the node storage tree - POEMSNode * currentNode; - do - { - currentNode = findSingleLink(temp); //find the start of the next available chain - if(currentNode != NULL) - { - headsOfSystems.Append(AddNewChain(currentNode)); //and add it to the headsOfSystems list of chains - } - } - while(currentNode != NULL); //repeat this until all chains have been added + bool * false_var; //holds the value false; needed because a constant cannot be put into a list; the list requires a + //reference. + for(int i = 0; i < numLinks; i++) //go through all the links in the input array + { + if(!nodes.Find(links[i][0])) //if the first node in the pair is not found in the storage tree + { + POEMSNode * newNode = new POEMSNode; //make a new node +// forDeletion.Append(newNode); + newNode->idNumber = links[i][0]; //set its ID to the value + newNode->visited = false; //set it to be unvisited + nodes.Insert(links[i][0], links[i][0], (void *) newNode); //and add it to the tree storage structure + } + if(!nodes.Find(links[i][1])) //repeat process for the other half of each link + { + POEMSNode * newNode = new POEMSNode; +// forDeletion.Append(newNode); + newNode->idNumber = links[i][1]; + newNode->visited = false; + nodes.Insert(links[i][1], links[i][1], (void *) newNode); + } + POEMSNode * firstNode = (POEMSNode *)nodes.Find(links[i][0]); //now that we are sure both nodes exist, + POEMSNode * secondNode = (POEMSNode *)nodes.Find(links[i][1]); //we can get both of them out of the tree + firstNode->links.Append(secondNode); //and add the link from the first to the second... + false_var = new bool; + *false_var = false; //make a new false boolean to note that the link between these two + firstNode->taken.Append(false_var); //has not already been taken, and append it to the taken list + secondNode->links.Append(firstNode); //repeat process for link from second node to first + false_var = new bool; + *false_var = false; + secondNode->taken.Append(false_var); + } + + TreeNode * temp = nodes.GetRoot(); //get the root node of the node storage tree + POEMSNode * currentNode; + do + { + currentNode = findSingleLink(temp); //find the start of the next available chain + if(currentNode != NULL) + { + headsOfSystems.Append(AddNewChain(currentNode)); //and add it to the headsOfSystems list of chains + } + } + while(currentNode != NULL); //repeat this until all chains have been added } POEMSChain * SystemProcessor::AddNewChain(POEMSNode * currentNode){ - if(currentNode == NULL) //Termination condition; if the currentNode is null, then return null - { - return NULL; - } - int * tmp; - POEMSNode * nextNode = NULL; //nextNode stores the proposed next node to add to the chain. this will be checked to make sure no backtracking is occuring before being assigned as the current node. - POEMSChain * newChain = new POEMSChain; //make a new POEMSChain object. This will be the object returned + if(currentNode == NULL) //Termination condition; if the currentNode is null, then return null + { + return NULL; + } + int * tmp; + POEMSNode * nextNode = NULL; //nextNode stores the proposed next node to add to the chain. this will be checked to make sure no backtracking is occuring before being assigned as the current node. + POEMSChain * newChain = new POEMSChain; //make a new POEMSChain object. This will be the object returned - if(currentNode->links.GetNumElements() == 0) //if we have no links from this node, then the whole chain is only one node. Add this node to the chain and return it; mark node as visited for future reference - { - currentNode->visited = true; - tmp = new int; - *tmp = currentNode->idNumber; - newChain->listOfNodes.Append(tmp); - return newChain; - } - while(currentNode->links.GetNumElements() <= 2) //we go until we get to a node that branches, or both branches have already been taken both branches can already be taken if a loop with no spurs is found in the input data - { - currentNode->visited = true; - tmp = new int; - *tmp = currentNode->idNumber; - newChain->listOfNodes.Append(tmp); //append the current node to the chain & mark as visited - //std::cout << "Appending node " << currentNode->idNumber << " to chain" << std::endl; - nextNode = currentNode->links.GetHeadElement()->value; //the next node is the first or second value stored in the links array - //of the current node. We get the first value... - if(!setLinkVisited(currentNode, nextNode)) //...and see if it points back to where we came from. If it does... - { //either way, we set this link as visited - if(currentNode->links.GetNumElements() == 1) //if it does, then if that is the only link to this node, we're done with the chain, so append the chain to the list and return the newly created chain - { -// headsOfSystems.Append(newChain); - return newChain; - } - nextNode = currentNode->links.GetHeadElement()->next->value;//follow the other link if there is one, so we go down the chain - if(!setLinkVisited(currentNode, nextNode)) //mark link as followed, so we know not to backtrack - { - // headsOfSystems.Append(newChain); - return newChain; //This condition, where no branches have occurred but both links have already - //been taken can only occur in a loop with no spurs; add this loop to the - //system (currently added as a chain for consistency), and return. - } - } - currentNode = nextNode; //set the current node to be the next node in the chain - } - currentNode->visited = true; - tmp = new int; - *tmp = currentNode->idNumber; - newChain->listOfNodes.Append(tmp); //append the last node before branch (node shared jointly with branch chains) - //re-mark as visited, just to make sure - ListElement * tempNode = currentNode->links.GetHeadElement(); //go through all of the links, one at a time that branch - POEMSChain * tempChain = NULL; //temporary variable to hold data - while(tempNode != NULL) //when we have followed all links, stop - { - if(setLinkVisited(tempNode->value, currentNode)) //dont backtrack, or create closed loops - { - tempChain = AddNewChain(tempNode->value); //Add a new chain created out of the next node down that link - tempChain->parentChain = newChain; //set the parent to be this chain - newChain->childChains.Append(tempChain); //append the chain to this chain's list of child chains - } - tempNode = tempNode->next; //go to process the next chain - } - //headsOfSystems.Append(newChain); //append this chain to the system list - return newChain; + if(currentNode->links.GetNumElements() == 0) //if we have no links from this node, then the whole chain is only one node. Add this node to the chain and return it; mark node as visited for future reference + { + currentNode->visited = true; + tmp = new int; + *tmp = currentNode->idNumber; + newChain->listOfNodes.Append(tmp); + return newChain; + } + while(currentNode->links.GetNumElements() <= 2) //we go until we get to a node that branches, or both branches have already been taken both branches can already be taken if a loop with no spurs is found in the input data + { + currentNode->visited = true; + tmp = new int; + *tmp = currentNode->idNumber; + newChain->listOfNodes.Append(tmp); //append the current node to the chain & mark as visited + //cout << "Appending node " << currentNode->idNumber << " to chain" << endl; + nextNode = currentNode->links.GetHeadElement()->value; //the next node is the first or second value stored in the links array + //of the current node. We get the first value... + if(!setLinkVisited(currentNode, nextNode)) //...and see if it points back to where we came from. If it does... + { //either way, we set this link as visited + if(currentNode->links.GetNumElements() == 1) //if it does, then if that is the only link to this node, we're done with the chain, so append the chain to the list and return the newly created chain + { +// headsOfSystems.Append(newChain); + return newChain; + } + nextNode = currentNode->links.GetHeadElement()->next->value;//follow the other link if there is one, so we go down the chain + if(!setLinkVisited(currentNode, nextNode)) //mark link as followed, so we know not to backtrack + { + // headsOfSystems.Append(newChain); + return newChain; //This condition, where no branches have occurred but both links have already + //been taken can only occur in a loop with no spurs; add this loop to the + //system (currently added as a chain for consistency), and return. + } + } + currentNode = nextNode; //set the current node to be the next node in the chain + } + currentNode->visited = true; + tmp = new int; + *tmp = currentNode->idNumber; + newChain->listOfNodes.Append(tmp); //append the last node before branch (node shared jointly with branch chains) + //re-mark as visited, just to make sure + ListElement * tempNode = currentNode->links.GetHeadElement(); //go through all of the links, one at a time that branch + POEMSChain * tempChain = NULL; //temporary variable to hold data + while(tempNode != NULL) //when we have followed all links, stop + { + if(setLinkVisited(tempNode->value, currentNode)) //dont backtrack, or create closed loops + { + tempChain = AddNewChain(tempNode->value); //Add a new chain created out of the next node down that link + tempChain->parentChain = newChain; //set the parent to be this chain + newChain->childChains.Append(tempChain); //append the chain to this chain's list of child chains + } + tempNode = tempNode->next; //go to process the next chain + } + //headsOfSystems.Append(newChain); //append this chain to the system list + return newChain; } POEMSNode * SystemProcessor::findSingleLink(TreeNode * aNode) //This function takes the root of a search tree containing POEMSNodes and returns a POEMSNode corresponding to the start of a chain in the //system. It finds a node that has not been visited before, and only has one link; this node will be used as the head of the chain. { - if(aNode == NULL) - { - return NULL; - } - POEMSNode * returnVal = (POEMSNode *)aNode->GetAuxData(); //get the poemsnode data out of the treenode - POEMSNode * detectLoneLoops = NULL; //is used to handle a loop that has no protruding chains - if(returnVal->visited == false) - { - detectLoneLoops = returnVal; //if we find any node that has not been visited yet, save it - } - if(returnVal->links.GetNumElements() == 1 && returnVal->visited == false) //see if it has one element and hasnt been visited already - { - return returnVal; //return the node is it meets this criteria - } - returnVal = findSingleLink(aNode->Left()); //otherwise, check the left subtree - if(returnVal == NULL) //and if we find nothing... - { - returnVal = findSingleLink(aNode->Right()); //check the right subtree - } - if(returnVal == NULL) //if we could not find any chains - { - returnVal = detectLoneLoops; //see if we found any nodes at all that havent been processed - } - return returnVal; //return what we find (will be NULL if no new chains are - //found) + if(aNode == NULL) + { + return NULL; + } + POEMSNode * returnVal = (POEMSNode *)aNode->GetAuxData(); //get the poemsnode data out of the treenode + POEMSNode * detectLoneLoops = NULL; //is used to handle a loop that has no protruding chains + if(returnVal->visited == false) + { + detectLoneLoops = returnVal; //if we find any node that has not been visited yet, save it + } + if(returnVal->links.GetNumElements() == 1 && returnVal->visited == false) //see if it has one element and hasnt been visited already + { + return returnVal; //return the node is it meets this criteria + } + returnVal = findSingleLink(aNode->Left()); //otherwise, check the left subtree + if(returnVal == NULL) //and if we find nothing... + { + returnVal = findSingleLink(aNode->Right()); //check the right subtree + } + if(returnVal == NULL) //if we could not find any chains + { + returnVal = detectLoneLoops; //see if we found any nodes at all that havent been processed + } + return returnVal; //return what we find (will be NULL if no new chains are + //found) } bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNode) @@ -225,66 +223,65 @@ bool SystemProcessor::setLinkVisited(POEMSNode * firstNode, POEMSNode * secondNo //value for that particular link. Because each link is represented twice, (once at each node in the link), both of the boolean values need //to be set in the event that the link has to be set as visited. { - //std::cout << "Checking link between nodes " << firstNode->idNumber << " and " << secondNode->idNumber << "... "; - ListElement * tmp = firstNode->links.GetHeadElement(); //get the head element of the list of pointers for node 1 - ListElement * tmp2 = firstNode->taken.GetHeadElement(); //get the head element of the list of bool isVisited flags for node 1 - while(tmp->value != NULL || tmp2->value != NULL) //go through untill we reach the end of the lists - { - if(tmp->value == secondNode) //if we find the link to the other node - { - if(*(tmp2->value) == true) //if the link has already been visited - { - //std::cout << "visited already" << std::endl; - return false; //return false to indicate that the link has been visited before this attempt - } - else //otherwise, visit it - { - *tmp2->value = true; - } - break; - } - tmp = tmp->next; //go check next link - tmp2 = tmp2->next; - } + //cout << "Checking link between nodes " << firstNode->idNumber << " and " << secondNode->idNumber << "... "; + ListElement * tmp = firstNode->links.GetHeadElement(); //get the head element of the list of pointers for node 1 + ListElement * tmp2 = firstNode->taken.GetHeadElement(); //get the head element of the list of bool isVisited flags for node 1 + while(tmp->value != NULL || tmp2->value != NULL) //go through untill we reach the end of the lists + { + if(tmp->value == secondNode) //if we find the link to the other node + { + if(*(tmp2->value) == true) //if the link has already been visited + { + //cout << "visited already" << endl; + return false; //return false to indicate that the link has been visited before this attempt + } + else //otherwise, visit it + { + *tmp2->value = true; + } + break; + } + tmp = tmp->next; //go check next link + tmp2 = tmp2->next; + } - tmp = secondNode->links.GetHeadElement(); //now, if the link was unvisited, we need to go set the other node's list such that - //it also knows this link is being visited - tmp2 = secondNode->taken.GetHeadElement(); - while(tmp->value != NULL || tmp2->value != NULL) //go through the list - { - if(tmp->value == firstNode) //if we find the link - { - if(*(tmp2->value) == true) //and it has already been visited, then signal an error; this shouldnt ever happen - { - std::cout << "Error in parsing structure! Should never reach this condition! \n" << - "Record of visited links out of synch between two adjacent nodes.\n"; - return false; - } - else - { - *tmp2->value = true; //set the appropriate value to true to indicate this link has been visited - } - break; - } - tmp = tmp->next; - tmp2 = tmp2->next; - } - //std::cout << "not visited" << std::endl; - return true; //return true to indicate that this is the first time the link has been visited + tmp = secondNode->links.GetHeadElement(); //now, if the link was unvisited, we need to go set the other node's list such that + //it also knows this link is being visited + tmp2 = secondNode->taken.GetHeadElement(); + while(tmp->value != NULL || tmp2->value != NULL) //go through the list + { + if(tmp->value == firstNode) //if we find the link + { + if(*(tmp2->value) == true) //and it has already been visited, then signal an error; this shouldnt ever happen + { + cout << "Error in parsing structure! Should never reach this condition! \n" << + "Record of visited links out of synch between two adjacent nodes.\n"; + return false; + } + else + { + *tmp2->value = true; //set the appropriate value to true to indicate this link has been visited + } + break; + } + tmp = tmp->next; + tmp2 = tmp2->next; + } + //cout << "not visited" << endl; + return true; //return true to indicate that this is the first time the link has been visited } -List * SystemProcessor::getSystemData(void) //Gets the list of POEMSChains that comprise the system. Might eventually only - //return chains linked to the reference plane, but currently returns every chain - //in the system. +List * SystemProcessor::getSystemData(void) //Gets the list of POEMSChains that comprise the system. Might eventually only + //return chains linked to the reference plane, but currently returns every chain + //in the system. { - return &headsOfSystems; + return &headsOfSystems; } int SystemProcessor::getNumberOfHeadChains(void) //This function isnt implemented yet, and might be taken out entirely; this was a holdover - //from when I intended to return an array of chain pointers, rather than a list of chains - //It will probably be deleted once I finish figuring out exactly what needs to be returned + //from when I intended to return an array of chain pointers, rather than a list of chains + //It will probably be deleted once I finish figuring out exactly what needs to be returned { - return 0; -} + return 0; } #endif diff --git a/lib/poems/body.cpp b/lib/poems/body.cpp index 6825941b93..4ef05dd1e6 100644 --- a/lib/poems/body.cpp +++ b/lib/poems/body.cpp @@ -14,20 +14,11 @@ * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - -#include - -#include "body.h" -#include "inertialframe.h" -#include "mat3x3.h" -#include "particle.h" -#include "poemslist.h" + +#include "bodies.h" #include "point.h" -#include "rigidbody.h" -#include "vect3.h" using namespace std; -using namespace POEMS; Body::Body() { @@ -131,7 +122,7 @@ void Body::AddPoint(Point* point){ // global body functions // -Body* POEMS::NewBody(int type){ +Body* NewBody(int type){ switch( BodyType(type) ) { case INERTIALFRAME : // The inertial reference frame diff --git a/lib/poems/body.h b/lib/poems/body.h index e2394b40aa..f8e0f6a5a3 100644 --- a/lib/poems/body.h +++ b/lib/poems/body.h @@ -19,29 +19,30 @@ #ifndef BODY_H #define BODY_H -#include #include "poemslist.h" +#include #include "poemsobject.h" -#include "mat3x3.h" -#include "vect3.h" -namespace POEMS { +#include "matrices.h" + + + // emumerated type enum BodyType { INERTIALFRAME = 0, PARTICLE = 1, RIGIDBODY = 2 }; - + class Point; class Joint; - +class CompBody; class Body : public POEMSObject { public: double mass; Mat3x3 inertia; - + Vect3 r; Vect3 v; Vect3 v_k; @@ -53,13 +54,13 @@ public: Vect3 alpha; Vect3 alpha_t; double KE; - + List joints; List points; Body(); - + bool ReadIn(std::istream& in); void WriteOut(std::ostream& out); bool ReadInPoints(std::istream& in); @@ -67,7 +68,7 @@ public: Point* GetPoint(int p); void AddJoint(Joint* joint); void AddPoint(Point* point); - + virtual bool ReadInBodyData(std::istream& in) = 0; virtual void WriteOutBodyData(std::ostream& out) = 0; virtual ~Body(); @@ -76,5 +77,5 @@ public: // global body functions Body* NewBody(int type); -} + #endif diff --git a/lib/poems/body23joint.cpp b/lib/poems/body23joint.cpp index e3ef32b2a9..8cd0a95bca 100644 --- a/lib/poems/body23joint.cpp +++ b/lib/poems/body23joint.cpp @@ -14,21 +14,18 @@ * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ + -#include #include "body23joint.h" +#include "point.h" +#include "matrixfun.h" #include "body.h" -#include "colmatrix.h" -#include "eulerparameters.h" #include "fastmatrixops.h" -#include "mat3x3.h" -#include "matrixfun.h" -#include "point.h" -#include "vect3.h" -#include "virtualmatrix.h" +#include "norm.h" +#include "eulerparameters.h" +#include "matrices.h" +#include -using namespace std; -using namespace POEMS; Body23Joint::Body23Joint(){ DimQandU(4,2); diff --git a/lib/poems/body23joint.h b/lib/poems/body23joint.h index 43a727c815..60253ac8a4 100644 --- a/lib/poems/body23joint.h +++ b/lib/poems/body23joint.h @@ -18,11 +18,12 @@ #ifndef BODY23JOINT_H #define BODY23JOINT_H -#include #include "joint.h" -#include "matrix.h" +#include "vect3.h" +#include "mat3x3.h" + + -namespace POEMS { class Body23Joint : public Joint { Matrix const_sP; public: @@ -39,5 +40,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; -} + #endif diff --git a/lib/poems/colmatmap.cpp b/lib/poems/colmatmap.cpp index 34a95feb03..1954e7ff15 100644 --- a/lib/poems/colmatmap.cpp +++ b/lib/poems/colmatmap.cpp @@ -21,8 +21,6 @@ #include using namespace std; -using namespace POEMS; - ColMatMap::ColMatMap(){ numrows = 0; diff --git a/lib/poems/colmatmap.h b/lib/poems/colmatmap.h index 5a12cf487f..3a6267a247 100644 --- a/lib/poems/colmatmap.h +++ b/lib/poems/colmatmap.h @@ -19,12 +19,8 @@ #ifndef COLMATMAP_H #define COLMATMAP_H -#include - #include "virtualcolmatrix.h" -#include "virtualmatrix.h" -namespace POEMS { class ColMatrix; class ColMatMap : public VirtualColMatrix { @@ -65,5 +61,5 @@ public: friend void FastCKRK5(ColMatMap& X, ColMatrix& Xi, ColMatrix* f, double* c, double dt); friend void FastFRK5(ColMatMap& X, ColMatrix& Xi, ColMatrix* f, double* c, double dt); }; -} + #endif diff --git a/lib/poems/colmatrix.cpp b/lib/poems/colmatrix.cpp index 0cc666645a..dc6f49be2b 100644 --- a/lib/poems/colmatrix.cpp +++ b/lib/poems/colmatrix.cpp @@ -16,13 +16,12 @@ *_________________________________________________________________________*/ #include "colmatrix.h" - +#include "rowmatrix.h" #include +#include #include using namespace std; -using namespace POEMS; - ColMatrix::ColMatrix(){ numrows = 0; diff --git a/lib/poems/colmatrix.h b/lib/poems/colmatrix.h index bcfa86843a..11fd85a928 100644 --- a/lib/poems/colmatrix.h +++ b/lib/poems/colmatrix.h @@ -19,18 +19,15 @@ #ifndef COLMATRIX_H #define COLMATRIX_H -#include #include "virtualcolmatrix.h" -#include "virtualmatrix.h" +#include "colmatmap.h" -namespace POEMS { class Matrix; class Vect6; class Mat3x3; class Vect3; class ColMatrix : public VirtualColMatrix { -protected: double* elements; public: ColMatrix(); @@ -60,28 +57,28 @@ public: ColMatrix& operator=(const VirtualMatrix& A); // overloaded = ColMatrix& operator*=(double b); - void Abs(); - void BasicMax(double& value, int& index); - void BasicMin(double& value, int& index); + void Abs(); + void BasicMax(double& value, int& index); + void BasicMin(double& value, int& index); // fast matrix operations - friend void FastQuaternions(ColMatrix& q, Mat3x3& C); - friend void FastInvQuaternions(Mat3x3& C, ColMatrix& q); - friend void FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot); - friend void FastTMult(Matrix& A, Vect6& B, ColMatrix& C); - friend void FastMult(Matrix& A, ColMatrix& B, Vect6& C); - friend void FastAssign(ColMatrix& A, ColMatrix& C); + friend void FastQuaternions(ColMatrix& q, Mat3x3& C); + friend void FastInvQuaternions(Mat3x3& C, ColMatrix& q); + friend void FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot); + friend void FastTMult(Matrix& A, Vect6& B, ColMatrix& C); + friend void FastMult(Matrix& A, ColMatrix& B, Vect6& C); + friend void FastAssign(ColMatrix& A, ColMatrix& C); - friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); - friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); - friend void FastAssign(ColMatrix&A, Vect3& C); - - friend void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); - friend void EP_Transformation(ColMatrix& q, Mat3x3& C); - friend void EP_FromTransformation(ColMatrix& q, Mat3x3& C); - friend void EP_Normalize(ColMatrix& q); - friend void EPdotdot_udot(ColMatrix& Audot, ColMatrix& Aqdot, ColMatrix& Aq,ColMatrix& Aqddot); - friend void qdot_to_u(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); + friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); + friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); + friend void FastAssign(ColMatrix&A, Vect3& C); + + friend void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); + friend void EP_Transformation(ColMatrix& q, Mat3x3& C); + friend void EP_FromTransformation(ColMatrix& q, Mat3x3& C); + friend void EP_Normalize(ColMatrix& q); + friend void EPdotdot_udot(ColMatrix& Audot, ColMatrix& Aqdot, ColMatrix& Aq,ColMatrix& Aqddot); + friend void qdot_to_u(ColMatrix& q, ColMatrix& u, ColMatrix& qdot); }; -} + #endif diff --git a/lib/poems/defines.h b/lib/poems/defines.h index 877bc0fa0b..455bc298d5 100644 --- a/lib/poems/defines.h +++ b/lib/poems/defines.h @@ -15,14 +15,13 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ -#ifndef POEMS_DEFINES_H -#define POEMS_DEFINES_H +#ifndef _DEFINES_H_ +#define _DEFINES_H_ -namespace POEMS { enum SolverType { ONSOLVER = 0, PARTICLESOLVER = 1 }; -} + #endif diff --git a/lib/poems/eulerparameters.cpp b/lib/poems/eulerparameters.cpp index bb8d676796..032bc7da82 100644 --- a/lib/poems/eulerparameters.cpp +++ b/lib/poems/eulerparameters.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: eulerparameters.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,22 +11,16 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #include "eulerparameters.h" - #include -#include "colmatrix.h" -#include "mat3x3.h" - using namespace std; -using namespace POEMS; - -void POEMS::EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot){ +void EP_Derivatives(ColMatrix& q, ColMatrix& u, ColMatrix& qdot){ EP_Normalize(q); int num=u.GetNumRows(); if (3 - +#include #include "fastmatrixops.h" -#include "colmatmap.h" -#include "colmatrix.h" -#include "mat3x3.h" -#include "mat4x4.h" -#include "mat6x6.h" -#include "matrix.h" -#include "vect3.h" -#include "vect4.h" -#include "vect6.h" +#include using namespace std; -using namespace POEMS; - // // Cross Product (friend of Vect3) // -void POEMS::FastCross(Vect3& a, Vect3& b, Vect3& c){ +void FastCross(Vect3& a, Vect3& b, Vect3& c){ c.elements[0] = a.elements[1]*b.elements[2] - a.elements[2]*b.elements[1]; c.elements[1] = a.elements[2]*b.elements[0] - a.elements[0]*b.elements[2]; c.elements[2] = a.elements[0]*b.elements[1] - a.elements[1]*b.elements[0]; @@ -46,7 +35,7 @@ void POEMS::FastCross(Vect3& a, Vect3& b, Vect3& c){ // Simple Rotation (friend of Vect3 and Mat3x3) // -void POEMS::FastSimpleRotation(Vect3& v, double q, Mat3x3& C){ +void FastSimpleRotation(Vect3& v, double q, Mat3x3& C){ // intermediate quantities double cq = cos(q); double sq = sin(q); @@ -71,7 +60,7 @@ void POEMS::FastSimpleRotation(Vect3& v, double q, Mat3x3& C){ // Quaternion Functions // -void POEMS::FastQuaternions(ColMatrix& q, Mat3x3& C){ +void FastQuaternions(ColMatrix& q, Mat3x3& C){ double* e = q.elements; // normalize the quaternions @@ -96,7 +85,7 @@ void POEMS::FastQuaternions(ColMatrix& q, Mat3x3& C){ C.elements[2][1] = 2 * (e[2]*e[3] + e[0]*e[1]); } -void POEMS::FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot){ +void FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot){ double* w = omega.elements; double* e = q.elements; @@ -106,7 +95,7 @@ void POEMS::FastQuaternionDerivatives(ColMatrix& q, ColMatrix& omega, ColMatrix& qdot.elements[3] = 0.5 * ( w[2]*e[0] + w[1]*e[1] - w[0]*e[2]); } -void POEMS::FastInvQuaternions(Mat3x3& C, ColMatrix& q){ +void FastInvQuaternions(Mat3x3& C, ColMatrix& q){ } // @@ -123,7 +112,7 @@ void POEMS::FastInvQuaternions(Mat3x3& C, ColMatrix& q){ // // friend of Matrix -void POEMS::FastLDLT(Matrix& A, Matrix& C){ // C is the LD of the LDL^T decomposition of A (SPD) +void FastLDLT(Matrix& A, Matrix& C){ // C is the LD of the LDL^T decomposition of A (SPD) double Lv; int n = A.numrows; @@ -145,7 +134,7 @@ void POEMS::FastLDLT(Matrix& A, Matrix& C){ // C is the LD of the LDL^T decompos // friend of Mat6x6 -void POEMS::FastLDLT(Mat6x6& A, Mat6x6& C){ // C is the LD of the LDL^T decomposition of A (SPD) +void FastLDLT(Mat6x6& A, Mat6x6& C){ // C is the LD of the LDL^T decomposition of A (SPD) double v[6]; double Lv; @@ -167,7 +156,7 @@ void POEMS::FastLDLT(Mat6x6& A, Mat6x6& C){ // C is the LD of the LDL^T decompos } // friend of Matrix -void POEMS::FastLDLTSubs(Matrix& LD, Matrix& B, Matrix& C){ +void FastLDLTSubs(Matrix& LD, Matrix& B, Matrix& C){ int n = B.numrows; int c = B.numcols; double temp; @@ -192,7 +181,7 @@ void POEMS::FastLDLTSubs(Matrix& LD, Matrix& B, Matrix& C){ } // friend of Matrix -void POEMS::FastLDLTSubsLH(Matrix& B, Matrix& LD, Matrix& C){ +void FastLDLTSubsLH(Matrix& B, Matrix& LD, Matrix& C){ int n = B.numcols; int c = B.numrows; double temp; @@ -217,7 +206,7 @@ void POEMS::FastLDLTSubsLH(Matrix& B, Matrix& LD, Matrix& C){ } // friend of Mat6x6 -void POEMS::FastLDLTSubs(Mat6x6& LD, Mat6x6& B, Mat6x6& C){ +void FastLDLTSubs(Mat6x6& LD, Mat6x6& B, Mat6x6& C){ double temp; for(int k=0;k<6;k++){ @@ -240,7 +229,7 @@ void POEMS::FastLDLTSubs(Mat6x6& LD, Mat6x6& B, Mat6x6& C){ } // friend of Mat6x6 & Vect6 -void POEMS::FastLDLTSubs(Mat6x6& LD, Vect6& B, Vect6& C){ +void FastLDLTSubs(Mat6x6& LD, Vect6& B, Vect6& C){ double temp; for(int i=0;i<6;i++){ @@ -261,7 +250,7 @@ void POEMS::FastLDLTSubs(Mat6x6& LD, Vect6& B, Vect6& C){ } // friend of Matrix -void POEMS::FastLU(Matrix& A, Matrix& LU, int *indx){ // LU is the LU decomposition of A +void FastLU(Matrix& A, Matrix& LU, int *indx){ // LU is the LU decomposition of A int i,imax=0,j,k; int n = A.numrows; double big, dum, sum, temp; @@ -311,7 +300,7 @@ void POEMS::FastLU(Matrix& A, Matrix& LU, int *indx){ // LU is the LU decomposit } // friend of Mat3x3 -void POEMS::FastLU(Mat3x3& A, Mat3x3& LU, int *indx){ // LU is the LU decomposition of A +void FastLU(Mat3x3& A, Mat3x3& LU, int *indx){ // LU is the LU decomposition of A int i,imax=0,j,k; double big, dum, sum, temp; double vv[10000]; @@ -359,7 +348,7 @@ void POEMS::FastLU(Mat3x3& A, Mat3x3& LU, int *indx){ // LU is the LU decomposit } // friend of Mat4x4 -void POEMS::FastLU(Mat4x4& A, Mat4x4& LU, int *indx){ // LU is the LU decomposition of A +void FastLU(Mat4x4& A, Mat4x4& LU, int *indx){ // LU is the LU decomposition of A int i,imax=0,j,k; double big, dum, sum, temp; double vv[10000]; @@ -407,7 +396,7 @@ void POEMS::FastLU(Mat4x4& A, Mat4x4& LU, int *indx){ // LU is the LU decomposit } // friend of Mat6x6 -void POEMS::FastLU(Mat6x6& A, Mat6x6& LU, int *indx){ // LU is the LU decomposition of A +void FastLU(Mat6x6& A, Mat6x6& LU, int *indx){ // LU is the LU decomposition of A int i,imax=0,j,k; double big, dum, sum, temp; double vv[10000]; @@ -455,7 +444,7 @@ void POEMS::FastLU(Mat6x6& A, Mat6x6& LU, int *indx){ // LU is the LU decomposit } // friend of Matrix -void POEMS::FastLUSubs(Matrix& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution +void FastLUSubs(Matrix& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution int i,ip,j,k; int n = B.numrows; int c = B.numcols; @@ -479,7 +468,7 @@ void POEMS::FastLUSubs(Matrix& LU, Matrix& B, Matrix& C, int *indx){ // Appropri } // friend of Matrix and Mat3x3 -void POEMS::FastLUSubs(Mat3x3& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution +void FastLUSubs(Mat3x3& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution int i,ip,j,k; int n = B.numrows; int c = B.numcols; @@ -503,7 +492,7 @@ void POEMS::FastLUSubs(Mat3x3& LU, Matrix& B, Matrix& C, int *indx){ // Appropri } // friend of Matrix and Mat4x4 -void POEMS::FastLUSubs(Mat4x4& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution +void FastLUSubs(Mat4x4& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution int i,ip,j,k; int n = B.numrows; int c = B.numcols; @@ -527,7 +516,7 @@ void POEMS::FastLUSubs(Mat4x4& LU, Matrix& B, Matrix& C, int *indx){ // Appropri } // friend of Matrix and Mat6x6 -void POEMS::FastLUSubs(Mat6x6& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution +void FastLUSubs(Mat6x6& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution int i,ip,j,k; int n = B.numrows; int c = B.numcols; @@ -553,7 +542,7 @@ void POEMS::FastLUSubs(Mat6x6& LU, Matrix& B, Matrix& C, int *indx){ // Appropri // The following LUSubsLH routine is incomplete at the moment. // friend of Matrix -void POEMS::FastLUSubsLH(Matrix& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution +void FastLUSubsLH(Matrix& LU, Matrix& B, Matrix& C, int *indx){ // Appropriate Forward and Back Substitution int i,ip,j,k; int n = B.numcols; int c = B.numrows; @@ -584,13 +573,13 @@ void POEMS::FastLUSubsLH(Matrix& LU, Matrix& B, Matrix& C, int *indx){ // Approp // Triple sum // -void POEMS::FastTripleSum(Vect3& a, Vect3& b, Vect3& c, Vect3& d){ // d = a+b+c +void FastTripleSum(Vect3& a, Vect3& b, Vect3& c, Vect3& d){ // d = a+b+c d.elements[0] = a.elements[0]+b.elements[0]+c.elements[0]; d.elements[1] = a.elements[1]+b.elements[1]+c.elements[1]; d.elements[2] = a.elements[2]+b.elements[2]+c.elements[2]; } -void POEMS::FastTripleSumPPM(Vect3& a, Vect3& b, Vect3& c, Vect3& d){ // d = a+b-c +void FastTripleSumPPM(Vect3& a, Vect3& b, Vect3& c, Vect3& d){ // d = a+b-c d.elements[0] = a.elements[0]+b.elements[0]-c.elements[0]; d.elements[1] = a.elements[1]+b.elements[1]-c.elements[1]; d.elements[2] = a.elements[2]+b.elements[2]-c.elements[2]; @@ -601,7 +590,7 @@ void POEMS::FastTripleSumPPM(Vect3& a, Vect3& b, Vect3& c, Vect3& d){ // d = a+b // // friend of matrix -void POEMS::FastMult(Matrix& A, Matrix& B, Matrix& C){ // C = A*B +void FastMult(Matrix& A, Matrix& B, Matrix& C){ // C = A*B // assumes dimensions are already correct! int r = A.numrows; int ca = A.numcols; @@ -617,7 +606,7 @@ void POEMS::FastMult(Matrix& A, Matrix& B, Matrix& C){ // C = A*B } // friend of matrix -void POEMS::FastTMult(Matrix& A, Matrix& B, Matrix& C){ // C = A*B +void FastTMult(Matrix& A, Matrix& B, Matrix& C){ // C = A*B // assumes dimensions are already correct! int r = A.numcols; int ca = A.numrows; @@ -633,14 +622,14 @@ void POEMS::FastTMult(Matrix& A, Matrix& B, Matrix& C){ // C = A*B } // friend of Mat3x3 & Vect3 -void POEMS::FastMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = A*B +void FastMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = A*B C.elements[0] = A.elements[0][0]*B.elements[0] + A.elements[0][1]*B.elements[1] + A.elements[0][2]*B.elements[2]; C.elements[1] = A.elements[1][0]*B.elements[0] + A.elements[1][1]*B.elements[1] + A.elements[1][2]*B.elements[2]; C.elements[2] = A.elements[2][0]*B.elements[0] + A.elements[2][1]*B.elements[1] + A.elements[2][2]*B.elements[2]; } // friend of Mat3x3, ColMatrix, & Vect3 -void POEMS::FastMult(Mat3x3& A, ColMatrix& B, Vect3& C){ // C = A*B +void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C){ // C = A*B C.elements[0] = A.elements[0][0]*B.elements[0] + A.elements[0][1]*B.elements[1] + A.elements[0][2]*B.elements[2]; C.elements[1] = A.elements[1][0]*B.elements[0] + A.elements[1][1]*B.elements[1] + A.elements[1][2]*B.elements[2]; C.elements[2] = A.elements[2][0]*B.elements[0] + A.elements[2][1]*B.elements[1] + A.elements[2][2]*B.elements[2]; @@ -648,42 +637,42 @@ void POEMS::FastMult(Mat3x3& A, ColMatrix& B, Vect3& C){ // C = A*B // friend of Mat3x3, ColMatrix, & Vect3 -void POEMS::FastMult(Mat3x3& A, Vect3& B, ColMatrix& C){ // C = A*B +void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C){ // C = A*B C.elements[0] = A.elements[0][0]*B.elements[0] + A.elements[0][1]*B.elements[1] + A.elements[0][2]*B.elements[2]; C.elements[1] = A.elements[1][0]*B.elements[0] + A.elements[1][1]*B.elements[1] + A.elements[1][2]*B.elements[2]; C.elements[2] = A.elements[2][0]*B.elements[0] + A.elements[2][1]*B.elements[1] + A.elements[2][2]*B.elements[2]; } // friend of Mat3x3 & Vect3 -void POEMS::FastTMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = A^T*B +void FastTMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = A^T*B C.elements[0] = A.elements[0][0]*B.elements[0] + A.elements[1][0]*B.elements[1] + A.elements[2][0]*B.elements[2]; C.elements[1] = A.elements[0][1]*B.elements[0] + A.elements[1][1]*B.elements[1] + A.elements[2][1]*B.elements[2]; C.elements[2] = A.elements[0][2]*B.elements[0] + A.elements[1][2]*B.elements[1] + A.elements[2][2]*B.elements[2]; } // friend of Mat3x3 & Vect3 -void POEMS::FastNegMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = -A*B +void FastNegMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = -A*B C.elements[0] = -A.elements[0][0]*B.elements[0] - A.elements[0][1]*B.elements[1] - A.elements[0][2]*B.elements[2]; C.elements[1] = -A.elements[1][0]*B.elements[0] - A.elements[1][1]*B.elements[1] - A.elements[1][2]*B.elements[2]; C.elements[2] = -A.elements[2][0]*B.elements[0] - A.elements[2][1]*B.elements[1] - A.elements[2][2]*B.elements[2]; } // friend of Mat3x3 & Vect3 -void POEMS::FastNegTMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = -A^T*B +void FastNegTMult(Mat3x3& A, Vect3& B, Vect3& C){ // C = -A^T*B C.elements[0] = -A.elements[0][0]*B.elements[0] - A.elements[1][0]*B.elements[1] - A.elements[2][0]*B.elements[2]; C.elements[1] = -A.elements[0][1]*B.elements[0] - A.elements[1][1]*B.elements[1] - A.elements[2][1]*B.elements[2]; C.elements[2] = -A.elements[0][2]*B.elements[0] - A.elements[1][2]*B.elements[1] - A.elements[2][2]*B.elements[2]; } // friend of Vect3 -void POEMS::FastMult(double a, Vect3& B, Vect3& C){ // C = a*B +void FastMult(double a, Vect3& B, Vect3& C){ // C = a*B C.elements[0] = a*B.elements[0]; C.elements[1] = a*B.elements[1]; C.elements[2] = a*B.elements[2]; } // friend of Mat4x4 & Vect4 -void POEMS::FastMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = A*B +void FastMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = A*B C.elements[0] = A.elements[0][0]*B.elements[0] + A.elements[0][1]*B.elements[1] + A.elements[0][2]*B.elements[2] + A.elements[0][3]*B.elements[3]; C.elements[1] = A.elements[1][0]*B.elements[0] + A.elements[1][1]*B.elements[1] + A.elements[1][2]*B.elements[2] + A.elements[1][3]*B.elements[3]; C.elements[2] = A.elements[2][0]*B.elements[0] + A.elements[2][1]*B.elements[1] + A.elements[2][2]*B.elements[2] + A.elements[2][3]*B.elements[3]; @@ -691,7 +680,7 @@ void POEMS::FastMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = A*B } // friend of Mat4x4 & Vect4 -void POEMS::FastTMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = A^T*B +void FastTMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = A^T*B C.elements[0] = A.elements[0][0]*B.elements[0] + A.elements[1][0]*B.elements[1] + A.elements[2][0]*B.elements[2] + A.elements[3][0]*B.elements[3]; C.elements[1] = A.elements[0][1]*B.elements[0] + A.elements[1][1]*B.elements[1] + A.elements[2][1]*B.elements[2] + A.elements[3][1]*B.elements[3]; C.elements[2] = A.elements[0][2]*B.elements[0] + A.elements[1][2]*B.elements[1] + A.elements[2][2]*B.elements[2] + A.elements[3][2]*B.elements[3]; @@ -699,7 +688,7 @@ void POEMS::FastTMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = A^T*B } // friend of Mat4x4 & Vect4 -void POEMS::FastNegMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = -A*B +void FastNegMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = -A*B C.elements[0] = -A.elements[0][0]*B.elements[0] - A.elements[0][1]*B.elements[1] - A.elements[0][2]*B.elements[2] - A.elements[0][3]*B.elements[3]; C.elements[1] = -A.elements[1][0]*B.elements[0] - A.elements[1][1]*B.elements[1] - A.elements[1][2]*B.elements[2] - A.elements[1][3]*B.elements[3]; C.elements[2] = -A.elements[2][0]*B.elements[0] - A.elements[2][1]*B.elements[1] - A.elements[2][2]*B.elements[2] - A.elements[2][3]*B.elements[3]; @@ -707,7 +696,7 @@ void POEMS::FastNegMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = -A*B } // friend of Mat4x4 & Vect4 -void POEMS::FastNegTMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = -A^T*B +void FastNegTMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = -A^T*B C.elements[0] = -A.elements[0][0]*B.elements[0] - A.elements[1][0]*B.elements[1] - A.elements[2][0]*B.elements[2] - A.elements[3][0]*B.elements[3]; C.elements[1] = -A.elements[0][1]*B.elements[0] - A.elements[1][1]*B.elements[1] - A.elements[2][1]*B.elements[2] - A.elements[3][1]*B.elements[3]; C.elements[2] = -A.elements[0][2]*B.elements[0] - A.elements[1][2]*B.elements[1] - A.elements[2][2]*B.elements[2] - A.elements[3][2]*B.elements[3]; @@ -715,7 +704,7 @@ void POEMS::FastNegTMult(Mat4x4& A, Vect4& B, Vect4& C){ // C = -A^T*B } // friend of Vect4 -void POEMS::FastMult(double a, Vect4& B, Vect4& C){ // C = a*B +void FastMult(double a, Vect4& B, Vect4& C){ // C = a*B C.elements[0] = a*B.elements[0]; C.elements[1] = a*B.elements[1]; C.elements[2] = a*B.elements[2]; @@ -723,7 +712,7 @@ void POEMS::FastMult(double a, Vect4& B, Vect4& C){ // C = a*B } // friend of Matrix & Mat6x6 -void POEMS::FastMultT(Matrix& A, Matrix& B, Mat6x6& C){ // C = A*B^T +void FastMultT(Matrix& A, Matrix& B, Mat6x6& C){ // C = A*B^T int i,j,k,n; n = A.numcols; @@ -736,7 +725,7 @@ void POEMS::FastMultT(Matrix& A, Matrix& B, Mat6x6& C){ // C = A*B^T } // friend Matrix, Vect6, ColMatrix -void POEMS::FastMult(Matrix& A, ColMatrix& B, Vect6& C){ +void FastMult(Matrix& A, ColMatrix& B, Vect6& C){ int ca = A.numcols; int i,k; @@ -748,7 +737,7 @@ void POEMS::FastMult(Matrix& A, ColMatrix& B, Vect6& C){ } // friend of Matrix & Mat6x6 -void POEMS::FastMult(Mat6x6& A, Matrix& B, Matrix& C){ // C = A*B +void FastMult(Mat6x6& A, Matrix& B, Matrix& C){ // C = A*B // assumes dimensions are already correct! int cb = B.numcols; @@ -762,7 +751,7 @@ void POEMS::FastMult(Mat6x6& A, Matrix& B, Matrix& C){ // C = A*B } // friend Matrix, Vect6, ColMatrix -void POEMS::FastTMult(Matrix& A, Vect6& B, ColMatrix& C){ // C = A^T*B +void FastTMult(Matrix& A, Vect6& B, ColMatrix& C){ // C = A^T*B int n = C.numrows; int i,k; for(i=0;i #include -#include "virtualmatrix.h" - using namespace std; -using namespace POEMS; - FixedPoint::FixedPoint(){ } diff --git a/lib/poems/fixedpoint.h b/lib/poems/fixedpoint.h index 5da1d6d69c..b5ecb23906 100644 --- a/lib/poems/fixedpoint.h +++ b/lib/poems/fixedpoint.h @@ -19,12 +19,9 @@ #ifndef FIXEDPOINT_H #define FIXEDPOINT_H -#include - #include "point.h" #include "vect3.h" -namespace POEMS { class FixedPoint : public Point { public: FixedPoint(); @@ -36,5 +33,5 @@ public: bool ReadInPointData(std::istream& in); void WriteOutPointData(std::ostream& out); }; -} + #endif diff --git a/lib/poems/freebodyjoint.cpp b/lib/poems/freebodyjoint.cpp index 0022ebd9ff..d00f0bdb98 100644 --- a/lib/poems/freebodyjoint.cpp +++ b/lib/poems/freebodyjoint.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: freebodyjoint.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,29 +11,23 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #include "freebodyjoint.h" - -#include - +#include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" +#include "norm.h" #include "eulerparameters.h" -#include "colmatrix.h" -#include "mat3x3.h" -#include "mat6x6.h" -#include "vect3.h" -#include "virtualmatrix.h" - -using namespace POEMS; - +#include "matrices.h" +#include + FreeBodyJoint::FreeBodyJoint(){ - DimQandU(7,6); + DimQandU(7,6); } FreeBodyJoint::~FreeBodyJoint(){ @@ -51,112 +45,112 @@ void FreeBodyJoint::WriteOutJointData(std::ostream& out){ } void FreeBodyJoint::ComputeLocalTransform(){ - Mat3x3 ko_C_k; - EP_Transformation(q, ko_C_k); - FastMult(pk_C_ko,ko_C_k,pk_C_k); + Mat3x3 ko_C_k; + EP_Transformation(q, ko_C_k); + FastMult(pk_C_ko,ko_C_k,pk_C_k); } Matrix FreeBodyJoint::GetForward_sP(){ Mat6x6 sP; - //sP.Identity(); - - sP.Zeros(); + //sP.Identity(); + + sP.Zeros(); Mat3x3 temp0=T(pk_C_k); for(int i=1;i<4;i++){ sP(i,i)=1.0; for(int j=1;j<4;j++){ sP(3+i,3+j)=temp0(i,j); } - } - return sP; + } + return sP; } Matrix FreeBodyJoint::GetBackward_sP(){ Mat6x6 sP; - sP.Identity(); + sP.Identity(); sP =-1.0*sP; - std::cout<<"Did I come here in "<r); - - //COMMENT STEP3: CALCULATE QDOT + + FastAssign(r12,body2->r); + + //COMMENT STEP3: CALCULATE QDOT qdot_to_u(q, u, qdot); - - + + Vect3 WN; WN.BasicSet(0,u.BasicGet(0)); WN.BasicSet(1,u.BasicGet(1)); WN.BasicSet(2,u.BasicGet(2)); - - Vect3 VN; + + Vect3 VN; VN.BasicSet(0,u.BasicGet(3)); VN.BasicSet(1,u.BasicGet(4)); - VN.BasicSet(2,u.BasicGet(5)); - - FastAssign(WN,body2->omega_k); - + VN.BasicSet(2,u.BasicGet(5)); + + FastAssign(WN,body2->omega_k); + Vect3 pk_w_k; - FastMult(body2->n_C_k,WN,pk_w_k); + FastMult(body2->n_C_k,WN,pk_w_k); FastAssign(pk_w_k,body2->omega); - - - - //COMMENT STEP5: CALCULATE VELOCITES - FastAssign(VN,body2->v); - FastTMult(body2->n_C_k,body2->v,body2->v_k); - - - //CALCULATE KE - + + + + //COMMENT STEP5: CALCULATE VELOCITES + FastAssign(VN,body2->v); + FastTMult(body2->n_C_k,body2->v,body2->v_k); + + + //CALCULATE KE + Matrix tempke; - tempke = T(body2->v)*(body2->v); + tempke = T(body2->v)*(body2->v); double ke = 0.0; - ke = body2->mass*tempke(1,1); + ke = body2->mass*tempke(1,1); FastMult(body2->inertia,body2->omega_k,result1); - tempke= T(body2->omega_k)*result1; + tempke= T(body2->omega_k)*result1; ke = 0.5*ke + 0.5*tempke(1,1); body2->KE=ke; - - + + //COMMENT STEP6: CALCULATE STATE EXPLICIT ANGULAR ACCELERATIONS body2->alpha_t.Zeros(); - - + + //COMMENT STEP7: CALCULATE STATE EXPLICIT ACCELERATIONS - body2->a_t.Zeros(); - + body2->a_t.Zeros(); + } void FreeBodyJoint::BackwardKinematics(){ -std::cout<<"Did I come here "< - #include "joint.h" -#include "matrix.h" -namespace POEMS { + class FreeBodyJoint : public Joint{ -public: +public: FreeBodyJoint(); ~FreeBodyJoint(); - + JointType GetType(); bool ReadInJointData(std::istream& in); void WriteOutJointData(std::ostream& out); @@ -40,5 +37,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; -} + #endif diff --git a/lib/poems/inertialframe.cpp b/lib/poems/inertialframe.cpp index 19ca7cdb0b..6c97b2f584 100644 --- a/lib/poems/inertialframe.cpp +++ b/lib/poems/inertialframe.cpp @@ -16,13 +16,9 @@ *_________________________________________________________________________*/ #include "inertialframe.h" - -#include "mat3x3.h" -#include "virtualmatrix.h" +#include "fixedpoint.h" using namespace std; -using namespace POEMS; - InertialFrame::InertialFrame(){ gravity.Zeros(); diff --git a/lib/poems/inertialframe.h b/lib/poems/inertialframe.h index ae987cdc56..08d0279a1e 100644 --- a/lib/poems/inertialframe.h +++ b/lib/poems/inertialframe.h @@ -19,12 +19,9 @@ #ifndef INERTIALFRAME_H #define INERTIALFRAME_H -#include - #include "body.h" -#include "vect3.h" -namespace POEMS { + class InertialFrame : public Body { Vect3 gravity; public: @@ -36,5 +33,5 @@ public: bool ReadInBodyData(std::istream& in); void WriteOutBodyData(std::ostream& out); }; -} + #endif diff --git a/lib/poems/joint.cpp b/lib/poems/joint.cpp index 3e356337cb..3bdd7b5fcd 100644 --- a/lib/poems/joint.cpp +++ b/lib/poems/joint.cpp @@ -16,28 +16,15 @@ *_________________________________________________________________________*/ -#include -#include -#include - +#include "joints.h" #include "body.h" #include "point.h" +#include +#include "matrixfun.h" #include "fastmatrixops.h" -#include "body23joint.h" -#include "colmatrix.h" -#include "freebodyjoint.h" -#include "joint.h" -#include "mat3x3.h" -#include "matrix.h" -#include "mixedjoint.h" -#include "prismaticjoint.h" -#include "revolutejoint.h" -#include "sphericaljoint.h" -#include "virtualmatrix.h" +#include using namespace std; -using namespace POEMS; - Joint::Joint(){ body1 = body2 = 0; @@ -247,7 +234,7 @@ void Joint::ComputeBackwardGlobalTransform(){ // global joint functions // -Joint* POEMS::NewJoint(int type){ +Joint* NewJoint(int type){ switch( JointType(type) ) { case FREEBODYJOINT : return new FreeBodyJoint; diff --git a/lib/poems/joint.h b/lib/poems/joint.h index fa9b6826a7..17122af775 100644 --- a/lib/poems/joint.h +++ b/lib/poems/joint.h @@ -18,15 +18,9 @@ #ifndef JOINT_H #define JOINT_H -#include #include "poemsobject.h" -#include "colmatrix.h" -#include "mat3x3.h" -#include "matrix.h" -#include "vect3.h" - -namespace POEMS { -class VirtualMatrix; +#include +#include "matrices.h" enum JointType { XYZJOINT = 0, @@ -125,5 +119,5 @@ public: // global joint functions Joint* NewJoint(int type); -} + #endif diff --git a/lib/poems/mat3x3.cpp b/lib/poems/mat3x3.cpp index 8a5098ff59..df24d4b108 100644 --- a/lib/poems/mat3x3.cpp +++ b/lib/poems/mat3x3.cpp @@ -16,13 +16,10 @@ *_________________________________________________________________________*/ -#include -#include #include "mat3x3.h" +#include using namespace std; -using namespace POEMS; - Mat3x3::Mat3x3(){ numrows = numcols = 3; diff --git a/lib/poems/mat3x3.h b/lib/poems/mat3x3.h index bc38e6d393..4362b3ad9c 100644 --- a/lib/poems/mat3x3.h +++ b/lib/poems/mat3x3.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: mat3x3.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,19 +11,19 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef MAT3X3_H #define MAT3X3_H -#include #include "virtualmatrix.h" -namespace POEMS { + class Vect3; class Mat6x6; +class Matrix; class ColMatrix; class Mat3x3 : public VirtualMatrix { @@ -68,15 +68,16 @@ public: friend void FastMult(Mat3x3& A, Mat3x3& B, Mat3x3& C); friend void FastMultT(Mat3x3& A, Mat3x3& B, Mat3x3& C); friend void FastAssignT(Mat3x3& A, Mat3x3& C); - friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); - + friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); + friend void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC); friend void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI); friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); - + friend void EP_Transformation(ColMatrix& q, Mat3x3& C); friend void EP_FromTransformation(ColMatrix& q, Mat3x3& C); + }; -} + #endif diff --git a/lib/poems/mat4x4.cpp b/lib/poems/mat4x4.cpp index 9a0e7b8d56..4a611a6796 100644 --- a/lib/poems/mat4x4.cpp +++ b/lib/poems/mat4x4.cpp @@ -16,13 +16,9 @@ *_________________________________________________________________________*/ #include "mat4x4.h" - #include -#include using namespace std; -using namespace POEMS; - Mat4x4::Mat4x4(){ numrows = numcols = 4; diff --git a/lib/poems/mat4x4.h b/lib/poems/mat4x4.h index 3f6d97ba15..d7942b248e 100644 --- a/lib/poems/mat4x4.h +++ b/lib/poems/mat4x4.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: mat4x4.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,28 +11,27 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef MAT4X4_H #define MAT4X4_H -#include #include "virtualmatrix.h" +#include "matrix.h" + -namespace POEMS { class Vect4; -class Matrix; class Mat4x4 : public VirtualMatrix { double elements[4][4]; -public: +public: Mat4x4(); ~Mat4x4(); Mat4x4(const Mat4x4& A); // copy constructor Mat4x4(const VirtualMatrix& A); // copy constructor - + double& operator_2int (int i, int j); // array access double Get_2int(int i, int j) const; void Set_2int(int i, int j, double value); @@ -65,5 +64,5 @@ public: friend void FastMultT(Mat4x4& A, Mat4x4& B, Mat4x4& C); friend void FastAssignT(Mat4x4& A, Mat4x4& C); }; -} + #endif diff --git a/lib/poems/mat6x6.cpp b/lib/poems/mat6x6.cpp index e9dde2fe87..16bffc5026 100644 --- a/lib/poems/mat6x6.cpp +++ b/lib/poems/mat6x6.cpp @@ -16,13 +16,9 @@ *_________________________________________________________________________*/ #include "mat6x6.h" - #include -#include using namespace std; -using namespace POEMS; - Mat6x6::Mat6x6(){ numrows = numcols = 6; diff --git a/lib/poems/mat6x6.h b/lib/poems/mat6x6.h index a611bc8283..11951b0442 100644 --- a/lib/poems/mat6x6.h +++ b/lib/poems/mat6x6.h @@ -17,11 +17,9 @@ #ifndef MAT6X6_H #define MAT6X6_H -#include - #include "virtualmatrix.h" -namespace POEMS { + class Matrix; class Mat3x3; class Vect6; @@ -74,5 +72,5 @@ public: friend void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC); friend void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI); }; -} + #endif diff --git a/lib/poems/matrices.h b/lib/poems/matrices.h index 15f0d3ad23..7a7e2c4b58 100644 --- a/lib/poems/matrices.h +++ b/lib/poems/matrices.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: matrices.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -20,14 +20,23 @@ #define MATRICES_H #include "matrix.h" + #include "colmatrix.h" + #include "rowmatrix.h" + #include "mat3x3.h" + #include "vect3.h" + #include "mat4x4.h" + #include "vect4.h" + #include "mat6x6.h" + #include "vect6.h" + #include "colmatmap.h" #endif diff --git a/lib/poems/matrix.cpp b/lib/poems/matrix.cpp index f7b0c631f2..f05d6f815c 100644 --- a/lib/poems/matrix.cpp +++ b/lib/poems/matrix.cpp @@ -21,8 +21,6 @@ #include using namespace std; -using namespace POEMS; - Matrix::Matrix(){ numrows = numcols = 0; diff --git a/lib/poems/matrix.h b/lib/poems/matrix.h index c2ed92873c..63699b9835 100644 --- a/lib/poems/matrix.h +++ b/lib/poems/matrix.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: matrix.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,18 +11,15 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef MATRIX_H #define MATRIX_H -#include - #include "virtualmatrix.h" -namespace POEMS { class Mat3x3; class Mat4x4; class Mat6x6; @@ -74,6 +71,7 @@ public: friend void FastMult(Mat6x6& A, Matrix& B, Matrix& C); friend void FastMult(Matrix& A, ColMatrix& B, Vect6& C); friend void FastMultT(Matrix& A, Matrix& B, Mat6x6& C); + }; -} + #endif diff --git a/lib/poems/matrixfun.cpp b/lib/poems/matrixfun.cpp index 037e986a99..d193114679 100644 --- a/lib/poems/matrixfun.cpp +++ b/lib/poems/matrixfun.cpp @@ -16,25 +16,17 @@ *_________________________________________________________________________*/ #include "matrixfun.h" - -#include -#include - +#include #include "fastmatrixops.h" -#include "vect4.h" -#include "virtualcolmatrix.h" -#include "virtualmatrix.h" -#include "virtualrowmatrix.h" +#include using namespace std; -using namespace POEMS; - // // Create a new matrix // -VirtualMatrix* POEMS::NewMatrix(int type){ +VirtualMatrix* NewMatrix(int type){ switch( MatrixType(type) ) { case MATRIX : return new Matrix; @@ -52,7 +44,7 @@ VirtualMatrix* POEMS::NewMatrix(int type){ // Transpose // -Matrix POEMS::T(const VirtualMatrix& A){ +Matrix T(const VirtualMatrix& A){ int numrows = A.GetNumRows(); int numcols = A.GetNumCols(); Matrix C(numcols,numrows); @@ -62,8 +54,8 @@ Matrix POEMS::T(const VirtualMatrix& A){ return C; } -Mat3x3 POEMS::T(const Mat3x3& A){ - Mat3x3 C; +Mat3x3 T(const Mat3x3& A){ + Mat3x3 C; C.elements[0][0] = A.elements[0][0]; C.elements[1][1] = A.elements[1][1]; C.elements[2][2] = A.elements[2][2]; @@ -78,7 +70,7 @@ Mat3x3 POEMS::T(const Mat3x3& A){ return C; } -Mat6x6 POEMS::T(const Mat6x6& A){ +Mat6x6 T(const Mat6x6& A){ Mat6x6 C; int i,j; for(i=0;i<6;i++) @@ -88,7 +80,7 @@ Mat6x6 POEMS::T(const Mat6x6& A){ return C; } -Matrix POEMS::T(const Vect3& A){ +Matrix T(const Vect3& A){ Matrix C(1,3); C.BasicSet(0,0,A.elements[0]); C.BasicSet(0,1,A.elements[1]); @@ -97,7 +89,7 @@ Matrix POEMS::T(const Vect3& A){ return C; } -Matrix POEMS::T(const Vect6& A){ +Matrix T(const Vect6& A){ Matrix C(1,6); C.BasicSet(0,0,A.elements[0]); C.BasicSet(0,1,A.elements[1]); @@ -109,7 +101,7 @@ Matrix POEMS::T(const Vect6& A){ return C; } -RowMatrix POEMS::T(const VirtualColMatrix &A){ +RowMatrix T(const VirtualColMatrix &A){ int numele = A.GetNumRows(); RowMatrix C(numele); for(int i=0;i - +#include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" +#include "norm.h" #include "eulerparameters.h" -#include "colmatrix.h" -#include "mat3x3.h" -#include "mat6x6.h" -#include "vect3.h" -#include "virtualmatrix.h" - -using namespace POEMS; -using namespace std; +#include "matrices.h" + -MixedJoint::MixedJoint(){ +MixedJoint::MixedJoint(){ } MixedJoint::~MixedJoint(){ @@ -56,23 +49,23 @@ void MixedJoint::SetsP(Matrix& sPr, Vect6& temp_dofs, int i, int j){ numrots = i; numtrans = j; if (numrots < 2) - DimQandU(numrots+numtrans,numrots+numtrans); - else - DimQandU((4+numtrans),(numrots+numtrans)); + DimQandU(numrots+numtrans,numrots+numtrans); + else + DimQandU((4+numtrans),(numrots+numtrans)); cout<<"Check "<<4+numtrans<<" "< 1) EP_Normalize(q); // COMMENT STEP1: CALCULATE ORIENTATIONS - ComputeForwardTransforms(); - - + ComputeForwardTransforms(); + + //COMMENT STEP2: CALCULATE POSITION VECTORS - Vect3 result1, result2, result3, result4; + Vect3 result1, result2, result3, result4; result1.Zeros(); for (int k=0; k<3; k++){ if( dofs(3+k) != 0.0 ){ @@ -118,32 +111,32 @@ void MixedJoint::ForwardKinematics(){ result1.BasicSet(k,q.BasicGet(4 + k)); else result1.BasicSet(k,q.BasicGet(numrots + k)); - } + } } - - - - FastAssign(result1,r12); // r12 in parents basis i.e. Newtonian - FastNegMult(k_C_pk,r12,r21); // r21 in body basis - - FastAssign(r12,body2->r); // This is right - - //COMMENT STEP3: CALCULATE QDOT + + + + FastAssign(result1,r12); // r12 in parents basis i.e. Newtonian + FastNegMult(k_C_pk,r12,r21); // r21 in body basis + + FastAssign(r12,body2->r); // This is right + + //COMMENT STEP3: CALCULATE QDOT int pp = 0; if (numrots > 1){ ColMatrix temp_u(3+numtrans); qdot_to_u(q,temp_u,qdot); for (int k=1;k<=6;k++){ if(dofs(k) != 0.0){ - u.BasicSet(pp,temp_u.BasicGet(k-1)); + u.BasicSet(pp,temp_u.BasicGet(k-1)); pp = pp+1; - } + } } } else u = qdot; - - + + Vect3 WN; WN.Zeros(); int p = 0; for (int k=0;k<3;k++){ @@ -153,51 +146,51 @@ void MixedJoint::ForwardKinematics(){ } }// WN is in body basis - - Vect3 VN; VN.Zeros(); + + Vect3 VN; VN.Zeros(); for (int k=0;k<3;k++){ if( dofs(3+k+1) != 0.0 ) { VN.BasicSet(k,u.BasicGet(p)); p=p+1; } }// VN is the vector of translational velocities in Newtonian basis + + FastAssign(WN,body2->omega_k); - FastAssign(WN,body2->omega_k); - - // cout<<"Angular Velocity "<n_C_k,WN,pk_w_k); + FastMult(body2->n_C_k,WN,pk_w_k); FastAssign(pk_w_k,body2->omega); - - - - //COMMENT STEP5: CALCULATE VELOCITES - FastAssign(VN,body2->v); - FastTMult(body2->n_C_k,body2->v,body2->v_k); - - - //CALCULATE KE - + + + + //COMMENT STEP5: CALCULATE VELOCITES + FastAssign(VN,body2->v); + FastTMult(body2->n_C_k,body2->v,body2->v_k); + + + //CALCULATE KE + Matrix tempke; - tempke = T(body2->v)*(body2->v); + tempke = T(body2->v)*(body2->v); double ke = 0.0; - ke = body2->mass*tempke(1,1); + ke = body2->mass*tempke(1,1); FastMult(body2->inertia,body2->omega_k,result1); - tempke= T(body2->omega_k)*result1; + tempke= T(body2->omega_k)*result1; ke = 0.5*ke + 0.5*tempke(1,1); body2->KE=ke; - - + + //COMMENT STEP6: CALCULATE STATE EXPLICIT ANGULAR ACCELERATIONS body2->alpha_t.Zeros(); - - + + //COMMENT STEP7: CALCULATE STATE EXPLICIT ACCELERATIONS - body2->a_t.Zeros(); - + body2->a_t.Zeros(); + } void MixedJoint::BackwardKinematics(){ cout<<"Did I come here "< - #include "joint.h" -#include "matrix.h" -#include "vect6.h" -namespace POEMS { + class MixedJoint : public Joint{ Matrix const_sP; int numrots; int numtrans; Vect6 dofs; -public: +public: MixedJoint(); ~MixedJoint(); - + JointType GetType(); bool ReadInJointData(std::istream& in); void WriteOutJointData(std::ostream& out); @@ -46,5 +42,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; -} + #endif diff --git a/lib/poems/norm.cpp b/lib/poems/norm.cpp index 6c983dd06f..0f918cf968 100644 --- a/lib/poems/norm.cpp +++ b/lib/poems/norm.cpp @@ -16,15 +16,7 @@ *_________________________________________________________________________*/ #include - #include "norm.h" -#include "colmatrix.h" -#include "rowmatrix.h" -#include "vect3.h" -#include "vect4.h" -#include "vect6.h" - -using namespace POEMS; double Magnitude(ColMatrix& A){ double G; diff --git a/lib/poems/norm.h b/lib/poems/norm.h index 808be609e8..963a2ec5b2 100644 --- a/lib/poems/norm.h +++ b/lib/poems/norm.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: norm.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,24 +11,20 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef NORM_H #define NORM_H -namespace POEMS { -class ColMatrix; -class RowMatrix; -class Vect3; -class Vect4; -class Vect6; +#include "matrices.h" + double Magnitude(ColMatrix& A); double Magnitude(RowMatrix& A); double Magnitude(Vect3& A); double Magnitude(Vect4& A); double Magnitude(Vect6& A); -} + #endif diff --git a/lib/poems/onbody.cpp b/lib/poems/onbody.cpp index 7cea2d2f25..102900df8d 100644 --- a/lib/poems/onbody.cpp +++ b/lib/poems/onbody.cpp @@ -16,22 +16,17 @@ *_________________________________________________________________________*/ #include "onbody.h" - -#include -#include - #include "body.h" #include "inertialframe.h" #include "joint.h" #include "onfunctions.h" #include "virtualmatrix.h" #include "matrixfun.h" +#include +#include "norm.h" #include "eulerparameters.h" -#include "colmatrix.h" using namespace std; -using namespace POEMS; - OnBody::OnBody(){ diff --git a/lib/poems/onbody.h b/lib/poems/onbody.h index df82709ad5..d9923773c7 100644 --- a/lib/poems/onbody.h +++ b/lib/poems/onbody.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: onbody.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -22,14 +22,6 @@ #include "matrix.h" #include "vect6.h" #include "mat6x6.h" -#include "joint.h" -#include "mat3x3.h" -#include "vect3.h" - -namespace POEMS { -class Body; -class ColMatrix; -class InertialFrame; // emumerated type enum Direction { @@ -37,65 +29,71 @@ enum Direction { FORWARD= 1 }; -class OnBody { - Body* system_body; - Joint* system_joint; - OnBody* parent; - List children; - - Direction joint_dir; - void (Joint::*kinfun)(); // kinematics function - void (Joint::*updatesP)(Matrix&); // sP update function - Vect3* gamma; // pointer to gamma vector - Mat3x3* pk_C_k; // pointer to transformation +class Body; +class InertialFrame; +class Joint; +class OnSolver; +class OnBody { + Body* system_body; + Joint* system_joint; + OnBody* parent; + List children; - Mat6x6 sI; // spatial inertias - Mat6x6 sIhat; // recursive spatial inertias - Mat6x6 sSC; // spatial shift - Mat6x6 sT; // spatial triangularization + Direction joint_dir; + void (Joint::*kinfun)(); // kinematics function + void (Joint::*updatesP)(Matrix&); // sP update function + Vect3* gamma; // pointer to gamma vector + Mat3x3* pk_C_k; // pointer to transformation - Vect6 sF; // spatial forces - Vect6 sFhat; // recursive spatial forces - Vect6 sAhat; // recursive spatial acceleration + + Mat6x6 sI; // spatial inertias + Mat6x6 sIhat; // recursive spatial inertias + Mat6x6 sSC; // spatial shift + Mat6x6 sT; // spatial triangularization - Matrix sP; // spatial partial velocities - Matrix sM; // triangularized mass matrix diagonal elements - Matrix sMinv; // inverse of sM - Matrix sPsMinv; - Matrix sIhatsP; + Vect6 sF; // spatial forces + Vect6 sFhat; // recursive spatial forces + Vect6 sAhat; // recursive spatial acceleration - // states and state derivatives - ColMatrix* q; - ColMatrix* u; - ColMatrix* qdot; - ColMatrix* udot; - ColMatrix* qdotdot; + Matrix sP; // spatial partial velocities + Matrix sM; // triangularized mass matrix diagonal elements + Matrix sMinv; // inverse of sM + Matrix sPsMinv; + Matrix sIhatsP; - ColMatrix* r; - ColMatrix* acc; - ColMatrix* ang; + // states and state derivatives + ColMatrix* q; + ColMatrix* u; + ColMatrix* qdot; + ColMatrix* udot; + ColMatrix* qdotdot; + + ColMatrix* r; + ColMatrix* acc; + ColMatrix* ang; // friend classes friend class OnSolver; + -public: - OnBody(); - ~OnBody(); - int RecursiveSetup(InertialFrame* basebody); - int RecursiveSetup(int ID, OnBody* parentbody, Joint* sys_joint); - void RecursiveKinematics(); - void RecursiveTriangularization(); - void RecursiveForwardSubstitution(); - Mat3x3 GetN_C_K(); - Vect3 LocalCart(); - int GetBodyID(); - void CalculateAcceleration(); - void Setup(); - void SetupInertialFrame(); - void LocalKinematics(); - void LocalTriangularization(Vect3& Torque, Vect3& Force); - void LocalForwardSubstitution(); +public: + OnBody(); + ~OnBody(); + int RecursiveSetup(InertialFrame* basebody); + int RecursiveSetup(int ID, OnBody* parentbody, Joint* sys_joint); + void RecursiveKinematics(); + void RecursiveTriangularization(); + void RecursiveForwardSubstitution(); + Mat3x3 GetN_C_K(); + Vect3 LocalCart(); + int GetBodyID(); + void CalculateAcceleration(); + void Setup(); + void SetupInertialFrame(); + void LocalKinematics(); + void LocalTriangularization(Vect3& Torque, Vect3& Force); + void LocalForwardSubstitution(); }; -} + #endif diff --git a/lib/poems/onfunctions.cpp b/lib/poems/onfunctions.cpp index cfc0c60936..582ab8cf8b 100644 --- a/lib/poems/onfunctions.cpp +++ b/lib/poems/onfunctions.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: onfunction.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,25 +11,18 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #include "onfunctions.h" - -#include "mat3x3.h" -#include "mat6x6.h" -#include "vect3.h" -#include "vect6.h" -#include "virtualmatrix.h" - +#include "matrixfun.h" +#include using namespace std; -using namespace POEMS; - // friend of Vect3 & Vect6 -void POEMS::OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV){ +void OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV){ sV.elements[0] = angular.elements[0]; sV.elements[1] = angular.elements[1]; sV.elements[2] = angular.elements[2]; @@ -39,38 +32,38 @@ void POEMS::OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV){ } // friend of Vect3, Mat3x3, & Mat6x6 -void POEMS::OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC){ +void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC){ // the block diagonals - + // the gamma cross with transform Mat3x3 temp; Mat3x3 temp2; SC.Zeros(); - temp.Zeros(); + temp.Zeros(); temp2.Zeros(); - //FastTMult(C,gamma,temp); + //FastTMult(C,gamma,temp); temp(1,2)= -gamma(3); temp(1,3)= gamma(2); temp(2,1)= gamma(3); - temp(2,3)= -gamma(1); temp(3,1)= -gamma(2); temp(3,2)= gamma(1); + temp(2,3)= -gamma(1); temp(3,1)= -gamma(2); temp(3,2)= gamma(1); FastMult(temp,C,temp2); - + SC(1,4)=temp2(1,1); SC(2,4)=temp2(2,1); SC(3,4)=temp2(3,1); SC(1,5)=temp2(1,2); SC(2,5)=temp2(2,2); SC(3,5)=temp2(3,2); SC(1,6)=temp2(1,3); SC(2,6)=temp2(2,3); SC(3,6)=temp2(3,3); - + SC(1,1)=C(1,1); SC(2,1)=C(2,1); SC(3,1)=C(3,1); SC(1,2)=C(1,2); SC(2,2)=C(2,2); SC(3,2)=C(3,2); SC(1,3)=C(1,3); SC(2,3)=C(2,3); SC(3,3)=C(3,3); SC(4,4)=C(1,1); SC(5,4)=C(2,1); SC(6,4)=C(3,1); SC(4,5)=C(1,2); SC(5,5)=C(2,2); SC(6,5)=C(3,2); - SC(4,6)=C(1,3); SC(5,6)=C(2,3); SC(6,6)=C(3,3); - + SC(4,6)=C(1,3); SC(5,6)=C(2,3); SC(6,6)=C(3,3); + } // friend of Mat3x3 & Mat6x6 -void POEMS::OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI){ - - sI(4,4)=mass; sI(5,5)=mass; sI(6,6)=mass; - sI(1,1)=inertia(1,1); sI(1,2)=inertia(1,2); sI(1,3)=inertia(1,3); - sI(2,1)=inertia(2,1); sI(2,2)=inertia(2,2); sI(2,3)=inertia(2,3); - sI(3,1)=inertia(3,1); sI(3,2)=inertia(3,2); sI(3,3)=inertia(3,3); +void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI){ + + sI(4,4)=mass; sI(5,5)=mass; sI(6,6)=mass; + sI(1,1)=inertia(1,1); sI(1,2)=inertia(1,2); sI(1,3)=inertia(1,3); + sI(2,1)=inertia(2,1); sI(2,2)=inertia(2,2); sI(2,3)=inertia(2,3); + sI(3,1)=inertia(3,1); sI(3,2)=inertia(3,2); sI(3,3)=inertia(3,3); } diff --git a/lib/poems/onfunctions.h b/lib/poems/onfunctions.h index bb07425b85..8a69694095 100644 --- a/lib/poems/onfunctions.h +++ b/lib/poems/onfunctions.h @@ -18,11 +18,7 @@ #ifndef ONFUNCTIONS_H #define ONFUNCTIONS_H -namespace POEMS { -class Mat3x3; -class Mat6x6; -class Vect3; -class Vect6; +#include "matrices.h" void OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV); void OnPopulateSC(Vect3& gamma, Mat3x3& C, Mat6x6& SC); @@ -31,5 +27,5 @@ void OnPopulateSI(Mat3x3& inertia, double mass, Mat6x6& sI); void Create_Map(int MM); int ICELL(int IX,int IY,int IZ, int MM); -} + #endif diff --git a/lib/poems/onsolver.cpp b/lib/poems/onsolver.cpp index 609ef32613..ad04d7e9e3 100644 --- a/lib/poems/onsolver.cpp +++ b/lib/poems/onsolver.cpp @@ -16,25 +16,15 @@ *_________________________________________________________________________*/ -#include -#include - #include "onsolver.h" #include "system.h" #include "onbody.h" #include "body.h" -#include "colmatmap.h" -#include "colmatrix.h" -#include "defines.h" -#include "inertialframe.h" -#include "matrix.h" -#include "poemslist.h" -#include "vect3.h" -#include "virtualmatrix.h" +#include "matrixfun.h" +#include -using namespace std; -using namespace POEMS; +using namespace std; OnSolver::OnSolver(){ numbodies = 0; diff --git a/lib/poems/onsolver.h b/lib/poems/onsolver.h index 1e850b8fc1..f32b5880a9 100644 --- a/lib/poems/onsolver.h +++ b/lib/poems/onsolver.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: onsolver.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,32 +21,31 @@ #include "solver.h" #include "onbody.h" +#include -namespace POEMS { -class ColMatrix; -class Matrix; + class OnSolver : public Solver { - OnBody inertialframe; - int numbodies; - OnBody** bodyarray; - ColMatrix** q; - ColMatrix** qdot; - ColMatrix** qdotdot; - ColMatrix** u; - ColMatrix** udot; - - - - void DeleteModel(); - int CreateTopologyArray(int i, OnBody* body); - void CreateStateMatrixMaps(); - void GetType(); -public: - OnSolver(); - ~OnSolver(); - void CreateModel(); - void Solve(double time, Matrix& FF); + OnBody inertialframe; + int numbodies; + OnBody** bodyarray; + ColMatrix** q; + ColMatrix** qdot; + ColMatrix** qdotdot; + ColMatrix** u; + ColMatrix** udot; + + + + void DeleteModel(); + int CreateTopologyArray(int i, OnBody* body); + void CreateStateMatrixMaps(); + void GetType(); +public: + OnSolver(); + ~OnSolver(); + void CreateModel(); + void Solve(double time, Matrix& FF); }; -} + #endif diff --git a/lib/poems/particle.cpp b/lib/poems/particle.cpp index 37ec790666..3496bc1906 100644 --- a/lib/poems/particle.cpp +++ b/lib/poems/particle.cpp @@ -17,8 +17,7 @@ #include "particle.h" - -using namespace POEMS; +#include "fixedpoint.h" Particle::Particle(){ } diff --git a/lib/poems/particle.h b/lib/poems/particle.h index 8a7a521451..20aa4831ea 100644 --- a/lib/poems/particle.h +++ b/lib/poems/particle.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: particle.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -19,18 +19,16 @@ #ifndef PARTICLE_H #define PARTICLE_H -#include - #include "body.h" -namespace POEMS { + class Particle : public Body { -public: +public: Particle(); ~Particle(); BodyType GetType(); bool ReadInBodyData(std::istream& in); void WriteOutBodyData(std::ostream& out); }; -} + #endif diff --git a/lib/poems/poemslist.h b/lib/poems/poemslist.h index bd0c1456b4..9882af013a 100644 --- a/lib/poems/poemslist.h +++ b/lib/poems/poemslist.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: poemslist.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,7 +21,8 @@ #include #include -namespace POEMS { +using namespace std; + template class ListElement{ public: ListElement* prev; @@ -50,7 +51,7 @@ public: S* operator()(int id); void Append(List * listToAppend); void DeleteValues(); - void RemoveElementAndDeleteValue(ListElement* ele); + void RemoveElementAndDeleteValue(ListElement* ele); void PrintList(); }; @@ -89,9 +90,9 @@ template List::~List(){ template void List::Append(List * listToAppend) { - tail->next = listToAppend->head; - listToAppend->head->prev = tail; - tail = listToAppend->tail; + tail->next = listToAppend->head; + listToAppend->head->prev = tail; + tail = listToAppend->tail; } template int List::GetNumElements(){ @@ -103,17 +104,17 @@ template ListElement* List::GetHeadElement(){ } template ListElement* List::GetTailElement(){ - return tail; + return tail; } template void List::Remove(ListElement* ele){ if(!ele){ - std::cerr << "ERROR: ListElement to be removed not defined" << std::endl; + cerr << "ERROR: ListElement to be removed not defined" << endl; exit(0); } if(!numelements){ - std::cerr << "ERROR: List is empty" << std::endl; + cerr << "ERROR: List is empty" << endl; exit(0); } @@ -134,7 +135,7 @@ template void List::Remove(ListElement* ele){ template ListElement* List::Append(S* v){ if(!v){ - std::cerr << "ERROR: cannot add null Body to list" << std::endl; + cerr << "ERROR: cannot add null Body to list" << endl; exit(0); } @@ -144,22 +145,22 @@ template ListElement* List::Append(S* v){ if(numelements==1) head = tail = ele; else{ - /* + /* tail->next = ele; ele->prev = tail; - tail = ele;*/ - - ele->prev = tail; - tail = ele; - ele->prev->next = ele; - - } + tail = ele;*/ + + ele->prev = tail; + tail = ele; + ele->prev->next = ele; + + } return ele; } template ListElement* List::Prepend(S* v){ if(!v){ - std::cerr << "ERROR: cannot add null Body to list" << std::endl; + cerr << "ERROR: cannot add null Body to list" << endl; exit(0); } @@ -169,9 +170,9 @@ template ListElement* List::Prepend(S* v){ if(numelements==1) head = tail = ele; else{ - ele->next = head; - head = ele; - ele->next->prev = ele; + ele->next = head; + head = ele; + ele->next->prev = ele; } return ele; } @@ -189,15 +190,15 @@ template S** List::CreateArray(){ template S* List::operator()(int id){ if(id >= numelements){ - std::cerr << "ERROR: subscript out of bounds" << std::endl; + cerr << "ERROR: subscript out of bounds" << endl; exit(0); } - + ListElement* ele = head; for(int i=0;inext; } - + return ele->value; } @@ -213,15 +214,16 @@ template void List::RemoveElementAndDeleteValue(ListElement* ele) } template void List::PrintList(){ - std::cout << "Printing List " << std::endl; - ListElement* ele = head; - std::cout << *(ele->value) << " "; - ele = ele->next; - for(int k =2; kvalue) << " "; - ele = ele->next; - } - std::cout << *(ele->value) << std::endl; -} + cout<<"Printing List "<* ele = head; + cout<<*(ele->value)<<" "; + ele = ele->next; + for(int k =2; kvalue)<<" "; + ele = ele->next; + } + cout<<*(ele->value)< -namespace POEMS { +using namespace std; + + TreeNode *GetTreeNode(int item,TreeNode *lptr = NULL,TreeNode *rptr =NULL); void FreeTreeNode(TreeNode *p); @@ -79,7 +81,7 @@ TreeNode *GetTreeNode(int item,TreeNode *lptr,TreeNode *rptr) // if insufficient memory, terminatewith an error message if (p == NULL) { - std::cerr << "Memory allocation failure!\n"; + cerr << "Memory allocation failure!\n"; exit(1); } @@ -138,7 +140,7 @@ void IndentBlanks(int num) // const int indentblock = 6; for(int i = 0; i < num; i++) - std::cout << " "; + cout << " "; } void PrintTree (TreeNode *t, int level) @@ -151,11 +153,10 @@ void PrintTree (TreeNode *t, int level) PrintTree(t->Right(),level + 1); // indent to current level; output node data IndentBlanks(indentUnit*level); - std::cout << t->GetData() << std::endl; + cout << t->GetData() << endl; // print left branch of tree t PrintTree(t->Left(),level + 1); } } -} #endif diff --git a/lib/poems/poemsobject.cpp b/lib/poems/poemsobject.cpp index dfdd95953e..7c3f1ca872 100644 --- a/lib/poems/poemsobject.cpp +++ b/lib/poems/poemsobject.cpp @@ -19,8 +19,6 @@ #include "poemsobject.h" #include -using namespace POEMS; - POEMSObject::POEMSObject(){ name = 0; ChangeName((const char*)"unnamed"); diff --git a/lib/poems/poemsobject.h b/lib/poems/poemsobject.h index 173d9da7ab..63b2915638 100644 --- a/lib/poems/poemsobject.h +++ b/lib/poems/poemsobject.h @@ -19,7 +19,7 @@ #ifndef POEMSOBJECT_H #define POEMSOBJECT_H -namespace POEMS { + class POEMSObject { char* name; int ID; @@ -31,5 +31,5 @@ public: int GetID(); void SetID(int id); }; -} + #endif diff --git a/lib/poems/poemstree.h b/lib/poems/poemstree.h index d49a0d0a88..8f8e80ab66 100644 --- a/lib/poems/poemstree.h +++ b/lib/poems/poemstree.h @@ -21,7 +21,7 @@ #include "poemstreenode.h" #include "poemsnodelib.h" -namespace POEMS { + // constants to indicate the balance factor of a node const int leftheavy = -1; const int balanced = 0; @@ -609,5 +609,5 @@ void Tree::ClearList(void) delete current; size = 0; } -} + #endif diff --git a/lib/poems/poemstreenode.cpp b/lib/poems/poemstreenode.cpp index ca4307f69f..051e13d6e0 100644 --- a/lib/poems/poemstreenode.cpp +++ b/lib/poems/poemstreenode.cpp @@ -17,8 +17,6 @@ #include "poemstreenode.h" -using namespace POEMS; - // constructor; initialize the data and pointer fields // The pointer value NULL assigns a empty subtree TreeNode::TreeNode (const int & item, TreeNode *lptr,TreeNode *rptr, diff --git a/lib/poems/poemstreenode.h b/lib/poems/poemstreenode.h index 69f3caf958..b8f46031a5 100644 --- a/lib/poems/poemstreenode.h +++ b/lib/poems/poemstreenode.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: poemstreenode.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,37 +11,42 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef TREENODE_H #define TREENODE_H -namespace POEMS { +//#define NULL 0 + + +//Tree depends on TreeNode +class Tree; + // declares a tree node object for a binary tree class TreeNode{ private: // points to the left and right children of the node - TreeNode *left; - TreeNode *right; - - int balanceFactor; - int data; - void * aux_data; -public: - // make Tree a friend because it needs access to left and right pointer fields of a node - friend class Tree; - TreeNode * Left(); - TreeNode * Right(); - int GetData(); - void * GetAuxData() {return aux_data;}; - void SetAuxData(void * AuxData) {aux_data = AuxData;}; - int GetBalanceFactor(); - TreeNode(const int &item, TreeNode *lptr, TreeNode *rptr, int balfac = 0); - //friend class DCASolver; + TreeNode *left; + TreeNode *right; + + int balanceFactor; + int data; + void * aux_data; +public: + // make Tree a friend because it needs access to left and right pointer fields of a node + friend class Tree; + TreeNode * Left(); + TreeNode * Right(); + int GetData(); + void * GetAuxData() {return aux_data;}; + void SetAuxData(void * AuxData) {aux_data = AuxData;}; + int GetBalanceFactor(); + TreeNode(const int &item, TreeNode *lptr, TreeNode *rptr, int balfac = 0); + //friend class DCASolver; }; -} + #endif diff --git a/lib/poems/point.cpp b/lib/poems/point.cpp index f648b58d3d..4383844736 100644 --- a/lib/poems/point.cpp +++ b/lib/poems/point.cpp @@ -16,11 +16,7 @@ *_________________________________________________________________________*/ -#include "fixedpoint.h" -#include "point.h" -#include "vect3.h" - -using namespace POEMS; +#include "points.h" Point::Point(){ position.Zeros(); @@ -37,7 +33,7 @@ void Point::WriteOut(std::ostream& out){ WriteOutPointData(out); } -Point* POEMS::NewPoint(int type){ +Point* NewPoint(int type){ switch( PointType(type) ) { case FIXEDPOINT : // A Fixed Point diff --git a/lib/poems/point.h b/lib/poems/point.h index c08e92db0d..746a527cd7 100644 --- a/lib/poems/point.h +++ b/lib/poems/point.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: point.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -22,21 +22,21 @@ #include "poemsobject.h" #include "vect3.h" -namespace POEMS { + // emumerated type enum PointType { FIXEDPOINT = 0 }; class Point : public POEMSObject { -public: +public: Vect3 position; - Point(); - bool ReadIn(std::istream& in); + Point(); + bool ReadIn(std::istream& in); void WriteOut(std::ostream& out); - - virtual ~Point(); + + virtual ~Point(); virtual PointType GetType() = 0; virtual Vect3 GetPoint() = 0; virtual bool ReadInPointData(std::istream& in) = 0; @@ -45,5 +45,5 @@ public: // global point functions Point* NewPoint(int type); -} + #endif diff --git a/lib/poems/prismaticjoint.cpp b/lib/poems/prismaticjoint.cpp index 3e649f0d22..7c01667a86 100644 --- a/lib/poems/prismaticjoint.cpp +++ b/lib/poems/prismaticjoint.cpp @@ -16,16 +16,10 @@ *_________________________________________________________________________*/ #include "prismaticjoint.h" - #include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" -#include "colmatrix.h" -#include "mat3x3.h" -#include "virtualmatrix.h" - -using namespace POEMS; PrismaticJoint::PrismaticJoint(){ q.Dim(1); diff --git a/lib/poems/prismaticjoint.h b/lib/poems/prismaticjoint.h index df3ab3195c..17cf050a78 100644 --- a/lib/poems/prismaticjoint.h +++ b/lib/poems/prismaticjoint.h @@ -18,13 +18,12 @@ #ifndef PRISMATICJOINT_H #define PRISMATICJOINT_H -#include - #include "joint.h" #include "vect3.h" -#include "matrix.h" +#include "mat3x3.h" + + -namespace POEMS { class PrismaticJoint : public Joint { Vect3 axis_pk; // unit vector in body1 basis Vect3 axis_k; // unit vector in body2 basis @@ -44,5 +43,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; -} + #endif diff --git a/lib/poems/revolutejoint.cpp b/lib/poems/revolutejoint.cpp index 6b11acbf0f..ec5b1bec02 100644 --- a/lib/poems/revolutejoint.cpp +++ b/lib/poems/revolutejoint.cpp @@ -16,16 +16,10 @@ *_________________________________________________________________________*/ #include "revolutejoint.h" - #include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" -#include "colmatrix.h" -#include "mat3x3.h" -#include "virtualmatrix.h" - -using namespace POEMS; RevoluteJoint::RevoluteJoint(){ DimQandU(1); diff --git a/lib/poems/revolutejoint.h b/lib/poems/revolutejoint.h index 10a38114df..478d48dbb9 100644 --- a/lib/poems/revolutejoint.h +++ b/lib/poems/revolutejoint.h @@ -18,13 +18,11 @@ #ifndef REVOLUTEJOINT_H #define REVOLUTEJOINT_H -#include #include "joint.h" #include "vect3.h" -#include "matrix.h" +#include "mat3x3.h" + -namespace POEMS { -class VirtualMatrix; class RevoluteJoint : public Joint { Vect3 axis_pk; // unit vector in body1 basis @@ -45,5 +43,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; -} + #endif diff --git a/lib/poems/rigidbody.cpp b/lib/poems/rigidbody.cpp index a7d4f9f19f..3ac424f9e9 100644 --- a/lib/poems/rigidbody.cpp +++ b/lib/poems/rigidbody.cpp @@ -16,12 +16,9 @@ *_________________________________________________________________________*/ #include "rigidbody.h" -#include "mat3x3.h" -#include "virtualmatrix.h" +#include "fixedpoint.h" using namespace std; -using namespace POEMS; - RigidBody::RigidBody(){ } diff --git a/lib/poems/rigidbody.h b/lib/poems/rigidbody.h index d4be92ebcf..0bb2a3ece2 100644 --- a/lib/poems/rigidbody.h +++ b/lib/poems/rigidbody.h @@ -18,11 +18,8 @@ #ifndef RIGIDBODY_H #define RIGIDBODY_H -#include - #include "body.h" -namespace POEMS { class RigidBody : public Body { public: RigidBody(); @@ -31,5 +28,5 @@ public: bool ReadInBodyData(std::istream& in); void WriteOutBodyData(std::ostream& out); }; -} + #endif diff --git a/lib/poems/rowmatrix.cpp b/lib/poems/rowmatrix.cpp index eac8fbef5d..feb185070e 100644 --- a/lib/poems/rowmatrix.cpp +++ b/lib/poems/rowmatrix.cpp @@ -16,13 +16,11 @@ *_________________________________________________________________________*/ #include "rowmatrix.h" - +#include "colmatrix.h" #include #include using namespace std; -using namespace POEMS; - RowMatrix::RowMatrix(){ numcols = 0; diff --git a/lib/poems/rowmatrix.h b/lib/poems/rowmatrix.h index 8e8d7b5f99..b04113e8ed 100644 --- a/lib/poems/rowmatrix.h +++ b/lib/poems/rowmatrix.h @@ -19,12 +19,8 @@ #ifndef ROWMATRIX_H #define ROWMATRIX_H -#include - #include "virtualrowmatrix.h" -#include "virtualmatrix.h" -namespace POEMS { class RowMatrix : public VirtualRowMatrix { double* elements; public: @@ -53,5 +49,5 @@ public: RowMatrix& operator=(const VirtualMatrix& A); // overloaded = RowMatrix& operator*=(double b); }; -} + #endif diff --git a/lib/poems/solver.cpp b/lib/poems/solver.cpp index 04afb27945..67f5b607e3 100644 --- a/lib/poems/solver.cpp +++ b/lib/poems/solver.cpp @@ -15,12 +15,9 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ -#include #include "solver.h" #include "system.h" -#include "onsolver.h" - -using namespace POEMS; +#include "matrices.h" Solver::Solver(){ diff --git a/lib/poems/solver.h b/lib/poems/solver.h index 489e6d41f1..45564dd1ef 100644 --- a/lib/poems/solver.h +++ b/lib/poems/solver.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: solver.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,29 +11,28 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef SOLVER_H #define SOLVER_H - +#include #include "colmatmap.h" +#include "matrices.h" #include "defines.h" -namespace POEMS { class System; -class Matrix; class Solver{ protected: System* system; - + double time; ColMatMap state; ColMatMap statedot; - ColMatMap statedoubledot; + ColMatMap statedoubledot; SolverType type; @@ -48,13 +47,13 @@ public: virtual void DeleteModel() = 0; virtual void CreateModel() = 0; - virtual void Solve(double time, Matrix& FF) = 0; - - - + virtual void Solve(double time, Matrix& FF) = 0; + + + ColMatMap* GetState(); ColMatMap* GetStateDerivative(); ColMatMap* GetStateDerivativeDerivative(); }; -} + #endif diff --git a/lib/poems/sphericaljoint.cpp b/lib/poems/sphericaljoint.cpp index 996bb5a887..fb5330db17 100644 --- a/lib/poems/sphericaljoint.cpp +++ b/lib/poems/sphericaljoint.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: sphericaljoint.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,27 +11,21 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #include "sphericaljoint.h" - -#include - #include "point.h" #include "matrixfun.h" #include "body.h" #include "fastmatrixops.h" +#include "norm.h" #include "eulerparameters.h" -#include "colmatrix.h" -#include "mat3x3.h" -#include "vect3.h" -#include "virtualmatrix.h" +#include "matrices.h" +#include -using namespace std; -using namespace POEMS; SphericalJoint::SphericalJoint(){ DimQandU(4,3); @@ -50,24 +44,24 @@ bool SphericalJoint::ReadInJointData(std::istream& in){ void SphericalJoint::WriteOutJointData(std::ostream& out){ } -Matrix SphericalJoint::GetForward_sP(){ +Matrix SphericalJoint::GetForward_sP(){ Mat3x3 sPa,sPl; Matrix sP(6,3); - sPa.Identity(); + sPa.Identity(); sPl.Zeros(); - Vect3 temp = -(point2->position); - + Vect3 temp = -(point2->position); + sPl(1,2) = temp(3); sPl(1,3) = -temp(2); - + sPl(2,1) = -temp(3); sPl(2,3) = temp(1); - - sPl(3,1) = temp(2); + + sPl(3,1) = temp(2); sPl(3,2) = -temp(1); - - sP=Stack(sPa,sPl); - return sP; + + sP=Stack(sPa,sPl); + return sP; } void SphericalJoint::UpdateForward_sP( Matrix& sP){ @@ -81,15 +75,15 @@ Matrix SphericalJoint::GetBackward_sP(){ cout<<" -----------"<position(1)); - sPl(2,3)=-(point2->position(1)); + sPa.Identity(); + sPl.Zeros(); + sPl(3,2)=(point2->position(1)); + sPl(2,3)=-(point2->position(1)); sP=Stack(sPa,sPl); - return sP; + return sP; } -void SphericalJoint::UpdateBackward_sP( Matrix& sP){ +void SphericalJoint::UpdateBackward_sP( Matrix& sP){ // sP is constant, do nothing. } @@ -98,106 +92,106 @@ void SphericalJoint::ComputeLocalTransform(){ // Obtain the transformation matrix from euler parameters EP_Transformation(q, ko_C_k); FastMult(pk_C_ko,ko_C_k,pk_C_k); - } + } void SphericalJoint::ForwardKinematics(){ Vect3 result1,result2,result3,result4,result5; Vect3 pk_w_k; - + //cout<<"Check in spherical "<position,result1); // parents basis - FastAdd(result1,point1->position,r12); - - // compute position vector r21 - FastNegMult(k_C_pk,r12,r21); - - - + // COMPUTE POSITION VECTOR R12 aka GAMMA + + FastNegMult(pk_C_k,point2->position,result1); // parents basis + FastAdd(result1,point1->position,r12); + + // compute position vector r21 + FastNegMult(k_C_pk,r12,r21); + + + //----------------------------------// - // COMPUTE GLOBAL LOCATION - FastMult(body1->n_C_k,(body1->GetPoint(2))->position,result1); - FastAdd(result1,body1->r,result1); - FastNegMult(body2->n_C_k,(body2->GetPoint(1))->position,result2); - FastAdd(result1,result2,body2->r); - - qdot_to_u(q, u, qdot); - - - //----------------------------------- - // angular velocities - + // COMPUTE GLOBAL LOCATION + FastMult(body1->n_C_k,(body1->GetPoint(2))->position,result1); + FastAdd(result1,body1->r,result1); + FastNegMult(body2->n_C_k,(body2->GetPoint(1))->position,result2); + FastAdd(result1,result2,body2->r); + + qdot_to_u(q, u, qdot); + + + //----------------------------------- + // angular velocities + FastAssign(u,pk_w_k); - FastTMult(pk_C_k,body1->omega_k,result1); + FastTMult(pk_C_k,body1->omega_k,result1); FastAdd(result1,pk_w_k,body2->omega_k); - FastMult(body2->n_C_k,body2->omega_k,body2->omega); - - - - //----------------------------------- - - // compute velocities - FastCross(body1->omega_k,(body1->GetPoint(2))->position,result1); + FastMult(body2->n_C_k,body2->omega_k,body2->omega); + + + + //----------------------------------- + + // compute velocities + FastCross(body1->omega_k,(body1->GetPoint(2))->position,result1); FastAdd(body1->v_k,result1,result2); - FastTMult(pk_C_k,result2,result1); // In body basis - - FastCross((body2->GetPoint(1))->position,body2->omega_k,result2); - FastAdd(result1,result2,body2->v_k); // In body basis - FastMult(body2->n_C_k,body2->v_k,body2->v); - - + FastTMult(pk_C_k,result2,result1); // In body basis + + FastCross((body2->GetPoint(1))->position,body2->omega_k,result2); + FastAdd(result1,result2,body2->v_k); // In body basis + FastMult(body2->n_C_k,body2->v_k,body2->v); + + //------------------------------------------ - //Compute the KE + //Compute the KE Matrix tempke; - tempke = T(body2->v)*(body2->v); + tempke = T(body2->v)*(body2->v); double ke = 0.0; - ke = body2->mass*tempke(1,1); + ke = body2->mass*tempke(1,1); FastMult(body2->inertia,body2->omega_k,result1); - tempke= T(body2->omega_k)*result1; + tempke= T(body2->omega_k)*result1; ke = 0.5*ke + 0.5*tempke(1,1); body2->KE=ke; - //----------------------------------- - // compute state explicit angular acceleration // Has to be in body basis - FastTMult(pk_C_k,body1->alpha_t,result2); + //----------------------------------- + // compute state explicit angular acceleration // Has to be in body basis + FastTMult(pk_C_k,body1->alpha_t,result2); FastCross(body2->omega_k,pk_w_k,result1); - FastAdd(result1,result2,body2->alpha_t); - - //----------------------------------- - // compute state explicit acceleration - // NEED TO DO THIS COMPLETELY IN BODY BASIS - + FastAdd(result1,result2,body2->alpha_t); + + //----------------------------------- + // compute state explicit acceleration + // NEED TO DO THIS COMPLETELY IN BODY BASIS + FastCross(body1->omega_k,(body1->GetPoint(2))->position,result1); - FastCross(body1->omega_k,result1,result2); - FastTMult(pk_C_k,result2,result1); - - //FastCross(body2->omega_k,-(body2->GetPoint(1))->position,result3); - FastCross((body2->GetPoint(1))->position,body2->omega_k,result3); - FastCross(body2->omega_k,result3,result2); - FastAdd(result1,result2,result3); //wxwxr in body basis - - FastCross(body1->alpha_t,(body1->GetPoint(2))->position,result4); - FastTMult(pk_C_k,result4,result5); + FastCross(body1->omega_k,result1,result2); + FastTMult(pk_C_k,result2,result1); + + //FastCross(body2->omega_k,-(body2->GetPoint(1))->position,result3); + FastCross((body2->GetPoint(1))->position,body2->omega_k,result3); + FastCross(body2->omega_k,result3,result2); + FastAdd(result1,result2,result3); //wxwxr in body basis + + FastCross(body1->alpha_t,(body1->GetPoint(2))->position,result4); + FastTMult(pk_C_k,result4,result5); FastAssign(result5,result4); - - FastCross((body2->GetPoint(1))->position,body2->alpha_t,result2); - FastAdd(result2,result4,result1); //alphaxr in body basis - + + FastCross((body2->GetPoint(1))->position,body2->alpha_t,result2); + FastAdd(result2,result4,result1); //alphaxr in body basis + FastTMult(pk_C_k,body1->a_t,result2); - FastTripleSum(result3,result1,result2,body2->a_t); // in body basis - - - //----------------------------------- + FastTripleSum(result3,result1,result2,body2->a_t); // in body basis + + + //----------------------------------- } // NOTE: NOT USING BACKWARDKINEMATICS AT PRESENT @@ -208,13 +202,13 @@ void SphericalJoint::BackwardKinematics(){ // orientations ComputeBackwardTransforms(); - + // compute position vector r21 //r21 = point2->position - k_C_pk * point1->position; FastMult(k_C_pk,point1->position,result1); FastSubt(point2->position,result1,r21); - + // compute position vector r21 FastNegMult(pk_C_k,r21,r12); @@ -233,7 +227,7 @@ void SphericalJoint::BackwardKinematics(){ EP_Derivatives(q,u,qdot); // angular velocities - + FastMult(body2->n_C_k,u,result2); FastAdd(body2->omega,result2,body1->omega); FastAssign(u,k_w_pk); @@ -253,7 +247,7 @@ void SphericalJoint::BackwardKinematics(){ FastCross(body1->omega_k,k_w_pk,result1); FastMult(pk_C_k,body2->alpha_t,result2); FastAdd(result1,result2,body1->alpha_t); - + // compute state explicit acceleration FastCross(body2->alpha_t,point2->position,result1); FastCross(body2->omega_k,point2->position,result2); @@ -266,5 +260,5 @@ void SphericalJoint::BackwardKinematics(){ FastCross(body1->omega_k,result2,result3); FastTripleSum(result5,result1,result3,body1->a_t); - + } diff --git a/lib/poems/sphericaljoint.h b/lib/poems/sphericaljoint.h index db048e5544..ef29f8e38e 100644 --- a/lib/poems/sphericaljoint.h +++ b/lib/poems/sphericaljoint.h @@ -18,11 +18,12 @@ #ifndef SPHERICALJOINT_H #define SPHERICALJOINT_H -#include #include "joint.h" -#include "matrix.h" +#include "vect3.h" +#include "mat3x3.h" + + -namespace POEMS { class SphericalJoint : public Joint { Matrix const_sP; public: @@ -39,5 +40,5 @@ public: void ForwardKinematics(); void BackwardKinematics(); }; -} + #endif diff --git a/lib/poems/system.cpp b/lib/poems/system.cpp index 8515588424..369213f7d0 100644 --- a/lib/poems/system.cpp +++ b/lib/poems/system.cpp @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: system.cpp * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,37 +11,19 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #include "system.h" - -#include -#include - #include "body.h" #include "joint.h" -#include "colmatrix.h" -#include "eulerparameters.h" -#include "fixedpoint.h" -#include "freebodyjoint.h" -#include "inertialframe.h" -#include "mat3x3.h" -#include "matrix.h" -#include "matrixfun.h" -#include "rigidbody.h" -#include "sphericaljoint.h" -#include "vect3.h" -#include "virtualmatrix.h" - -namespace POEMS { class Point; } -using namespace std; -using namespace POEMS; +#include + System::System(){ - mappings = NULL; + mappings = NULL; } System::~System(){ @@ -60,7 +42,7 @@ int System::GetNumBodies(){ int * System::GetMappings() { - return mappings; + return mappings; } void System::AddBody(Body* body){ @@ -79,16 +61,16 @@ double System::GetTime(){ return time; } -void System::ComputeForces(){ - // NOT DOING ANYTHING AT THIS TIME - } - +void System::ComputeForces(){ + // NOT DOING ANYTHING AT THIS TIME + } + bool System::ReadIn(istream& in){ int numbodies; Body* body; int bodytype; char bodyname[256]; - int index; + int index; // get number of bodies in >> numbodies; @@ -166,12 +148,12 @@ bool System::ReadIn(istream& in){ delete [] bodyarray; return false; } - + joint->SetBodies(bodyarray[body1], bodyarray[body2]); bodyarray[body1]->AddJoint(joint); bodyarray[body2]->AddJoint(joint); - + in >> point1 >> point2; joint->SetPoints(bodyarray[body1]->GetPoint(point1),bodyarray[body2]->GetPoint(point2)); @@ -204,7 +186,7 @@ void System::WriteOut(ostream& out){ // set the body ID for later identification body->SetID(i); - + // write out the data body->WriteOut(out); @@ -212,7 +194,7 @@ void System::WriteOut(ostream& out){ } // number of joints - out << joints.GetNumElements() << endl; + out << joints.GetNumElements() << endl; // joints loop i = 0; @@ -227,7 +209,7 @@ void System::WriteOut(ostream& out){ // write out the data joint->WriteOut(out); - + i++; j_ele = j_ele->next; } } @@ -253,68 +235,68 @@ void System::ClearJointIDs(){ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space){ - //-------------------------------------------------------------------------// - // Declaring Temporary Entities - //-------------------------------------------------------------------------// + //-------------------------------------------------------------------------// + // Declaring Temporary Entities + //-------------------------------------------------------------------------// Body* body = NULL; Body* prev; Body* Inertial; Point* origin; Joint* joint; - Point* point_CM; - Point* point_p; - Point* point_k; + Point* point_CM; + Point* point_p; + Point* point_k; Point* point_ch = NULL; - Vect3 r1,r2,r3,v1,v2,v3; + Vect3 r1,r2,r3,v1,v2,v3; Mat3x3 IM, N, PKCK,PKCN ; ColMatrix qo, uo, q, qdot,w; - - mappings = new int[nfree]; - for(int i = 0; i < nfree; i++) - { - mappings[i] = freelist[i]; - } + + mappings = new int[nfree]; + for(int i = 0; i < nfree; i++) + { + mappings[i] = freelist[i]; + } qo.Dim(4); uo.Dim(3); q.Dim(4); - qdot.Dim(4); + qdot.Dim(4); PKCN.Identity(); PKCK.Identity(); w.Dim(3); - -//-------------------------------------------------------------------------// - // Setting up Inertial Frame, gravity and Origin + +//-------------------------------------------------------------------------// + // Setting up Inertial Frame, gravity and Origin //-------------------------------------------------------------------------// - Inertial= new InertialFrame; + Inertial= new InertialFrame; AddBody(Inertial); - - Vect3 temp1; - temp1.Zeros(); - ((InertialFrame*) Inertial)->SetGravity(temp1); + + Vect3 temp1; + temp1.Zeros(); + ((InertialFrame*) Inertial)->SetGravity(temp1); origin= new FixedPoint(temp1); - Inertial->AddPoint(origin); -//-------------------------------------------------------------------------// - double ** xh1 = new double*[nfree]; - double ** xh2 = new double*[nfree]; - - for (int i=0; iAddPoint(origin); //-------------------------------------------------------------------------// + double ** xh1 = new double*[nfree]; + double ** xh2 = new double*[nfree]; + + for (int i=0; imass=masstotal[mappings[i]-1]; IM(1,1)=inertia[mappings[i]-1][0]; IM(2,2)=inertia[mappings[i]-1][1]; @@ -325,49 +307,49 @@ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstota IM(2,1)=IM(1,2); IM(3,1)=IM(1,3); IM(3,2)=IM(2,3); - body->inertia = IM; - -//-------------------------------------------------------// - - - for (int k=0;k<3;k++){ - r1(k+1)=xh1[i][k]-xcm[mappings[i]-1][k]; - r3(k+1) = xcm[mappings[i]-1][k]; - r3(k+1)=xh2[i][k]-xcm[mappings[i]-1][k]; - } - - r2.Zeros(); - - for (int k=1;k<=3;k++){ - N(k,1)=ex_space[mappings[i]-1][k-1]; - N(k,2)=ey_space[mappings[i]-1][k-1]; - N(k,3)=ez_space[mappings[i]-1][k-1]; - } - + body->inertia = IM; + +//-------------------------------------------------------// + + + for (int k=0;k<3;k++){ + r1(k+1)=xh1[i][k]-xcm[mappings[i]-1][k]; + r3(k+1) = xcm[mappings[i]-1][k]; + r3(k+1)=xh2[i][k]-xcm[mappings[i]-1][k]; + } + + r2.Zeros(); + + for (int k=1;k<=3;k++){ + N(k,1)=ex_space[mappings[i]-1][k-1]; + N(k,2)=ey_space[mappings[i]-1][k-1]; + N(k,3)=ez_space[mappings[i]-1][k-1]; + } + PKCK=T(N); PKCN=T(N); - - q.Zeros(); + + q.Zeros(); EP_FromTransformation(q,N); - + r1=PKCN*r1; r3=PKCN*r3; - + for (int k=1;k<=3;k++){ - w(k)=omega[mappings[i]-1][k-1]; - } - + w(k)=omega[mappings[i]-1][k-1]; + } + Vect3 cart_r, cart_v; for (int k=1;k<=3;k++){ - cart_r(k)=xcm[mappings[i]-1][k-1]; - cart_v(k)=vcm[mappings[i]-1][k-1]; - } - - w=PKCN*w; - EP_Derivatives(q,w,qdot); - - -//-------------------------------------------------------------------------// + cart_r(k)=xcm[mappings[i]-1][k-1]; + cart_v(k)=vcm[mappings[i]-1][k-1]; + } + + w=PKCN*w; + EP_Derivatives(q,w,qdot); + + +//-------------------------------------------------------------------------// // Create bodies and joints with associated properties for POEMS //-------------------------------------------------------------------------// @@ -377,12 +359,12 @@ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstota body->AddPoint(point_CM); body->AddPoint(point_k); body->AddPoint(point_ch); - AddBody(body); - + AddBody(body); + Mat3x3 One; - One.Identity(); - ColMatrix qq=Stack(q,cart_r); - ColMatrix vv=Stack(qdot,cart_v); + One.Identity(); + ColMatrix qq=Stack(q,cart_r); + ColMatrix vv=Stack(qdot,cart_v); joint=new FreeBodyJoint; AddJoint(joint); joint->SetBodies(prev,body); @@ -392,225 +374,225 @@ void System::Create_DegenerateSystem(int& nfree, int*freelist, double *&masstota joint->SetZeroOrientation(One); joint->DimQandU(7,6); joint->SetInitialState(qq,vv); - joint->ForwardKinematics(); + joint->ForwardKinematics(); } for(int i = 0; i < nfree; i++) { - delete [] xh1[i]; - delete [] xh2[i]; + delete [] xh1[i]; + delete [] xh2[i]; } delete [] xh1; - delete [] xh2; + delete [] xh2; } void System::Create_System_LAMMPS(int numbodies, double *mass,double **inertia, double ** xcm, double ** xjoint,double **vcm,double **omega,double **ex_space, double **ey_space, double **ez_space, int b, int * mapping, int count){ - //-------------------------------------------------------------------------// - // Declaring Temporary Entities - //-------------------------------------------------------------------------// - - Body* body = NULL; - Body* prev; - Body* Inertial; - Point* origin; - Joint* joint; - Point* point_CM; - Point* point_p; - Point* point_k; - Point* point_ch = NULL; - Vect3 r1,r2,r3,v1,v2,v3; - Mat3x3 IM, N, PKCK,PKCN ; - ColMatrix qo, uo, q, qdot,w; - Vect3 cart_r, cart_v; - mappings = new int[b]; - for(int i = 0; i < b; i++){ - mappings[i] = mapping[i]; - } - - - qo.Dim(4); - uo.Dim(3); - q.Dim(4); - qdot.Dim(4); - PKCN.Identity(); - PKCK.Identity(); - w.Dim(3); - - //-------------------------------------------------------------------------// - // Setting up Inertial Frame, gravity and Origin - //-------------------------------------------------------------------------// - Inertial= new InertialFrame; - AddBody(Inertial); - - Vect3 temp1; - temp1.Zeros(); - ((InertialFrame*) Inertial)->SetGravity(temp1); - origin= new FixedPoint(temp1); - Inertial->AddPoint(origin); - //-------------------------------------------------------------------------// - - double ** xh1; - double ** xh2; - - xh1 = new double*[b]; - xh2 = new double*[b]; - - - for (int i=0; iSetGravity(temp1); + origin= new FixedPoint(temp1); + Inertial->AddPoint(origin); + //-------------------------------------------------------------------------// + + double ** xh1; + double ** xh2; + + xh1 = new double*[b]; + xh2 = new double*[b]; + + + for (int i=0; imass=mass[mapping[i]-1]; - IM(1,1)=inertia[mapping[i]-1][0]; - IM(2,2)=inertia[mapping[i]-1][1]; - IM(3,3)=inertia[mapping[i]-1][2]; - IM(1,2)=0.0; - IM(1,3)=0.0; - IM(2,3)=0.0; - IM(2,1)=IM(1,2); - IM(3,1)=IM(1,3); - IM(3,2)=IM(2,3); - body->inertia = IM; - - //-------------------------------------------------------// - - for (int k=0;k<3;k++){ - r1(k+1)=xh1[i][k]-xcm[mapping[i]-1][k]; - r3(k+1)=xh2[i][k]-xcm[mapping[i]-1][k]; - } - r2.Zeros(); - - for (int k=1;k<=3;k++){ - N(k,1)=ex_space[mapping[i]-1][k-1]; - N(k,2)=ey_space[mapping[i]-1][k-1]; - N(k,3)=ez_space[mapping[i]-1][k-1]; - } - - - if (i==0){ - PKCK=T(N); - PKCN=T(N); - - q.Zeros(); - EP_FromTransformation(q,N); - - r1=PKCN*r1; - r3=PKCN*r3; - - for (int k=1;k<=3;k++){ - w(k)=omega[mappings[i]-1][k-1]; - } - - for (int k=1;k<=3;k++){ - cart_r(k)=xcm[mappings[i]-1][k-1]; - cart_v(k)=vcm[mappings[i]-1][k-1]; - } - w=PKCN*w; - EP_Derivatives(q,w,qdot); - - } - else{ - PKCK=PKCN*N; - PKCN=T(N); - - q.Zeros(); - EP_FromTransformation(q,PKCK); - - r1=PKCN*r1; - r3=PKCN*r3; - - for (int k=1;k<=3;k++){ - w(k)=omega[mapping[i]-1][k-1]-omega[mapping[i-1]-1][k-1]; - } - - w=PKCN*w; - EP_Derivatives(q, w, qdot); - } - - - //-------------------------------------------------------------------------// + //-------------------------------------------------------------------------// + for(int i=0;imass=mass[mapping[i]-1]; + IM(1,1)=inertia[mapping[i]-1][0]; + IM(2,2)=inertia[mapping[i]-1][1]; + IM(3,3)=inertia[mapping[i]-1][2]; + IM(1,2)=0.0; + IM(1,3)=0.0; + IM(2,3)=0.0; + IM(2,1)=IM(1,2); + IM(3,1)=IM(1,3); + IM(3,2)=IM(2,3); + body->inertia = IM; + + //-------------------------------------------------------// + + for (int k=0;k<3;k++){ + r1(k+1)=xh1[i][k]-xcm[mapping[i]-1][k]; + r3(k+1)=xh2[i][k]-xcm[mapping[i]-1][k]; + } + r2.Zeros(); + + for (int k=1;k<=3;k++){ + N(k,1)=ex_space[mapping[i]-1][k-1]; + N(k,2)=ey_space[mapping[i]-1][k-1]; + N(k,3)=ez_space[mapping[i]-1][k-1]; + } + + + if (i==0){ + PKCK=T(N); + PKCN=T(N); + + q.Zeros(); + EP_FromTransformation(q,N); + + r1=PKCN*r1; + r3=PKCN*r3; + + for (int k=1;k<=3;k++){ + w(k)=omega[mappings[i]-1][k-1]; + } + + for (int k=1;k<=3;k++){ + cart_r(k)=xcm[mappings[i]-1][k-1]; + cart_v(k)=vcm[mappings[i]-1][k-1]; + } + w=PKCN*w; + EP_Derivatives(q,w,qdot); + + } + else{ + PKCK=PKCN*N; + PKCN=T(N); + + q.Zeros(); + EP_FromTransformation(q,PKCK); + + r1=PKCN*r1; + r3=PKCN*r3; + + for (int k=1;k<=3;k++){ + w(k)=omega[mapping[i]-1][k-1]-omega[mapping[i-1]-1][k-1]; + } + + w=PKCN*w; + EP_Derivatives(q, w, qdot); + } + + + //-------------------------------------------------------------------------// // Create bodies and joints with associated properties for POEMS - //-------------------------------------------------------------------------// - - point_CM = new FixedPoint(r2); - point_k = new FixedPoint(r1); - point_ch = new FixedPoint(r3); - body->AddPoint(point_CM); - body->AddPoint(point_k); - body->AddPoint(point_ch); - AddBody(body); - - Mat3x3 One; - One.Identity(); - if (i==0){ - ColMatrix qq=Stack(q,cart_r); - ColMatrix vv=Stack(qdot,cart_v); - joint=new FreeBodyJoint; - AddJoint(joint); - joint->SetBodies(prev,body); - body->AddJoint(joint); - prev->AddJoint(joint); - joint->SetPoints(point_p,point_k); - joint->SetZeroOrientation(One); - joint->DimQandU(7,6); - joint->SetInitialState(qq,vv); - joint->ForwardKinematics(); - } - else{ - joint= new SphericalJoint; - AddJoint(joint); - joint->SetBodies(prev,body); - body->AddJoint(joint); - prev->AddJoint(joint); - joint->SetPoints(point_p,point_k); - joint->SetZeroOrientation(One); - joint->DimQandU(4,3); - joint->SetInitialState(q,qdot); - joint->ForwardKinematics(); - } - } - for(int i = 0; i < b; i++) - { - delete [] xh1[i]; - delete [] xh2[i]; - } - delete [] xh1; - delete [] xh2; - + //-------------------------------------------------------------------------// + + point_CM = new FixedPoint(r2); + point_k = new FixedPoint(r1); + point_ch = new FixedPoint(r3); + body->AddPoint(point_CM); + body->AddPoint(point_k); + body->AddPoint(point_ch); + AddBody(body); + + Mat3x3 One; + One.Identity(); + if (i==0){ + ColMatrix qq=Stack(q,cart_r); + ColMatrix vv=Stack(qdot,cart_v); + joint=new FreeBodyJoint; + AddJoint(joint); + joint->SetBodies(prev,body); + body->AddJoint(joint); + prev->AddJoint(joint); + joint->SetPoints(point_p,point_k); + joint->SetZeroOrientation(One); + joint->DimQandU(7,6); + joint->SetInitialState(qq,vv); + joint->ForwardKinematics(); + } + else{ + joint= new SphericalJoint; + AddJoint(joint); + joint->SetBodies(prev,body); + body->AddJoint(joint); + prev->AddJoint(joint); + joint->SetPoints(point_p,point_k); + joint->SetZeroOrientation(One); + joint->DimQandU(4,3); + joint->SetInitialState(q,qdot); + joint->ForwardKinematics(); + } + } + for(int i = 0; i < b; i++) + { + delete [] xh1[i]; + delete [] xh2[i]; + } + delete [] xh1; + delete [] xh2; + } diff --git a/lib/poems/system.h b/lib/poems/system.h index 2402e5852f..1b59395de7 100644 --- a/lib/poems/system.h +++ b/lib/poems/system.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: system.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,18 +11,40 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - + #ifndef SYSTEM_H #define SYSTEM_H + #include +#include +#include +#include +#include + #include "poemslist.h" +#include "matrices.h" +#include "workspace.h" +#include "matrixfun.h" +#include "onsolver.h" +#include "system.h" +#include "inertialframe.h" +#include "rigidbody.h" +#include "revolutejoint.h" +#include "fixedpoint.h" +#include "freebodyjoint.h" +#include "sphericaljoint.h" +#include "body23joint.h" +#include "mixedjoint.h" +#include "eulerparameters.h" +#include "matrices.h" +#include "norm.h" + -namespace POEMS { class Body; class Joint; @@ -34,37 +56,37 @@ namespace POEMS { double time; List bodies; List joints; - + System(); ~System(); void Delete(); - + int GetNumBodies(); - + int * GetMappings(); void AddBody(Body* body); - + void AddJoint(Joint* joint); - + void SetTime(double t); - + double GetTime(); - + void ComputeForces(); - + bool ReadIn(std::istream& in); - + void WriteOut(std::ostream& out); - + void ClearBodyIDs(); - - void ClearJointIDs(); + + void ClearJointIDs(); void Create_System_LAMMPS(int numbodies, double *mass,double **inertia, double ** xcm, double ** xjoint,double **vh1,double **omega,double **ex_space, double **ey_space, double **ez_space, int b, int * mapping, int count); - + void Create_DegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space); }; -} + #endif diff --git a/lib/poems/vect3.cpp b/lib/poems/vect3.cpp index 66c2f902d5..03c5d7bc00 100644 --- a/lib/poems/vect3.cpp +++ b/lib/poems/vect3.cpp @@ -16,13 +16,9 @@ *_________________________________________________________________________*/ #include "vect3.h" - #include -#include using namespace std; -using namespace POEMS; - Vect3::Vect3(){ numrows = 3; numcols = 1; @@ -145,13 +141,6 @@ Vect3& Vect3::operator+=(const Vect3& A){ return *this; } -Vect3& Vect3::operator-(){ - elements[0] = -elements[0]; - elements[1] = -elements[1]; - elements[2] = -elements[2]; - return *this; -} - Vect3& Vect3::operator-=(const Vect3& A){ elements[0] -= A.elements[0]; elements[1] -= A.elements[1]; diff --git a/lib/poems/vect3.h b/lib/poems/vect3.h index 6b0efc371a..ababe18e51 100644 --- a/lib/poems/vect3.h +++ b/lib/poems/vect3.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: vect3.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,19 +11,15 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef VECT3_H #define VECT3_H -#include - #include "virtualcolmatrix.h" -#include "virtualmatrix.h" -namespace POEMS { class Matrix; class Mat3x3; class Mat6x6; @@ -56,7 +52,6 @@ public: Vect3& operator*=(double b); Vect3& operator+=(const Vect3& A); Vect3& operator-=(const Vect3& A); - Vect3& operator-(); friend Matrix T(const Vect3& A); // a wasteful transpose friend Mat3x3 CrossMat(Vect3& a); // a wasteful cross matrix implementation @@ -83,6 +78,7 @@ public: friend void FastMult(Mat3x3& A, ColMatrix& B, Vect3& C); friend void FastAssign(ColMatrix&A, Vect3& C); friend void FastMult(Mat3x3& A, Vect3& B, ColMatrix& C); + }; -} + #endif diff --git a/lib/poems/vect4.cpp b/lib/poems/vect4.cpp index 8e903d57bd..3b5afddc50 100644 --- a/lib/poems/vect4.cpp +++ b/lib/poems/vect4.cpp @@ -16,13 +16,9 @@ *_________________________________________________________________________*/ #include "vect4.h" - #include -#include using namespace std; -using namespace POEMS; - Vect4::Vect4(){ numrows = 4; numcols = 1; diff --git a/lib/poems/vect4.h b/lib/poems/vect4.h index 754706f10a..695f5e158a 100644 --- a/lib/poems/vect4.h +++ b/lib/poems/vect4.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: vect4.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,19 +11,16 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ #ifndef VECT4_H #define VECT4_H -#include - #include "virtualcolmatrix.h" -#include "virtualmatrix.h" -namespace POEMS { + class Matrix; class Mat4x4; @@ -42,7 +39,7 @@ public: void BasicSet_1int(int i, double value); void BasicIncrement_1int(int i, double value); - + void Const(double value); MatrixType GetType() const; std::ostream& WriteData(std::ostream& c) const; @@ -70,5 +67,5 @@ public: friend void FastAdd(Vect4& A, Vect4& B, Vect4& C); friend void FastSubt(Vect4& A, Vect4& B, Vect4& C); }; -} + #endif diff --git a/lib/poems/vect6.cpp b/lib/poems/vect6.cpp index 5aabe520e1..eb65d24f16 100644 --- a/lib/poems/vect6.cpp +++ b/lib/poems/vect6.cpp @@ -16,13 +16,9 @@ *_________________________________________________________________________*/ #include "vect6.h" - #include -#include using namespace std; -using namespace POEMS; - Vect6::Vect6(){ numrows = 6; numcols = 1; diff --git a/lib/poems/vect6.h b/lib/poems/vect6.h index 5def4c6b1b..c346c852ef 100644 --- a/lib/poems/vect6.h +++ b/lib/poems/vect6.h @@ -18,12 +18,8 @@ #ifndef VECT6_H #define VECT6_H -#include - #include "virtualcolmatrix.h" -#include "virtualmatrix.h" -namespace POEMS { class Matrix; class Mat6x6; class ColMatrix; @@ -70,5 +66,5 @@ public: friend void OnPopulateSVect(Vect3& angular, Vect3& linear, Vect6& sV); }; -} + #endif diff --git a/lib/poems/virtualcolmatrix.cpp b/lib/poems/virtualcolmatrix.cpp index fa430b81f7..3a6c6e22cd 100644 --- a/lib/poems/virtualcolmatrix.cpp +++ b/lib/poems/virtualcolmatrix.cpp @@ -20,8 +20,6 @@ #include using namespace std; -using namespace POEMS; - VirtualColMatrix::VirtualColMatrix(){ numcols = 1; diff --git a/lib/poems/virtualcolmatrix.h b/lib/poems/virtualcolmatrix.h index 040fce051e..1548794ca0 100644 --- a/lib/poems/virtualcolmatrix.h +++ b/lib/poems/virtualcolmatrix.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: virtualcolmatrix.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,25 +21,25 @@ #include "virtualmatrix.h" -namespace POEMS { + class VirtualColMatrix : public VirtualMatrix { -public: - VirtualColMatrix(); - ~VirtualColMatrix(); - double& operator_2int (int i, int j); // array access - double Get_2int (int i, int j) const; - void Set_2int (int i, int j, double value); - double BasicGet_2int(int i, int j) const; - void BasicSet_2int(int i, int j, double value); - void BasicIncrement_2int(int i, int j, double value); - - virtual double& operator_1int (int i) = 0; // array access - virtual double Get_1int(int i) const = 0; - virtual void Set_1int(int i, double value) = 0; - virtual double BasicGet_1int(int i) const = 0; - virtual void BasicSet_1int(int i, double value) = 0; - virtual void BasicIncrement_1int(int i, double value) = 0; +public: + VirtualColMatrix(); + ~VirtualColMatrix(); + double& operator_2int (int i, int j); // array access + double Get_2int (int i, int j) const; + void Set_2int (int i, int j, double value); + double BasicGet_2int(int i, int j) const; + void BasicSet_2int(int i, int j, double value); + void BasicIncrement_2int(int i, int j, double value); + + virtual double& operator_1int (int i) = 0; // array access + virtual double Get_1int(int i) const = 0; + virtual void Set_1int(int i, double value) = 0; + virtual double BasicGet_1int(int i) const = 0; + virtual void BasicSet_1int(int i, double value) = 0; + virtual void BasicIncrement_1int(int i, double value) = 0; }; -} + #endif diff --git a/lib/poems/virtualmatrix.cpp b/lib/poems/virtualmatrix.cpp index bfffeb3d74..19d5946961 100644 --- a/lib/poems/virtualmatrix.cpp +++ b/lib/poems/virtualmatrix.cpp @@ -21,8 +21,6 @@ #include using namespace std; -using namespace POEMS; - VirtualMatrix::VirtualMatrix(){ numrows = numcols = 0; @@ -142,14 +140,14 @@ istream& VirtualMatrix::ReadData(istream& c){ // operators and functions // -ostream& POEMS::operator<< (ostream& c, const VirtualMatrix& A){ //output +ostream& operator<< (ostream& c, const VirtualMatrix& A){ //output c << A.GetType() << ' '; A.WriteData(c); c << endl; return c; } -istream& POEMS::operator>> (istream& c, VirtualMatrix& A){ //input +istream& operator>> (istream& c, VirtualMatrix& A){ //input VirtualMatrix* vm; int matrixtype; c >> matrixtype; diff --git a/lib/poems/virtualmatrix.h b/lib/poems/virtualmatrix.h index 706b943d66..a27c7de047 100644 --- a/lib/poems/virtualmatrix.h +++ b/lib/poems/virtualmatrix.h @@ -20,7 +20,6 @@ #define VIRTUALMATRIX_H #include -namespace POEMS { enum MatrixType { MATRIX = 0, COLMATRIX = 1, @@ -84,5 +83,5 @@ protected: // overloaded operators std::ostream& operator<< (std::ostream& c, const VirtualMatrix& A); // output std::istream& operator>> (std::istream& c, VirtualMatrix& A); // input -} + #endif diff --git a/lib/poems/virtualrowmatrix.cpp b/lib/poems/virtualrowmatrix.cpp index 740c747407..1a12cfbfd9 100644 --- a/lib/poems/virtualrowmatrix.cpp +++ b/lib/poems/virtualrowmatrix.cpp @@ -21,8 +21,6 @@ #include using namespace std; -using namespace POEMS; - VirtualRowMatrix::VirtualRowMatrix(){ numrows = 1; diff --git a/lib/poems/virtualrowmatrix.h b/lib/poems/virtualrowmatrix.h index 0a3c877f64..68b39f137d 100644 --- a/lib/poems/virtualrowmatrix.h +++ b/lib/poems/virtualrowmatrix.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: virtualrowmatrix.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -21,9 +21,8 @@ #include "virtualmatrix.h" -namespace POEMS { class VirtualRowMatrix : public VirtualMatrix { -public: +public: VirtualRowMatrix(); ~VirtualRowMatrix(); double& operator_2int (int i, int j); // array access @@ -32,7 +31,7 @@ public: double BasicGet_2int(int i, int j) const; void BasicSet_2int(int i, int j, double value); void BasicIncrement_2int(int i, int j, double value); - + virtual double& operator_1int (int i) = 0; // array access virtual double Get_1int(int i) const = 0; virtual void Set_1int(int i, double value) = 0; @@ -40,5 +39,5 @@ public: virtual void BasicSet_1int(int i, double value) = 0; virtual void BasicIncrement_1int(int i, double value) = 0; }; -} + #endif diff --git a/lib/poems/workspace.cpp b/lib/poems/workspace.cpp index 03f18a7895..2b3257b0dd 100644 --- a/lib/poems/workspace.cpp +++ b/lib/poems/workspace.cpp @@ -15,31 +15,18 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ -#include -#include // IWYU pragma: keep -#include #include "workspace.h" #include "system.h" #include "solver.h" #include "SystemProcessor.h" -#include "POEMSChain.h" -#include "body.h" -#include "colmatmap.h" -#include "colmatrix.h" -#include "defines.h" -#include "joint.h" -#include "mat3x3.h" -#include "matrix.h" -#include "matrixfun.h" -#include "poemslist.h" -#include "vect3.h" -#include "virtualmatrix.h" +#include +#include +#include +#include using namespace std; -using namespace POEMS; - void Workspace::allocateNewSystem() { currentIndex++; diff --git a/lib/poems/workspace.h b/lib/poems/workspace.h index 2510b2fc3a..5faaf904dc 100644 --- a/lib/poems/workspace.h +++ b/lib/poems/workspace.h @@ -3,7 +3,7 @@ * POEMS: PARALLELIZABLE OPEN SOURCE EFFICIENT MULTIBODY SOFTWARE * * DESCRIPTION: SEE READ-ME * * FILE NAME: workspace.h * - * AUTHORS: See Author List * + * AUTHORS: See Author List * * GRANTS: See Grants List * * COPYRIGHT: (C) 2005 by Authors as listed in Author's List * * LICENSE: Please see License Agreement * @@ -11,7 +11,7 @@ * ADMINISTRATOR: Prof. Kurt Anderson * * Computational Dynamics Lab * * Rensselaer Polytechnic Institute * - * 110 8th St. Troy NY 12180 * + * 110 8th St. Troy NY 12180 * * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ @@ -19,62 +19,70 @@ #ifndef WORKSPACE_H #define WORKSPACE_H -namespace POEMS { +#include "matrices.h" +#include +#include +#include +#include +#include +#include + + class System; class Solver; struct SysData{ - System * system; - int solver; - int integrator; + System * system; + int solver; + int integrator; }; class Workspace { - SysData * system; // the multibody systems data - int currentIndex; - int maxAlloc; - + SysData * system; // the multibody systems data + int currentIndex; + int maxAlloc; + public: Workspace(); ~Workspace(); - + double Thalf; double Tfull; double ConFac; double KE_val; - int FirstTime; - + int FirstTime; + bool LoadFile(char* filename); - + bool SaveFile(char* filename, int index = -1); System* GetSystem(int index = -1); - - void AddSolver(Solver* s, int index = -1); - - - void LobattoOne(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); - - void LobattoTwo(double **&vcm,double **&omega,double **&torque, double **&fcm); - - + + void AddSolver(Solver* s, int index = -1); + + + void LobattoOne(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); + + void LobattoTwo(double **&vcm,double **&omega,double **&torque, double **&fcm); + + bool MakeSystem(int& nbody, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space, int &njoint, int **&jointbody, double **&xjoint, int& nfree, int*freelist, double dthalf, double dtv, double tempcon, double KE); - - - bool SaveSystem(int& nbody, double *&masstotal, double **&inertia, double **&xcm, double **&xjoint, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space, double **&acm, double **&alpha, double **&torque, double **&fcm, int **&jointbody, int &njoint); - - bool MakeDegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space); + + + bool SaveSystem(int& nbody, double *&masstotal, double **&inertia, double **&xcm, double **&xjoint, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space, double **&acm, double **&alpha, double **&torque, double **&fcm, int **&jointbody, int &njoint); + + bool MakeDegenerateSystem(int& nfree, int*freelist, double *&masstotal, double **&inertia, double **&xcm, double **&vcm, double **&omega, double **&ex_space, double **&ey_space, double **&ez_space); int getNumberOfSystems(); - + void SetLammpsValues(double dtv, double dthalf, double tempcon); void SetKE(int temp, double SysKE); - - void RKStep(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); - - void WriteFile(char* filename); + + void RKStep(double **&xcm, double **&vcm,double **&omega,double **&torque, double **&fcm, double **&ex_space, double **&ey_space, double **&ez_space); + + void WriteFile(char* filename); private: - void allocateNewSystem(); //helper function to handle vector resizing and such for the array of system pointers + void allocateNewSystem(); //helper function to handle vector resizing and such for the array of system pointers }; -} + #endif diff --git a/src/POEMS/fix_poems.cpp b/src/POEMS/fix_poems.cpp index 21c12f700b..c8646f5b14 100644 --- a/src/POEMS/fix_poems.cpp +++ b/src/POEMS/fix_poems.cpp @@ -263,7 +263,7 @@ FixPOEMS::FixPOEMS(LAMMPS *lmp, int narg, char **arg) : // create POEMS instance - poems = new POEMS::Workspace; + poems = new Workspace; // compute per body forces and torques inside final_integrate() by default diff --git a/src/POEMS/fix_poems.h b/src/POEMS/fix_poems.h index 87f9557ac0..7b2c77a1bd 100644 --- a/src/POEMS/fix_poems.h +++ b/src/POEMS/fix_poems.h @@ -22,7 +22,6 @@ FixStyle(poems,FixPOEMS) #include "fix.h" -namespace POEMS { class Workspace; } namespace LAMMPS_NS { class FixPOEMS : public Fix { @@ -95,7 +94,7 @@ class FixPOEMS : public Fix { // POEMS object - POEMS::Workspace *poems; + class Workspace *poems; // internal class functions -- GitLab From b6b802d0b11d75f1dd5cd58f76f3392fcb8a04c2 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 22 Jul 2019 14:36:09 -0400 Subject: [PATCH 186/236] correct forward declaration of POEMS workspace class --- src/POEMS/fix_poems.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/POEMS/fix_poems.h b/src/POEMS/fix_poems.h index 7b2c77a1bd..6892c51d7e 100644 --- a/src/POEMS/fix_poems.h +++ b/src/POEMS/fix_poems.h @@ -22,6 +22,8 @@ FixStyle(poems,FixPOEMS) #include "fix.h" +class Workspace; + namespace LAMMPS_NS { class FixPOEMS : public Fix { @@ -94,7 +96,7 @@ class FixPOEMS : public Fix { // POEMS object - class Workspace *poems; + Workspace *poems; // internal class functions -- GitLab From dd4368dd1b471134629486e590a6624a66265c8f Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Tue, 23 Jul 2019 13:40:13 -0500 Subject: [PATCH 187/236] Fix bug in pair_kim.cpp for partialParticleVirial computation --- src/KIM/pair_kim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 6251ebb6c7..50eef1de2b 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -826,7 +826,7 @@ void PairKIM::set_argument_pointers() } else if (KIM_SupportStatus_NotEqual(kim_model_support_for_particleVirial, KIM_SUPPORT_STATUS_notSupported)) { kimerror = kimerror || KIM_ComputeArguments_SetArgumentPointerDouble( - pargs, KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy, &(vatom[0][0])); + pargs, KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial, &(vatom[0][0])); } if (kimerror) error->all(FLERR,"Unable to set KIM argument pointers"); -- GitLab From be86db9dd9cde416f0136b282c830e9bf231c59a Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Tue, 23 Jul 2019 21:06:02 -0500 Subject: [PATCH 188/236] Update /lib/kim stuff --- lib/kim/Install.py | 11 ++++------- lib/kim/README | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/lib/kim/Install.py b/lib/kim/Install.py index c3588241c4..de22950639 100644 --- a/lib/kim/Install.py +++ b/lib/kim/Install.py @@ -18,7 +18,7 @@ parser = ArgumentParser(prog='Install.py', # settings thisdir = fullpath('.') -version = "kim-api-2.0.2" +version = "kim-api-2.1.1" # help message @@ -39,11 +39,8 @@ make lib-kim args="-b -a EAM_ErcolessiAdams_1994_Al__MO_324507536345_002" # Ditt make lib-kim args="-b -a everything" # install KIM API lib with all models make lib-kim args="-n -a EAM_Dynamo_Ackland_2003_W__MO_141627196590_005" # only add one model or model driver -See the list of KIM model drivers here: -https://openkim.org/browse/model-drivers/alphabetical - See the list of all KIM models here: -https://openkim.org/browse/models/by-model-drivers +https://openkim.org/browse/models """ pgroup = parser.add_mutually_exclusive_group() @@ -132,7 +129,7 @@ if buildflag: # build kim-api print("Building kim-api ...") - cmd = 'cd "%s/%s/build" && make' % (thisdir, version) + cmd = 'cd "%s/%s/build" && make -j2' % (thisdir, version) txt = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) if verboseflag: print(txt.decode("UTF-8")) @@ -140,7 +137,7 @@ if buildflag: # install kim-api print("Installing kim-api ...") - cmd = 'cd "%s/%s/build" && make install' % (thisdir, version) + cmd = 'cd "%s/%s/build" && make -j2 install' % (thisdir, version) txt = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) if verboseflag: print(txt.decode("UTF-8")) diff --git a/lib/kim/README b/lib/kim/README index d3327537b6..3cba4a4597 100644 --- a/lib/kim/README +++ b/lib/kim/README @@ -1,11 +1,11 @@ -This directory contains build settings for the KIM API library which -is required to use the KIM package and its pair_style kim command in a -LAMMPS input script. +This directory contains build settings for the KIM API library which is +required to use the KIM package and its kim_init, kim_interactions, kim_query, +and pair_kim commands in a LAMMPS input script. Information about the KIM project can be found at https://openkim.org. The KIM project is lead by Ellad Tadmor and Ryan Elliott (U Minn). Ryan Elliott is the main developer for the KIM API and he also -maintains the code that implements the pair_style kim command. +maintains the code that implements the KIM commands. You can type "make lib-kim" from the src directory to see help on how to download and build this library via make commands, or you can @@ -13,11 +13,9 @@ do the same thing by typing "python Install.py" from within this directory, or you can do it manually by following the instructions below. -As of KIM API version 2, the KIM package also provides a LAMMPS command -to perform queries through the OpenKIM web API. This feature requires -that the CURL library (libcurl) development package and its configuration -query tool, curl-config, are installed. The provided Makefile.lammps -is set up to automatically detect this. +Use of the kim_query command requires that the CURL library (libcurl) +development package and its configuration query tool, curl-config, are +installed. The provided Makefile.lammps is set up to automatically detect this. ----------------- @@ -40,8 +38,8 @@ $ cmake .. -DCMAKE_INSTALL_PREFIX=${PWD}/../../installed-kim-api-X.Y.Z 3. Build and install the kim-api and model -$ make -$ make install +$ make -j2 +$ make -j2 install 4. Remove source and build files @@ -53,7 +51,7 @@ $ rm -rf kim-api-X.Y.Z.txz desired value) $ source ${PWD}/kim-api-X.Y.Z/bin/kim-api-activate -$ kim-api-collections-management install system Pair_Johnson_Fe__MO_857282754307_002 +$ kim-api-collections-management install system EAM_ErcolessiAdams_1994_Al__MO_324507536345_002 ----------------- -- GitLab From 3bc4a07c74aac582a9e74ce429abb4564e224cfd Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Wed, 24 Jul 2019 11:23:51 -0500 Subject: [PATCH 189/236] Corrections to kim_query in example --- doc/src/kim_commands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 01df0532b7..6fe7d7ba3e 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -433,7 +433,7 @@ the returned values is determined by the type of query performed. kim_init EAM_Dynamo_ErcolessiAdams_1994_Al__MO_123629422045_005 metal boundary p p p kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] -kim_query alpha get_linear_thermal_expansion_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\{"1/K"\} temperature=[293.15] temperature_units=["K"] +kim_query alpha get_linear_thermal_expansion_coefficient_cubic crystal=\["fcc"\] species=\["Al"\] units=\["1/K"\] temperature=\[293.15\] temperature_units=\["K"\] variable DeltaT equal 300 lattice fcc $\{a0\}*$\{alpha\}*$\{DeltaT\} ... :pre -- GitLab From 3887a7f3d79559eb47d82e989a71ed1abf6a0320 Mon Sep 17 00:00:00 2001 From: Ellad Tadmor Date: Wed, 24 Jul 2019 12:07:38 -0500 Subject: [PATCH 190/236] Updated KIM ID code for IFF SM --- doc/src/kim_commands.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 6fe7d7ba3e..dd61f6f5cc 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -33,7 +33,7 @@ kim_interactions Si kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 metal unit_conversion_mode kim_interactions C H O -Sim_LAMMPS_IFF_PCFF_HeinzMishraLinEmami_2015Ver1v5_FccmetalsMineralsSolvents Polymers__SM_064312669787_000 real +Sim_LAMMPS_IFF_PCFF_HeinzMishraLinEmami_2015Ver1v5_FccmetalsMineralsSolvents Polymers__SM_039297821658_000 real kim_interactions fixed_types kim_query a0 get_lattice_constant_cubic crystal=\["fcc"\] species=\["Al"\] units=\["angstrom"\] :pre -- GitLab From 985c959a91d5701da3f8292534c024721007b21b Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 Jul 2019 14:27:29 -0400 Subject: [PATCH 191/236] include the bond length in communication cutoff considerations --- src/neighbor.cpp | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 0382624198..1cae719df1 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -35,6 +35,7 @@ #include "comm.h" #include "force.h" #include "pair.h" +#include "bond.h" #include "domain.h" #include "group.h" #include "modify.h" @@ -276,6 +277,28 @@ void Neighbor::init() // cutneigh = force cutoff + skin if cutforce > 0, else cutneigh = 0 // cutneighghost = pair cutghost if it requests it, else same as cutneigh + // also consider bonded interactions for estimating the the neighborlist + // and communication cutoff. we use the bond equilibrium distance as + // cutoff, if only a bond style exists. if also an angle style exists we + // multiply by 2, for dihedral or improper we multiply by 3. + // this plus "skin" will become the default communication cutoff, if no + // pair style is defined. otherwise the maximum of the largest pairwise + // cutoff of this is used. + + double maxbondcutoff = 0.0; + if (force->bond) { + n = atom->nbondtypes; + for (i = 1; i <= n; ++i) { + double bondcutoff = force->bond->equilibrium_distance(i); + maxbondcutoff = MAX(bondcutoff,maxbondcutoff); + } + if (force->dihedral || force->improper) { + maxbondcutoff *= 3.0; + } else if (force->angle) { + maxbondcutoff *=2.0; + } + } + triggersq = 0.25*skin*skin; boxcheck = 0; if (domain->box_change && (domain->xperiodic || domain->yperiodic || @@ -293,7 +316,7 @@ void Neighbor::init() double cutoff,delta,cut; cutneighmin = BIG; - cutneighmax = 0.0; + cutneighmax = maxbondcutoff; for (i = 1; i <= n; i++) { cuttype[i] = cuttypesq[i] = 0.0; -- GitLab From be1522d16d8ce58711537a7fdb33884f887c3f96 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 Jul 2019 14:42:17 -0400 Subject: [PATCH 192/236] add warning to Comm class against zero communication cutoff --- src/comm_brick.cpp | 3 +++ src/comm_tiled.cpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index 330551aaed..eb53f89746 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -176,6 +176,9 @@ void CommBrick::setup() double *prd,*sublo,*subhi; double cut = MAX(neighbor->cutneighmax,cutghostuser); + if ((cut == 0.0) && (me == 0)) + error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms " + "will be generated. Atoms may get lost."); if (triclinic == 0) { prd = domain->prd; diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index d1d625445a..9d4c446057 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -158,6 +158,10 @@ void CommTiled::setup() // check that cutoff < any periodic box length double cut = MAX(neighbor->cutneighmax,cutghostuser); + if ((cut == 0.0) && (me == 0)) + error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms " + "will be generated. Atoms may get lost."); + cutghost[0] = cutghost[1] = cutghost[2] = cut; if ((periodicity[0] && cut > prd[0]) || -- GitLab From 20843f7476e28a37e7933b2ebc920f0a41eb2983 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 Jul 2019 14:52:07 -0400 Subject: [PATCH 193/236] add documentation for warning added to comm styles --- doc/src/Errors_warnings.txt | 10 ++++++++++ src/comm.h | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/src/Errors_warnings.txt b/doc/src/Errors_warnings.txt index 1507d6b22c..9f346ba8c1 100644 --- a/doc/src/Errors_warnings.txt +++ b/doc/src/Errors_warnings.txt @@ -129,6 +129,16 @@ Self-explanatory. :dd Self-explanatory. :dd +{Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost} :dt + +The communication cutoff defaults to the maximum of what is inferred from +pair and bond styles (will be zero, if none are defined) and what is specified +via "comm_modify cutoff"_comm_modify.html (defaults to 0.0). If this results +to 0.0, no ghost atoms will be generated and LAMMPS may lose atoms or use +incorrect periodic images of atoms in interaction lists. To avoid, either use +"pair style zero"_pair_zero.html with a suitable cutoff or use "comm_modify +cutoff"_comm_modify.html. :dd + {Communication cutoff is too small for SNAP micro load balancing, increased to %lf} :dt Self-explanatory. :dd diff --git a/src/comm.h b/src/comm.h index 30360b1059..90a215b4a6 100644 --- a/src/comm.h +++ b/src/comm.h @@ -237,6 +237,15 @@ Self-explanatory. E: Cannot put data on ring from NULL pointer +W: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. + +The communication cutoff defaults to the maximum of what is inferred from pair and +bond styles (will be zero, if none are defined) and what is specified via +"comm_modify cutoff" (defaults to 0.0). If this results to 0.0, no ghost atoms will +be generated and LAMMPS may lose atoms or use incorrect periodic images of atoms in +interaction lists. To avoid, either define pair style zero with a suitable cutoff +or use comm_modify cutoff. + UNDOCUMENTED U: OMP_NUM_THREADS environment is not set. -- GitLab From 1d310ad73e80f220cbfc90153758b43af7700032 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 Jul 2019 14:52:37 -0400 Subject: [PATCH 194/236] add half a bond length safety margin to bond length based cutoff estimates --- src/neighbor.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 1cae719df1..9964b23b60 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -278,9 +278,10 @@ void Neighbor::init() // cutneighghost = pair cutghost if it requests it, else same as cutneigh // also consider bonded interactions for estimating the the neighborlist - // and communication cutoff. we use the bond equilibrium distance as - // cutoff, if only a bond style exists. if also an angle style exists we - // multiply by 2, for dihedral or improper we multiply by 3. + // and communication cutoff. we use the 1.5x the bond equilibrium distance + // as cutoff, if only a bond style exists. if also an angle style exists we + // multiply by 2.5, for dihedral or improper we multiply by 3.5. (1,2, or 3 + // bonds plus half a bond length total stretch). // this plus "skin" will become the default communication cutoff, if no // pair style is defined. otherwise the maximum of the largest pairwise // cutoff of this is used. @@ -293,9 +294,11 @@ void Neighbor::init() maxbondcutoff = MAX(bondcutoff,maxbondcutoff); } if (force->dihedral || force->improper) { - maxbondcutoff *= 3.0; + maxbondcutoff *= 3.5; } else if (force->angle) { - maxbondcutoff *=2.0; + maxbondcutoff *=2.5; + } else { + maxbondcutoff *=1.5; } } -- GitLab From cb9facea8b3643de95b4b41df11f4b998b335828 Mon Sep 17 00:00:00 2001 From: Steve Plimpton Date: Wed, 24 Jul 2019 13:43:12 -0600 Subject: [PATCH 195/236] add reset of dotmark --- src/rcb.cpp | 50 ++++++++++++++++++-------------------------------- 1 file changed, 18 insertions(+), 32 deletions(-) diff --git a/src/rcb.cpp b/src/rcb.cpp index ac7ac60b1f..5cb3b697e2 100644 --- a/src/rcb.cpp +++ b/src/rcb.cpp @@ -467,44 +467,30 @@ void RCB::compute(int dimension, int n, double **x, double *wt, } } - //check if zero box width is the result due to dots being on box vertices - //select half of the box in this case along the best dim - //the best dim is chosen according to the optimum volume (to minimize surface area) - - if(largest==0.0){ - double best_volume=0; - double current_volume; - int dim1o,dim2o; - for (dim = 0; dim < dimension; dim++){ - if(dim==0){ - dim1o=1; - dim2o=2; - } - if(dim==1){ - dim1o=0; - dim2o=2; - } - if(dim==2){ - dim1o=0; - dim2o=1; - } - valuehalf = 0.5*(lo[dim] + hi[dim]); - current_volume = (hi[dim1o]-lo[dim1o]) - *(hi[dim2o]-lo[dim2o])*(valuehalf-lo[dim]); - //chose cut that minimizes surface area by maximizing volume; - if(current_volume>best_volume){ best_volume = current_volume; - valuehalf_select = valuehalf; - dim_select = dim; - } - } - } - // copy results for best dim cut into dim,valuehalf,dotmark dim = dim_select; valuehalf = valuehalf_select; if (ndot > 0) memcpy(dotmark,dotmark_select,ndot*sizeof(int)); + // special case for zero box width + // can occur when all dots are on corner vertices of this sub-box + // split box on longest dimension + // reset dotmark for that cut + + if (largest == 0.0) { + dim = 0; + if (hi[1]-lo[1] > hi[0]-lo[0]) dim = 1; + if (dimension == 3 && hi[2]-lo[2] > hi[dim]-lo[dim]) dim = 2; + valuehalf = 0.5* (lo[dim] + hi[dim]); + + for (j = 0; j < nlist; j++) { + i = dotlist[j]; + if (dots[i].x[dim] <= valuehalf) dotmark[i] = 0; + else dotmark[i] = 1; + } + } + // found median // store cut info only if I am procmid -- GitLab From c098582df81520e55d63621845bcada8cdbfded1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 Jul 2019 17:27:35 -0400 Subject: [PATCH 196/236] refactor communication cutoff estimator. move it to Comm class. and adjust heuristics. --- src/comm.cpp | 41 ++++++++++++++++++++++++++++++++++++----- src/comm.h | 2 ++ src/comm_brick.cpp | 2 +- src/comm_tiled.cpp | 2 +- src/info.cpp | 2 +- src/neighbor.cpp | 28 +--------------------------- 6 files changed, 42 insertions(+), 35 deletions(-) diff --git a/src/comm.cpp b/src/comm.cpp index 052de93793..3b4029e7d3 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -20,6 +20,7 @@ #include "atom_vec.h" #include "force.h" #include "pair.h" +#include "bond.h" #include "modify.h" #include "fix.h" #include "compute.h" @@ -585,6 +586,41 @@ void Comm::set_proc_grid(int outflag) } } +/* ---------------------------------------------------------------------- + determine suitable communication cutoff. + it is the maximum of the user specified value and estimates based on + the maximum neighbor list cutoff and largest bond equilibrium length. + we use the 1.5x the bond equilibrium distance as cutoff, if only a + bond style exists or only bond and angle styles exists. If dihedrals + or impropers are present we multiply by 2.0. This plus the + "neighbor list skin" will become the default communication cutoff, if + no pair style is defined and thus avoids all kinds of unexpected behavior + for such systems. If a pair style exists, the result is the maximum of + the bond based cutoff and the largest pair cutoff and the user + specified communication cutoff. +------------------------------------------------------------------------- */ + +double Comm::get_comm_cutoff() +{ + double maxcommcutoff = 0.0; + if (force->bond) { + int n = atom->nbondtypes; + for (int i = 1; i <= n; ++i) + maxcommcutoff = MAX(maxcommcutoff,force->bond->equilibrium_distance(i)); + + if (force->dihedral || force->improper) { + maxcommcutoff *= 2.0; + } else { + maxcommcutoff *=1.5; + } + maxcommcutoff += neighbor->skin; + } + maxcommcutoff = MAX(maxcommcutoff,neighbor->cutneighmax); + maxcommcutoff = MAX(maxcommcutoff,cutghostuser); + + return maxcommcutoff; +} + /* ---------------------------------------------------------------------- determine which proc owns atom with coord x[3] based on current decomp x will be in box (orthogonal) or lamda coords (triclinic) @@ -963,11 +999,6 @@ rendezvous_all2all(int n, char *inbuf, int insize, int inorder, int *procs, return 0; // all nout_rvous are 0, no 2nd irregular } - - - - - // create procs and outbuf for All2all if necesary if (!outorder) { diff --git a/src/comm.h b/src/comm.h index 90a215b4a6..860912a7d2 100644 --- a/src/comm.h +++ b/src/comm.h @@ -70,6 +70,8 @@ class Comm : protected Pointers { void set_processors(int, char **); // set 3d processor grid attributes virtual void set_proc_grid(int outflag = 1); // setup 3d grid of procs + double get_comm_cutoff(); // determine communication cutoff + virtual void setup() = 0; // setup 3d comm pattern virtual void forward_comm(int dummy = 0) = 0; // forward comm of atom coords virtual void reverse_comm() = 0; // reverse comm of forces diff --git a/src/comm_brick.cpp b/src/comm_brick.cpp index eb53f89746..a9ce64399f 100644 --- a/src/comm_brick.cpp +++ b/src/comm_brick.cpp @@ -175,7 +175,7 @@ void CommBrick::setup() int ntypes = atom->ntypes; double *prd,*sublo,*subhi; - double cut = MAX(neighbor->cutneighmax,cutghostuser); + double cut = get_comm_cutoff(); if ((cut == 0.0) && (me == 0)) error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms " "will be generated. Atoms may get lost."); diff --git a/src/comm_tiled.cpp b/src/comm_tiled.cpp index 9d4c446057..2558559cf7 100644 --- a/src/comm_tiled.cpp +++ b/src/comm_tiled.cpp @@ -157,7 +157,7 @@ void CommTiled::setup() // set cutoff for comm forward and comm reverse // check that cutoff < any periodic box length - double cut = MAX(neighbor->cutneighmax,cutghostuser); + double cut = get_comm_cutoff(); if ((cut == 0.0) && (me == 0)) error->warning(FLERR,"Communication cutoff is 0.0. No ghost atoms " "will be generated. Atoms may get lost."); diff --git a/src/info.cpp b/src/info.cpp index 25b9879408..74cbe6556f 100644 --- a/src/info.cpp +++ b/src/info.cpp @@ -366,7 +366,7 @@ void Info::command(int narg, char **arg) if (comm->mode == 0) { fprintf(out,"Communication mode = single\n"); fprintf(out,"Communication cutoff = %g\n", - MAX(comm->cutghostuser,neighbor->cutneighmax)); + comm->get_comm_cutoff()); } if (comm->mode == 1) { diff --git a/src/neighbor.cpp b/src/neighbor.cpp index 9964b23b60..0382624198 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -35,7 +35,6 @@ #include "comm.h" #include "force.h" #include "pair.h" -#include "bond.h" #include "domain.h" #include "group.h" #include "modify.h" @@ -277,31 +276,6 @@ void Neighbor::init() // cutneigh = force cutoff + skin if cutforce > 0, else cutneigh = 0 // cutneighghost = pair cutghost if it requests it, else same as cutneigh - // also consider bonded interactions for estimating the the neighborlist - // and communication cutoff. we use the 1.5x the bond equilibrium distance - // as cutoff, if only a bond style exists. if also an angle style exists we - // multiply by 2.5, for dihedral or improper we multiply by 3.5. (1,2, or 3 - // bonds plus half a bond length total stretch). - // this plus "skin" will become the default communication cutoff, if no - // pair style is defined. otherwise the maximum of the largest pairwise - // cutoff of this is used. - - double maxbondcutoff = 0.0; - if (force->bond) { - n = atom->nbondtypes; - for (i = 1; i <= n; ++i) { - double bondcutoff = force->bond->equilibrium_distance(i); - maxbondcutoff = MAX(bondcutoff,maxbondcutoff); - } - if (force->dihedral || force->improper) { - maxbondcutoff *= 3.5; - } else if (force->angle) { - maxbondcutoff *=2.5; - } else { - maxbondcutoff *=1.5; - } - } - triggersq = 0.25*skin*skin; boxcheck = 0; if (domain->box_change && (domain->xperiodic || domain->yperiodic || @@ -319,7 +293,7 @@ void Neighbor::init() double cutoff,delta,cut; cutneighmin = BIG; - cutneighmax = maxbondcutoff; + cutneighmax = 0.0; for (i = 1; i <= n; i++) { cuttype[i] = cuttypesq[i] = 0.0; -- GitLab From d08477cc5f152f9fe8e2d916a9548aac798b75c9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Wed, 24 Jul 2019 17:49:00 -0400 Subject: [PATCH 197/236] print warning, when explicitly specified communication cutoff is increased --- src/comm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/comm.cpp b/src/comm.cpp index 3b4029e7d3..4e605808af 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -617,6 +617,11 @@ double Comm::get_comm_cutoff() } maxcommcutoff = MAX(maxcommcutoff,neighbor->cutneighmax); maxcommcutoff = MAX(maxcommcutoff,cutghostuser); + if ((me == 0) && (cutghostuser > 0.0) && (maxcommcutoff > cutghostuser)) { + char mesg[128]; + snprintf(mesg,128,"Communication cutoff is changed to %g",maxcommcutoff); + error->warning(FLERR,mesg); + } return maxcommcutoff; } -- GitLab From b5a066ecd023495b252f3dfab7a8aedce0ac77bc Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Wed, 24 Jul 2019 21:08:08 -0500 Subject: [PATCH 198/236] Better error checking for kim_init log.cite behavior --- src/KIM/kim_init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 5fb6748427..83638f3428 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -486,7 +486,7 @@ void KimInit::write_log_cite(char * model_name) if (0 == strncmp("kimcite",fileName,7)) { - if (lmp->citeme) lmp->citeme->add(fileString); + if ((lmp->citeme) && (availableAsString)) lmp->citeme->add(fileString); } } -- GitLab From aec43304f4b71efba11471450b078d6ccff65573 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 25 Jul 2019 11:02:51 +0200 Subject: [PATCH 199/236] Add files via upload tex file with the equations for the shape parameters --- doc/src/Eqs/compute_shape_parameters.tex | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 doc/src/Eqs/compute_shape_parameters.tex diff --git a/doc/src/Eqs/compute_shape_parameters.tex b/doc/src/Eqs/compute_shape_parameters.tex new file mode 100644 index 0000000000..af7a6777f6 --- /dev/null +++ b/doc/src/Eqs/compute_shape_parameters.tex @@ -0,0 +1,12 @@ +\documentstyle[12pt]{article} + +\begin{document} + +\begin{eqnarray*} + c = l_z - 0.5(l_y+l_x) \\ + b = l_y - l_x \\ + k = \frac{3}{2} \frac{l_x^2+l_y^2+l_z^2}{(l_x+l_y+l_z)^2} - \frac{1}{2} +\end{eqnarray*} + +\end{document} + -- GitLab From 0be034ea46cb1013fcb04d23c343d50eb887a649 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 25 Jul 2019 11:03:41 +0200 Subject: [PATCH 200/236] Add files via upload txt file with the documentation of the new compute style --- doc/src/compute_gyration_shape.txt | 86 ++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 doc/src/compute_gyration_shape.txt diff --git a/doc/src/compute_gyration_shape.txt b/doc/src/compute_gyration_shape.txt new file mode 100644 index 0000000000..b9b62cfaa7 --- /dev/null +++ b/doc/src/compute_gyration_shape.txt @@ -0,0 +1,86 @@ +"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c + +:link(lws,http://lammps.sandia.gov) +:link(ld,Manual.html) +:link(lc,Commands_all.html) + +:line + +compute gyration/shape command :h3 + +[Syntax:] + +compute ID group-ID gyration computeID :pre + +ID, group-ID are documented in "compute"_compute.html command +gyration/shape = style name of this compute command +computeID = ID of "compute gyration"_compute_gyration.html command :ul + +[Examples:] + +compute 1 molecule gyration/shape pe :pre + +[Description:] + +Define a computation that calculates the eigenvalues of the gyration tensor of a +group of atoms and three shape parameters. The computation includes all effects +due to atoms passing thru periodic boundaries. + +The three computed shape parameters are the asphericity, b, the acylindricity, c, +and the relative shape anisotropy, k: + +:c,image(Eqs/compute_shape_parameters.jpg) + +where lx ≤ ly ≤ lz are the three eigenvalues of the gyration tensor. +The asphericity is always non-negative and zero only when the three principal +moments are equal. This zero condition is met when the distribution of particles +is spherically symmetric (hence the name asphericity) but also whenever the particle + distribution is symmetric with respect to the three coordinate axes, e.g., +when the particles are distributed uniformly on a cube, tetrahedron or other Platonic +solid. The acylindricity is always non-negative and zero only when the two principal +moments are equal. This zero condition is met when the distribution of particles is +cylindrically symmetric (hence the name, acylindricity), but also whenever the particle +distribution is symmetric with respect to the two coordinate axes, e.g., when the +particles are distributed uniformly on a regular prism. the relative shape anisotropy +is bounded between zero (if all points are spherically symmetric) and one +(if all points lie on a line). + +NOTE: The coordinates of an atom contribute to the gyration tensor in +"unwrapped" form, by using the image flags associated with each atom. +See the "dump custom"_dump.html command for a discussion of "unwrapped" +coordinates. See the Atoms section of the "read_data"_read_data.html +command for a discussion of image flags and how they are set for each +atom. You can reset the image flags (e.g. to 0) before invoking this +compute by using the "set image"_set.html command. + +[Output info:] + +This compute calculates a global vector of +length 6, which can be accessed by indices 1-6. The first three values are the +eigenvalues of the gyration tensor followed by the asphericity, the acylindricity +and the relative shape anisotropy. The computed values can be used by any command +that uses global vector values from a compute as input. See the "Howto +output"_Howto_output.html doc page for an overview of LAMMPS output +options. + +The vector values calculated by this compute are +"intensive". The first five vector values will be in +distance^2 "units"_units.html while the sixth one is dimensionless. + +[Restrictions:] + +This compute is part of the USER-MISC package. It is only enabled if +LAMMPS was built with that package. See the "Build +package"_Build_package.html doc page for more info. + +[Related commands:] + +"compute gyration"_compute_gyration.html + +[Default:] none + +:line + +:link(Theodorou) +[(Theodorou)] Theodorou, Suter, Macromolecules, 18, 1206 (1985). + -- GitLab From 1cebc5516e1093f21f7f87e345a27c51cf2b4355 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 25 Jul 2019 11:05:35 +0200 Subject: [PATCH 201/236] Update README Adding my e-mail to README --- src/USER-MISC/README | 1 + 1 file changed, 1 insertion(+) diff --git a/src/USER-MISC/README b/src/USER-MISC/README index 219e19673d..c5b9353415 100644 --- a/src/USER-MISC/README +++ b/src/USER-MISC/README @@ -30,6 +30,7 @@ compute ackland/atom, Gerolf Ziegenhain, gerolf at ziegenhain.com, 4 Oct 2007 compute basal/atom, Christopher Barrett, cdb333 at cavs.msstate.edu, 3 Mar 2013 compute cnp/atom, Paulo Branicio (USC), branicio at usc.edu, 31 May 2017 compute entropy/atom, Pablo Piaggi (EPFL), pablo.piaggi at epfl.ch, 15 June 2018 +compute gyration/shape, Evangelos Voyiatzis, evoyiatzis at gmail.com, 25 July 2019 compute pressure/cylinder, Cody K. Addington (NCSU), , 2 Oct 2018 compute stress/mop, Romain Vermorel (U Pau) & Laurent Joly (U Lyon), romain.vermorel at univ-pau.fr & ljoly.ulyon at gmail.com, 5 Sep 18 compute stress/mop/profile, Romain Vermorel (U Pau) & Laurent Joly (U Lyon), romain.vermorel at univ-pau.fr & ljoly.ulyon at gmail.com, 5 Sep 18 -- GitLab From 6e9252c8475f3c328e6df45a19f45dd7d0daae35 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 25 Jul 2019 11:10:36 +0200 Subject: [PATCH 202/236] Add files via upload The actual source code for the new compute --- src/USER-MISC/compute_gyration.cpp | 115 +++++++++++++++++++++++++ src/USER-MISC/compute_gyration_shape.h | 53 ++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 src/USER-MISC/compute_gyration.cpp create mode 100644 src/USER-MISC/compute_gyration_shape.h diff --git a/src/USER-MISC/compute_gyration.cpp b/src/USER-MISC/compute_gyration.cpp new file mode 100644 index 0000000000..f8d19853e0 --- /dev/null +++ b/src/USER-MISC/compute_gyration.cpp @@ -0,0 +1,115 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +#include +#include "compute_gyration.h" +#include "update.h" +#include "atom.h" +#include "group.h" +#include "domain.h" +#include "error.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +ComputeGyration::ComputeGyration(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg) +{ + if (narg != 3) error->all(FLERR,"Illegal compute gyration command"); + + scalar_flag = vector_flag = 1; + size_vector = 6; + extscalar = 0; + extvector = 0; + + vector = new double[6]; +} + +/* ---------------------------------------------------------------------- */ + +ComputeGyration::~ComputeGyration() +{ + delete [] vector; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeGyration::init() +{ + masstotal = group->mass(igroup); +} + +/* ---------------------------------------------------------------------- */ + +double ComputeGyration::compute_scalar() +{ + invoked_scalar = update->ntimestep; + + double xcm[3]; + if (group->dynamic[igroup]) masstotal = group->mass(igroup); + group->xcm(igroup,masstotal,xcm); + scalar = group->gyration(igroup,masstotal,xcm); + return scalar; +} + +/* ---------------------------------------------------------------------- + compute the radius-of-gyration tensor of group of atoms + around center-of-mass cm + must unwrap atoms to compute Rg tensor correctly +------------------------------------------------------------------------- */ + +void ComputeGyration::compute_vector() +{ + invoked_vector = update->ntimestep; + + double xcm[3]; + group->xcm(igroup,masstotal,xcm); + + double **x = atom->x; + int *mask = atom->mask; + int *type = atom->type; + imageint *image = atom->image; + double *mass = atom->mass; + double *rmass = atom->rmass; + int nlocal = atom->nlocal; + + double dx,dy,dz,massone; + double unwrap[3]; + + double rg[6]; + rg[0] = rg[1] = rg[2] = rg[3] = rg[4] = rg[5] = 0.0; + + for (int i = 0; i < nlocal; i++) + if (mask[i] & groupbit) { + if (rmass) massone = rmass[i]; + else massone = mass[type[i]]; + + domain->unmap(x[i],image[i],unwrap); + dx = unwrap[0] - xcm[0]; + dy = unwrap[1] - xcm[1]; + dz = unwrap[2] - xcm[2]; + + rg[0] += dx*dx * massone; + rg[1] += dy*dy * massone; + rg[2] += dz*dz * massone; + rg[3] += dx*dy * massone; + rg[4] += dx*dz * massone; + rg[5] += dy*dz * massone; + } + MPI_Allreduce(rg,vector,6,MPI_DOUBLE,MPI_SUM,world); + + if (masstotal > 0.0) + for (int i = 0; i < 6; i++) + vector[i] /= masstotal; +} diff --git a/src/USER-MISC/compute_gyration_shape.h b/src/USER-MISC/compute_gyration_shape.h new file mode 100644 index 0000000000..1b39dd2e38 --- /dev/null +++ b/src/USER-MISC/compute_gyration_shape.h @@ -0,0 +1,53 @@ +/* -*- c++ -*- ---------------------------------------------------------- + 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 COMPUTE_CLASS + +ComputeStyle(gyration/shape,ComputeGyrationShape) + +#else + +#ifndef LMP_COMPUTE_GYRATION_SHAPE_H +#define LMP_COMPUTE_GYRATION_SHAPE_H + +#include "compute.h" + +namespace LAMMPS_NS { + +class ComputeGyrationShape : public Compute { + public: + char *id_gyration; // fields accessed by other classes + + ComputeGyrationShape(class LAMMPS *, int, char **); + ~ComputeGyrationShape(); + void init(); + void compute_vector(); + + private: + class Compute *c_gyration; +}; + +} + +#endif +#endif + +/* ERROR/WARNING messages: + +E: Illegal ... command + +Self-explanatory. Check the input script syntax and compare to the +documentation for the command. You can use -echo screen as a +command-line option when running LAMMPS to see the offending line. + +*/ -- GitLab From 6710cc40527519efae40c349ec468cb4cc133dd3 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 25 Jul 2019 11:44:43 +0200 Subject: [PATCH 203/236] cpp file for the compute command The right file with the cpp code --- src/USER-MISC/compute_gyration_shape.cpp | 133 +++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 src/USER-MISC/compute_gyration_shape.cpp diff --git a/src/USER-MISC/compute_gyration_shape.cpp b/src/USER-MISC/compute_gyration_shape.cpp new file mode 100644 index 0000000000..0e566e671f --- /dev/null +++ b/src/USER-MISC/compute_gyration_shape.cpp @@ -0,0 +1,133 @@ +/* ---------------------------------------------------------------------- + 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. +------------------------------------------------------------------------- */ + +/* ---------------------------------------------------------------------- + * Contributing author: Evangelos Voyiatzis (Royal DSM) + * ------------------------------------------------------------------------- */ + + +#include +#include +#include "compute_gyration_shape.h" +#include "math_extra.h" +#include "update.h" +#include "atom.h" +#include "group.h" +#include "domain.h" +#include "error.h" +#include "modify.h" +#include "compute.h" + +using namespace LAMMPS_NS; + +/* ---------------------------------------------------------------------- */ + +ComputeGyrationShape::ComputeGyrationShape(LAMMPS *lmp, int narg, char **arg) : + Compute(lmp, narg, arg), id_gyration(NULL) +{ + if (narg != 4) error->all(FLERR,"Illegal compute gyration/shape command"); + + vector_flag = 1; + size_vector = 6; + extscalar = 0; + extvector = 0; + + // ID of compute gyration + int n = strlen(arg[3]) + 1; + id_gyration = new char[n]; + strcpy(id_gyration,arg[3]); + + init(); + + vector = new double[6]; +} + +/* ---------------------------------------------------------------------- */ + +ComputeGyrationShape::~ComputeGyrationShape() +{ + delete [] id_gyration; + delete [] vector; +} + +/* ---------------------------------------------------------------------- */ + +void ComputeGyrationShape::init() +{ + // check that the compute gyration command exist + int icompute = modify->find_compute(id_gyration); + if (icompute < 0) + error->all(FLERR,"Compute gyration does not exist for compute gyration/shape"); + + // check the id_gyration corresponds really to a compute gyration command + c_gyration = (Compute *) modify->compute[icompute]; + if (strcmp(c_gyration->style,"gyration") != 0) + error->all(FLERR,"Compute gyration/shape does not use gyration compute"); +} + +/* ---------------------------------------------------------------------- + compute shape parameters based on the eigenvalues of the gyration tensor of group of atoms +------------------------------------------------------------------------- */ + +void ComputeGyrationShape::compute_vector() +{ + invoked_vector = update->ntimestep; + + // get the gyration tensor from the compute gyration + int icompute = modify->find_compute(id_gyration); + Compute *compute = modify->compute[icompute]; + compute->compute_vector(); + double *gyration_tensor = compute->vector; + + // call the function for the calculation of the eigenvalues + double ione[3][3], evalues[3], evectors[3][3]; + + ione[0][0] = gyration_tensor[0]; + ione[1][1] = gyration_tensor[1]; + ione[2][2] = gyration_tensor[2]; + ione[0][1] = ione[1][0] = gyration_tensor[3]; + ione[1][2] = ione[2][1] = gyration_tensor[4]; + ione[0][2] = ione[2][0] = gyration_tensor[5]; + + int ierror = MathExtra::jacobi(ione,evalues,evectors); + if (ierror) error->all(FLERR, "Insufficient Jacobi rotations for gyration/shape"); + + // sort the eigenvalues according to their size with bubble sort + double t; + for (int i = 0; i < 3; i++) { + for (int j = 0; j < 2-i; j++) { + if (fabs(evalues[j]) < fabs(evalues[j+1])) { + t = evalues[j]; + evalues[j] = evalues[j+1]; + evalues[j+1] = t; + } + } + } + + // compute the shape parameters of the gyration tensor + double sq_eigen_x = pow(evalues[0], 2); + double sq_eigen_y = pow(evalues[1], 2); + double sq_eigen_z = pow(evalues[2], 2); + + double nominator = pow(sq_eigen_x, 2) + pow(sq_eigen_y, 2) + pow(sq_eigen_z, 2); + double denominator = pow(sq_eigen_x+sq_eigen_y+sq_eigen_z, 2); + + vector[0] = evalues[0]; + vector[1] = evalues[1]; + vector[2] = evalues[2]; + vector[3] = sq_eigen_z - 0.5*(sq_eigen_x + sq_eigen_y); + vector[4] = sq_eigen_y - sq_eigen_x; + vector[5] = 0.5*(3*nominator/denominator -1); + +} + -- GitLab From 114a754a72b19eec8e3aa28ce328018263530577 Mon Sep 17 00:00:00 2001 From: Evangelos Voyiatzis Date: Thu, 25 Jul 2019 11:48:04 +0200 Subject: [PATCH 204/236] Delete compute_gyration.cpp It is not part of the new compute style --- src/USER-MISC/compute_gyration.cpp | 115 ----------------------------- 1 file changed, 115 deletions(-) delete mode 100644 src/USER-MISC/compute_gyration.cpp diff --git a/src/USER-MISC/compute_gyration.cpp b/src/USER-MISC/compute_gyration.cpp deleted file mode 100644 index f8d19853e0..0000000000 --- a/src/USER-MISC/compute_gyration.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* ---------------------------------------------------------------------- - 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. -------------------------------------------------------------------------- */ - -#include -#include "compute_gyration.h" -#include "update.h" -#include "atom.h" -#include "group.h" -#include "domain.h" -#include "error.h" - -using namespace LAMMPS_NS; - -/* ---------------------------------------------------------------------- */ - -ComputeGyration::ComputeGyration(LAMMPS *lmp, int narg, char **arg) : - Compute(lmp, narg, arg) -{ - if (narg != 3) error->all(FLERR,"Illegal compute gyration command"); - - scalar_flag = vector_flag = 1; - size_vector = 6; - extscalar = 0; - extvector = 0; - - vector = new double[6]; -} - -/* ---------------------------------------------------------------------- */ - -ComputeGyration::~ComputeGyration() -{ - delete [] vector; -} - -/* ---------------------------------------------------------------------- */ - -void ComputeGyration::init() -{ - masstotal = group->mass(igroup); -} - -/* ---------------------------------------------------------------------- */ - -double ComputeGyration::compute_scalar() -{ - invoked_scalar = update->ntimestep; - - double xcm[3]; - if (group->dynamic[igroup]) masstotal = group->mass(igroup); - group->xcm(igroup,masstotal,xcm); - scalar = group->gyration(igroup,masstotal,xcm); - return scalar; -} - -/* ---------------------------------------------------------------------- - compute the radius-of-gyration tensor of group of atoms - around center-of-mass cm - must unwrap atoms to compute Rg tensor correctly -------------------------------------------------------------------------- */ - -void ComputeGyration::compute_vector() -{ - invoked_vector = update->ntimestep; - - double xcm[3]; - group->xcm(igroup,masstotal,xcm); - - double **x = atom->x; - int *mask = atom->mask; - int *type = atom->type; - imageint *image = atom->image; - double *mass = atom->mass; - double *rmass = atom->rmass; - int nlocal = atom->nlocal; - - double dx,dy,dz,massone; - double unwrap[3]; - - double rg[6]; - rg[0] = rg[1] = rg[2] = rg[3] = rg[4] = rg[5] = 0.0; - - for (int i = 0; i < nlocal; i++) - if (mask[i] & groupbit) { - if (rmass) massone = rmass[i]; - else massone = mass[type[i]]; - - domain->unmap(x[i],image[i],unwrap); - dx = unwrap[0] - xcm[0]; - dy = unwrap[1] - xcm[1]; - dz = unwrap[2] - xcm[2]; - - rg[0] += dx*dx * massone; - rg[1] += dy*dy * massone; - rg[2] += dz*dz * massone; - rg[3] += dx*dy * massone; - rg[4] += dx*dz * massone; - rg[5] += dy*dz * massone; - } - MPI_Allreduce(rg,vector,6,MPI_DOUBLE,MPI_SUM,world); - - if (masstotal > 0.0) - for (int i = 0; i < 6; i++) - vector[i] /= masstotal; -} -- GitLab From 4586fd50af7143b7349399ceee2ac7629af7a0ec Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 Jul 2019 08:33:21 -0400 Subject: [PATCH 205/236] adjust logic for choosing the communication cutoff to requests from @sjplimp limit cases where warning about adjusting the comm cutoff is printed. --- src/comm.cpp | 53 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 33 insertions(+), 20 deletions(-) diff --git a/src/comm.cpp b/src/comm.cpp index 4e605808af..ae2715f0fd 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -588,39 +588,52 @@ void Comm::set_proc_grid(int outflag) /* ---------------------------------------------------------------------- determine suitable communication cutoff. - it is the maximum of the user specified value and estimates based on - the maximum neighbor list cutoff and largest bond equilibrium length. - we use the 1.5x the bond equilibrium distance as cutoff, if only a - bond style exists or only bond and angle styles exists. If dihedrals - or impropers are present we multiply by 2.0. This plus the - "neighbor list skin" will become the default communication cutoff, if - no pair style is defined and thus avoids all kinds of unexpected behavior - for such systems. If a pair style exists, the result is the maximum of - the bond based cutoff and the largest pair cutoff and the user - specified communication cutoff. + use the larger of the user specified value and the cutoff required + by the neighborlist build for pair styles. + if bonded interactions exist, apply a heuristic based on the equilibrium + bond length (use 1.5x r_bond if no dihedral or improper style exists + otherwise 2x r_bond) plus neighbor list skin. + if no user specified communication cutoff is given include this + heuristic, otherwise ignore it. + print a warning, if a user specified communication cutoff is overridden. ------------------------------------------------------------------------- */ double Comm::get_comm_cutoff() { double maxcommcutoff = 0.0; + double maxbondcutoff = 0.0; + if (force->bond) { int n = atom->nbondtypes; for (int i = 1; i <= n; ++i) - maxcommcutoff = MAX(maxcommcutoff,force->bond->equilibrium_distance(i)); + maxbondcutoff = MAX(maxbondcutoff,force->bond->equilibrium_distance(i)); if (force->dihedral || force->improper) { - maxcommcutoff *= 2.0; + maxbondcutoff *= 2.0; } else { - maxcommcutoff *=1.5; + maxbondcutoff *=1.5; } - maxcommcutoff += neighbor->skin; + maxbondcutoff += neighbor->skin; } - maxcommcutoff = MAX(maxcommcutoff,neighbor->cutneighmax); - maxcommcutoff = MAX(maxcommcutoff,cutghostuser); - if ((me == 0) && (cutghostuser > 0.0) && (maxcommcutoff > cutghostuser)) { - char mesg[128]; - snprintf(mesg,128,"Communication cutoff is changed to %g",maxcommcutoff); - error->warning(FLERR,mesg); + + // always take the larger of max neighbor list and user specified cutoff + + maxcommcutoff = MAX(cutghostuser,neighbor->cutneighmax); + + // consider cutoff estimate from bond length only if no user specified cutoff + + if (cutghostuser == 0.0) maxcommcutoff = MAX(maxcommcutoff,maxbondcutoff); + + // print warning if neighborlist cutoff overrides user cutoff or + // applied bond based cutoff is larger than neighbor cutoff. + + if (me == 0) { + if ( ((cutghostuser > 0.0) && (maxcommcutoff > cutghostuser)) + || ((cutghostuser == 0.0) && (maxcommcutoff == maxbondcutoff)) ) { + char mesg[128]; + snprintf(mesg,128,"Communication cutoff adjusted to %g",maxcommcutoff); + error->warning(FLERR,mesg); + } } return maxcommcutoff; -- GitLab From 183d92cad777efd998981b0b1f3c36752fa9c256 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 Jul 2019 08:42:48 -0400 Subject: [PATCH 206/236] update comm_modify documentation --- doc/src/comm_modify.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/src/comm_modify.txt b/doc/src/comm_modify.txt index 482259142b..d5f5aecf54 100644 --- a/doc/src/comm_modify.txt +++ b/doc/src/comm_modify.txt @@ -72,6 +72,15 @@ greater than the neighbor cutoff, then extra ghost atoms will be acquired. If the provided cutoff is smaller, the provided value will be ignored and the ghost cutoff is set to the neighbor cutoff. Specifying a cutoff value of 0.0 will reset any previous value to the default. +If bonded interactions exist and equilibrium bond length information is +available, then also a heuristic based on that bond length (2.0x {r_eq} +for systems with dihedrals or improper, 1.5x {r_eq} without) plus +neighbor skin is applied if the communication cutoff is set to its +default value of 0.0. This avoids problems for systems without a pair +style or where the non-bonded cutoff is (much) shorter than the largest +bond lengths. A warning message is printed, if a specified +communication cutoff > 0.0 is overridden or the bond length heuristics +lead to a larger communication cutoff. The {cutoff/multi} option is equivalent to {cutoff}, but applies to communication mode {multi} instead. Since in this case the communication -- GitLab From ca291f1015a1606c3f529ad69f42b98697ae9fb7 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 25 Jul 2019 11:47:56 -0500 Subject: [PATCH 207/236] Update to kim-api-2.1.1 --- cmake/Modules/Packages/KIM.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 5c0b8e2ee8..1a9dcf83a4 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -21,8 +21,8 @@ if(PKG_KIM) enable_language(Fortran) include(ExternalProject) ExternalProject_Add(kim_build - URL https://s3.openkim.org/kim-api/kim-api-2.1.0.txz - URL_MD5 9ada58e677a545a1987b1ecb98e39d7e + URL https://s3.openkim.org/kim-api/kim-api-2.1.1.txz + URL_MD5 ae0ee413e026c6e93d35692db5966fb4 BINARY_DIR build CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- GitLab From fadb40051ba753d6534d7f6d128dc3eb1e00fe69 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 25 Jul 2019 14:03:35 -0500 Subject: [PATCH 208/236] Update kim_query & clear and update examples/kim --- ....kim.lj.simulator_model => in.kim-ex.melt} | 6 +- examples/kim/in.kim-pm-query.melt | 37 +++++ .../{in.kim.lj.newton-off => in.kim-pm.melt} | 19 +-- examples/kim/in.kim-sm.melt | 36 +++++ examples/kim/in.kim.lj.lmp.newton-off | 35 ----- examples/kim/in.kim.lj.newton-on | 41 ------ ...in.kim.lj.lmp.newton-on => in.lammps.melt} | 4 +- examples/kim/in.query | 12 -- .../log.06Feb2019.in.kim.lj.lmp.newton-off.1 | 55 -------- .../log.06Feb2019.in.kim.lj.lmp.newton-off.4 | 55 -------- .../log.06Feb2019.in.kim.lj.lmp.newton-on.1 | 55 -------- .../log.06Feb2019.in.kim.lj.lmp.newton-on.4 | 55 -------- .../kim/log.06Feb2019.in.kim.lj.newton-off.1 | 59 -------- .../kim/log.06Feb2019.in.kim.lj.newton-off.4 | 65 --------- .../kim/log.06Feb2019.in.kim.lj.newton-on.1 | 59 -------- .../kim/log.06Feb2019.in.kim.lj.newton-on.4 | 65 --------- examples/kim/log.22Mar2019.query.g++.1 | 34 ----- ...og.30Apr2019.kim.VOH.simulator_model.g++.1 | 92 ------------ ....30Apr2019.kim.ex_si.simulator_model.g++.1 | 132 ------------------ ....30Apr2019.kim.ex_si.simulator_model.g++.4 | 132 ------------------ ...log.30Apr2019.kim.lj.simulator_model.g++.1 | 104 -------------- ...log.30Apr2019.kim.lj.simulator_model.g++.4 | 104 -------------- src/KIM/kim_query.cpp | 3 +- 23 files changed, 86 insertions(+), 1173 deletions(-) rename examples/kim/{in.kim.lj.simulator_model => in.kim-ex.melt} (82%) create mode 100644 examples/kim/in.kim-pm-query.melt rename examples/kim/{in.kim.lj.newton-off => in.kim-pm.melt} (52%) create mode 100644 examples/kim/in.kim-sm.melt delete mode 100644 examples/kim/in.kim.lj.lmp.newton-off delete mode 100644 examples/kim/in.kim.lj.newton-on rename examples/kim/{in.kim.lj.lmp.newton-on => in.lammps.melt} (91%) delete mode 100644 examples/kim/in.query delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.1 delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.4 delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.1 delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.4 delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.newton-off.1 delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.newton-off.4 delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.newton-on.1 delete mode 100644 examples/kim/log.06Feb2019.in.kim.lj.newton-on.4 delete mode 100644 examples/kim/log.22Mar2019.query.g++.1 delete mode 100644 examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 delete mode 100644 examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 delete mode 100644 examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 delete mode 100644 examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 delete mode 100644 examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 diff --git a/examples/kim/in.kim.lj.simulator_model b/examples/kim/in.kim-ex.melt similarity index 82% rename from examples/kim/in.kim.lj.simulator_model rename to examples/kim/in.kim-ex.melt index cb7a2e14ed..5cc3dbc61b 100644 --- a/examples/kim/in.kim.lj.simulator_model +++ b/examples/kim/in.kim-ex.melt @@ -14,15 +14,14 @@ variable xx equal 20*$x variable yy equal 20*$y variable zz equal 20*$z -kim_init Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu real unit_conversion_mode -newton on +kim_init LennardJones_Ar real lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} create_box 1 box create_atoms 1 box -kim_interactions Au +kim_interactions Ar mass 1 39.95 velocity all create 200.0 232345 loop geom @@ -31,5 +30,6 @@ neighbor 0.3 bin neigh_modify delay 0 every 1 check yes fix 1 all nve +#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 run 100 diff --git a/examples/kim/in.kim-pm-query.melt b/examples/kim/in.kim-pm-query.melt new file mode 100644 index 0000000000..d39dd2d464 --- /dev/null +++ b/examples/kim/in.kim-pm-query.melt @@ -0,0 +1,37 @@ +# 3d Lennard-Jones melt +# +# This example requires that the KIM Portable Model (PM) +# SW_StillingerWeber_1985_Si__MO_405512056662_005 +# is installed. This can be done with the command +# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005 +# Or, see https://openkim.org/doc/obtaining-models for alternative options. +# + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real +kim_query a0 get_lattice_constant_cubic crystal=["fcc"] species=["Si"] units=["angstrom"] + +lattice fcc ${a0} +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box + +kim_interactions Si + +mass 1 39.95 +velocity all create 200.0 232345 loop geom + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 all nve +#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 + +run 100 diff --git a/examples/kim/in.kim.lj.newton-off b/examples/kim/in.kim-pm.melt similarity index 52% rename from examples/kim/in.kim.lj.newton-off rename to examples/kim/in.kim-pm.melt index 82cf5ba602..999cf77180 100644 --- a/examples/kim/in.kim.lj.newton-off +++ b/examples/kim/in.kim-pm.melt @@ -1,9 +1,10 @@ # 3d Lennard-Jones melt # -# This example requires that the example models provided with -# the kim-api package are installed. see the ./lib/kim/README or -# ./lib/kim/Install.py files for details on how to install these -# example models. +# This example requires that the KIM Portable Model (PM) +# SW_StillingerWeber_1985_Si__MO_405512056662_005 +# is installed. This can be done with the command +# kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005 +# Or, see https://openkim.org/doc/obtaining-models for alternative options. # variable x index 1 @@ -14,20 +15,14 @@ variable xx equal 20*$x variable yy equal 20*$y variable zz equal 20*$z -units metal -atom_style atomic -newton off +kim_init SW_StillingerWeber_1985_Si__MO_405512056662_005 real lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} create_box 1 box create_atoms 1 box -#pair_style lj/cut 8.1500 -#pair_coeff 1 1 0.0104 3.4000 - -pair_style kim LennardJones_Ar -pair_coeff * * Ar +kim_interactions Si mass 1 39.95 velocity all create 200.0 232345 loop geom diff --git a/examples/kim/in.kim-sm.melt b/examples/kim/in.kim-sm.melt new file mode 100644 index 0000000000..32f8c6170f --- /dev/null +++ b/examples/kim/in.kim-sm.melt @@ -0,0 +1,36 @@ +# 3d Lennard-Jones melt +# +# This example requires that the KIM Simulator Model (PM) +# Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 +# is installed. This can be done with the command +# kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 +# Or, see https://openkim.org/doc/obtaining-models for alternative options. +# + +variable x index 1 +variable y index 1 +variable z index 1 + +variable xx equal 20*$x +variable yy equal 20*$y +variable zz equal 20*$z + +kim_init Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 real + +lattice fcc 4.4300 +region box block 0 ${xx} 0 ${yy} 0 ${zz} +create_box 1 box +create_atoms 1 box + +kim_interactions O + +mass 1 39.95 +velocity all create 200.0 232345 loop geom + +neighbor 0.3 bin +neigh_modify delay 0 every 1 check yes + +fix 1 all nve +#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 + +run 100 diff --git a/examples/kim/in.kim.lj.lmp.newton-off b/examples/kim/in.kim.lj.lmp.newton-off deleted file mode 100644 index 197755294a..0000000000 --- a/examples/kim/in.kim.lj.lmp.newton-off +++ /dev/null @@ -1,35 +0,0 @@ -# 3d Lennard-Jones melt - -variable x index 1 -variable y index 1 -variable z index 1 - -variable xx equal 20*$x -variable yy equal 20*$y -variable zz equal 20*$z - -units metal -atom_style atomic -newton off - -lattice fcc 4.4300 -region box block 0 ${xx} 0 ${yy} 0 ${zz} -create_box 1 box -create_atoms 1 box - -pair_style lj/cut 8.1500 -pair_coeff 1 1 0.0104 3.4000 - -#pair_style kim LennardJones_Ar -#pair_coeff * * Ar - -mass 1 39.95 -velocity all create 200.0 232345 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 - -run 100 diff --git a/examples/kim/in.kim.lj.newton-on b/examples/kim/in.kim.lj.newton-on deleted file mode 100644 index 3a95f1dbb0..0000000000 --- a/examples/kim/in.kim.lj.newton-on +++ /dev/null @@ -1,41 +0,0 @@ -# 3d Lennard-Jones melt -# -# This example requires that the example models provided with -# the kim-api package are installed. see the ./lib/kim/README or -# ./lib/kim/Install.py files for details on how to install these -# example models. -# - -variable x index 1 -variable y index 1 -variable z index 1 - -variable xx equal 20*$x -variable yy equal 20*$y -variable zz equal 20*$z - -units metal -atom_style atomic -newton on - -lattice fcc 4.4300 -region box block 0 ${xx} 0 ${yy} 0 ${zz} -create_box 1 box -create_atoms 1 box - -#pair_style lj/cut 8.1500 -#pair_coeff 1 1 0.0104 3.4000 - -pair_style kim LennardJones_Ar -pair_coeff * * Ar - -mass 1 39.95 -velocity all create 200.0 232345 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 - -run 100 diff --git a/examples/kim/in.kim.lj.lmp.newton-on b/examples/kim/in.lammps.melt similarity index 91% rename from examples/kim/in.kim.lj.lmp.newton-on rename to examples/kim/in.lammps.melt index f9f79e2bb2..5792f3a5db 100644 --- a/examples/kim/in.kim.lj.lmp.newton-on +++ b/examples/kim/in.lammps.melt @@ -8,9 +8,7 @@ variable xx equal 20*$x variable yy equal 20*$y variable zz equal 20*$z -units metal -atom_style atomic -newton on +units real lattice fcc 4.4300 region box block 0 ${xx} 0 ${yy} 0 ${zz} diff --git a/examples/kim/in.query b/examples/kim/in.query deleted file mode 100644 index 72e739fb52..0000000000 --- a/examples/kim/in.query +++ /dev/null @@ -1,12 +0,0 @@ - -# example for performing a query to the OpenKIM test database to retrieve -# a parameter to be used in the input. here it requests the aluminium -# lattice constant for a specific test used for a specific model and then -# assigns it to the variable 'latconst' - -kim_init EAM_CubicNaturalSpline_ErcolessiAdams_1994_Al__MO_800509458712_002 metal -info variables out log -kim_query latconst split get_test_result test=TE_156715955670 species=["Al"] prop=structure-cubic-crystal-npt keys=["a","a"] units=["angstrom","angstrom"] -info variables out log -lattice fcc ${latconst_1} -lattice fcc ${latconst_2} diff --git a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.1 b/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.1 deleted file mode 100644 index 5925fd750d..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.1 +++ /dev/null @@ -1,55 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 1 by 1 MPI processor grid -Created 32000 atoms - Time spent = 0.004499 secs -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton off - pair build: half/bin/newtoff - stencil: half/bin/3d/newtoff - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 20.37 | 20.37 | 20.37 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 2.92885 on 1 procs for 100 steps with 32000 atoms - -Performance: 2.950 ns/day, 8.136 hours/ns, 34.143 timesteps/s -99.1% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.5638 | 2.5638 | 2.5638 | 0.0 | 87.54 -Neigh | 0.31935 | 0.31935 | 0.31935 | 0.0 | 10.90 -Comm | 0.006833 | 0.006833 | 0.006833 | 0.0 | 0.23 -Output | 0.000107 | 0.000107 | 0.000107 | 0.0 | 0.00 -Modify | 0.027806 | 0.027806 | 0.027806 | 0.0 | 0.95 -Other | | 0.01091 | | | 0.37 - -Nlocal: 32000 ave 32000 max 32000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 19911 ave 19911 max 19911 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 2.3705e+06 ave 2.3705e+06 max 2.3705e+06 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 2370499 -Ave neighs/atom = 74.0781 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:03 diff --git a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.4 b/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.4 deleted file mode 100644 index c1ca108c7b..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-off.4 +++ /dev/null @@ -1,55 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 2 by 2 MPI processor grid -Created 32000 atoms - Time spent = 0.001039 secs -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton off - pair build: half/bin/newtoff - stencil: half/bin/3d/newtoff - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 8.013 | 8.013 | 8.013 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 0.778581 on 4 procs for 100 steps with 32000 atoms - -Performance: 11.097 ns/day, 2.163 hours/ns, 128.439 timesteps/s -99.8% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.65171 | 0.65891 | 0.67656 | 1.3 | 84.63 -Neigh | 0.07924 | 0.079548 | 0.07997 | 0.1 | 10.22 -Comm | 0.006755 | 0.0069015 | 0.007072 | 0.2 | 0.89 -Output | 4.6e-05 | 9.725e-05 | 0.000203 | 0.0 | 0.01 -Modify | 0.006841 | 0.006941 | 0.007015 | 0.1 | 0.89 -Other | | 0.02618 | | | 3.36 - -Nlocal: 8000 ave 8018 max 7967 min -Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 9131 ave 9164 max 9113 min -Histogram: 2 0 0 1 0 0 0 0 0 1 -Neighs: 630904 ave 632094 max 628209 min -Histogram: 1 0 0 0 0 0 0 1 0 2 - -Total # of neighbors = 2523614 -Ave neighs/atom = 78.8629 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.1 b/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.1 deleted file mode 100644 index 53555743d7..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.1 +++ /dev/null @@ -1,55 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 1 by 1 MPI processor grid -Created 32000 atoms - Time spent = 0.003479 secs -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/atomonly/newton - stencil: half/bin/3d/newton - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 19.23 | 19.23 | 19.23 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 2.17978 on 1 procs for 100 steps with 32000 atoms - -Performance: 3.964 ns/day, 6.055 hours/ns, 45.876 timesteps/s -99.9% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.9892 | 1.9892 | 1.9892 | 0.0 | 91.26 -Neigh | 0.14506 | 0.14506 | 0.14506 | 0.0 | 6.65 -Comm | 0.011049 | 0.011049 | 0.011049 | 0.0 | 0.51 -Output | 9.1e-05 | 9.1e-05 | 9.1e-05 | 0.0 | 0.00 -Modify | 0.02347 | 0.02347 | 0.02347 | 0.0 | 1.08 -Other | | 0.01094 | | | 0.50 - -Nlocal: 32000 ave 32000 max 32000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 19911 ave 19911 max 19911 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 2.12688e+06 ave 2.12688e+06 max 2.12688e+06 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 2126875 -Ave neighs/atom = 66.4648 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:02 diff --git a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.4 b/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.4 deleted file mode 100644 index f0fdf66193..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.lmp.newton-on.4 +++ /dev/null @@ -1,55 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 2 by 2 MPI processor grid -Created 32000 atoms - Time spent = 0.000919 secs -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair lj/cut, perpetual - attributes: half, newton on - pair build: half/bin/atomonly/newton - stencil: half/bin/3d/newton - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 7.632 | 7.632 | 7.632 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 0.63515 on 4 procs for 100 steps with 32000 atoms - -Performance: 13.603 ns/day, 1.764 hours/ns, 157.443 timesteps/s -99.8% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.55365 | 0.5566 | 0.55868 | 0.2 | 87.63 -Neigh | 0.041495 | 0.0418 | 0.04211 | 0.1 | 6.58 -Comm | 0.019086 | 0.021075 | 0.023898 | 1.2 | 3.32 -Output | 4.4e-05 | 5.025e-05 | 6e-05 | 0.0 | 0.01 -Modify | 0.009315 | 0.0093595 | 0.009422 | 0.0 | 1.47 -Other | | 0.006263 | | | 0.99 - -Nlocal: 8000 ave 8018 max 7967 min -Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 9131 ave 9164 max 9113 min -Histogram: 2 0 0 1 0 0 0 0 0 1 -Neighs: 531719 ave 533273 max 529395 min -Histogram: 1 0 0 0 1 0 0 0 0 2 - -Total # of neighbors = 2126875 -Ave neighs/atom = 66.4648 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/kim/log.06Feb2019.in.kim.lj.newton-off.1 b/examples/kim/log.06Feb2019.in.kim.lj.newton-off.1 deleted file mode 100644 index 0ab258fe0d..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.newton-off.1 +++ /dev/null @@ -1,59 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 1 by 1 MPI processor grid -Created 32000 atoms - Time spent = 0.003446 secs -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair kim, perpetual - attributes: full, newton off, cut 8.45 - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 28.51 | 28.51 | 28.51 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 3.01669 on 1 procs for 100 steps with 32000 atoms - -Performance: 2.864 ns/day, 8.380 hours/ns, 33.149 timesteps/s -99.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.6562 | 2.6562 | 2.6562 | 0.0 | 88.05 -Neigh | 0.31903 | 0.31903 | 0.31903 | 0.0 | 10.58 -Comm | 0.00634 | 0.00634 | 0.00634 | 0.0 | 0.21 -Output | 9.1e-05 | 9.1e-05 | 9.1e-05 | 0.0 | 0.00 -Modify | 0.024723 | 0.024723 | 0.024723 | 0.0 | 0.82 -Other | | 0.01032 | | | 0.34 - -Nlocal: 32000 ave 32000 max 32000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 19911 ave 19911 max 19911 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 4.25375e+06 ave 4.25375e+06 max 4.25375e+06 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 4253750 -Ave neighs/atom = 132.93 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:03 diff --git a/examples/kim/log.06Feb2019.in.kim.lj.newton-off.4 b/examples/kim/log.06Feb2019.in.kim.lj.newton-off.4 deleted file mode 100644 index c17ea6afb7..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.newton-off.4 +++ /dev/null @@ -1,65 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 2 by 2 MPI processor grid -Created 32000 atoms - Time spent = 0.000921 secs -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair kim, perpetual - attributes: full, newton off, cut 8.45 - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 10.05 | 10.05 | 10.05 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 0.890192 on 4 procs for 100 steps with 32000 atoms - -Performance: 9.706 ns/day, 2.473 hours/ns, 112.335 timesteps/s -99.7% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.77867 | 0.77906 | 0.7794 | 0.0 | 87.52 -Neigh | 0.087831 | 0.088176 | 0.088805 | 0.1 | 9.91 -Comm | 0.006358 | 0.0065898 | 0.006815 | 0.3 | 0.74 -Output | 4.9e-05 | 5.975e-05 | 6.8e-05 | 0.0 | 0.01 -Modify | 0.010265 | 0.010429 | 0.010678 | 0.2 | 1.17 -Other | | 0.005874 | | | 0.66 - -Nlocal: 8000 ave 8018 max 7967 min -Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 9131 ave 9164 max 9113 min -Histogram: 2 0 0 1 0 0 0 0 0 1 -Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 1.06344e+06 ave 1.06594e+06 max 1.05881e+06 min -Histogram: 1 0 0 0 0 0 1 0 0 2 - -Total # of neighbors = 4253750 -Ave neighs/atom = 132.93 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/kim/log.06Feb2019.in.kim.lj.newton-on.1 b/examples/kim/log.06Feb2019.in.kim.lj.newton-on.1 deleted file mode 100644 index 59d018e12a..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.newton-on.1 +++ /dev/null @@ -1,59 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 1 by 1 MPI processor grid -Created 32000 atoms - Time spent = 0.003089 secs -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair kim, perpetual - attributes: full, newton off, cut 8.45 - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 28.12 | 28.12 | 28.12 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 3.05849 on 1 procs for 100 steps with 32000 atoms - -Performance: 2.825 ns/day, 8.496 hours/ns, 32.696 timesteps/s -99.6% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 2.6786 | 2.6786 | 2.6786 | 0.0 | 87.58 -Neigh | 0.33105 | 0.33105 | 0.33105 | 0.0 | 10.82 -Comm | 0.012602 | 0.012602 | 0.012602 | 0.0 | 0.41 -Output | 9.5e-05 | 9.5e-05 | 9.5e-05 | 0.0 | 0.00 -Modify | 0.024858 | 0.024858 | 0.024858 | 0.0 | 0.81 -Other | | 0.01132 | | | 0.37 - -Nlocal: 32000 ave 32000 max 32000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 19911 ave 19911 max 19911 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 4.25375e+06 ave 4.25375e+06 max 4.25375e+06 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 4253750 -Ave neighs/atom = 132.93 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:03 diff --git a/examples/kim/log.06Feb2019.in.kim.lj.newton-on.4 b/examples/kim/log.06Feb2019.in.kim.lj.newton-on.4 deleted file mode 100644 index da8c9f0faa..0000000000 --- a/examples/kim/log.06Feb2019.in.kim.lj.newton-on.4 +++ /dev/null @@ -1,65 +0,0 @@ -LAMMPS (1 Feb 2019) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (src/comm.cpp:87) - using 1 OpenMP thread(s) per MPI task -Lattice spacing in x,y,z = 4.43 4.43 4.43 -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 2 by 2 MPI processor grid -Created 32000 atoms - Time spent = 0.000893 secs -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:1097) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:1102) -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair kim, perpetual - attributes: full, newton off, cut 8.45 - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Setting up Verlet run ... - Unit style : metal - Current step : 0 - Time step : 0.001 -Per MPI rank memory allocation (min/avg/max) = 9.789 | 9.789 | 9.789 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 0.903182 on 4 procs for 100 steps with 32000 atoms - -Performance: 9.566 ns/day, 2.509 hours/ns, 110.720 timesteps/s -99.6% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.76173 | 0.76349 | 0.76597 | 0.2 | 84.53 -Neigh | 0.088773 | 0.088938 | 0.089074 | 0.0 | 9.85 -Comm | 0.032018 | 0.03452 | 0.03638 | 0.9 | 3.82 -Output | 4e-05 | 4.425e-05 | 5.2e-05 | 0.0 | 0.00 -Modify | 0.009278 | 0.0093917 | 0.009528 | 0.1 | 1.04 -Other | | 0.006797 | | | 0.75 - -Nlocal: 8000 ave 8018 max 7967 min -Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 9131 ave 9164 max 9113 min -Histogram: 2 0 0 1 0 0 0 0 0 1 -Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 1.06344e+06 ave 1.06594e+06 max 1.05881e+06 min -Histogram: 1 0 0 0 0 0 1 0 0 2 - -Total # of neighbors = 4253750 -Ave neighs/atom = 132.93 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:00 diff --git a/examples/kim/log.22Mar2019.query.g++.1 b/examples/kim/log.22Mar2019.query.g++.1 deleted file mode 100644 index 034bb13bba..0000000000 --- a/examples/kim/log.22Mar2019.query.g++.1 +++ /dev/null @@ -1,34 +0,0 @@ -LAMMPS (28 Feb 2019) - -# example for performing a query to the OpenKIM test database to retrieve -# a parameter to be used in the input. here it requests the aluminium -# lattice constant for a specific test used for a specific model and then -# assigns it to the variable 'latconst' - -units metal -info variables out log - -Info-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info -Printed on Fri Mar 22 20:00:56 2019 - - -Variable information: - -Info-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info - -kim_query latconst get_test_result test=TE_156715955670 species=["Al"] model=MO_800509458712 prop=structure-cubic-crystal-npt keys=["a"] units=["angstrom"] -info variables out log - -Info-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info -Printed on Fri Mar 22 20:00:57 2019 - - -Variable information: -Variable[ 0]: latconst , style = string , def = 4.03208274841 - -Info-Info-Info-Info-Info-Info-Info-Info-Info-Info-Info - -lattice fcc ${latconst} -lattice fcc 4.03208274841 -Lattice spacing in x,y,z = 4.03208 4.03208 4.03208 -Total wall time: 0:00:00 diff --git a/examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 b/examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 deleted file mode 100644 index e9d1f17d76..0000000000 --- a/examples/kim/log.30Apr2019.kim.VOH.simulator_model.g++.1 +++ /dev/null @@ -1,92 +0,0 @@ -LAMMPS (30 Apr 2019) - using 1 OpenMP thread(s) per MPI task -# REAX potential for VOH system -# ..... - -units real -atom_style charge - -kim_style init Sim_LAMMPS_ReaxFF_ChenowethVanDuinPersson_2008_CHOV__SM_429148913211_000 -units real -atom_style charge -neigh_modify one 4000 - -read_data data.VOH - orthogonal box = (0 0 0) to (25 25 25) - 1 by 1 by 1 MPI processor grid - reading atoms ... - 100 atoms - read_data CPU = 0.000217199 secs - -kim_style define H C O V -Using KIM Simulator Model : Sim_LAMMPS_ReaxFF_ChenowethVanDuinPersson_2008_CHOV__SM_429148913211_000 -For Simulator : LAMMPS 28-Feb-2019 -Running on : LAMMPS 30 Apr 2019 -pair_style reax/c /tmp/kim-simulator-model-parameter-file-XXXXXXFRmlac safezone 2.0 mincap 100 -pair_coeff * * /tmp/kim-simulator-model-parameter-file-XXXXXX363kge H C O V -Reading potential file /tmp/kim-simulator-model-parameter-file-XXXXXX363kge with DATE: 2011-02-18 -WARNING: Changed valency_val to valency_boc for X (src/USER-REAXC/reaxc_ffield.cpp:311) -fix reaxqeq all qeq/reax 1 0.0 10.0 1.0e-6 /tmp/kim-simulator-model-parameter-file-XXXXXXzgDl49 - -neighbor 2 bin -neigh_modify every 10 delay 0 check no - -fix 1 all nve -fix 3 all temp/berendsen 500.0 500.0 100.0 - -timestep 0.25 - -#dump 1 all atom 30 dump.reax.voh - -run 300 -Neighbor list info ... - update every 10 steps, delay 0 steps, check no - max neighbors/atom: 4000, page size: 100000 - master list distance cutoff = 12 - ghost atom cutoff = 12 - binsize = 6, bins = 5 5 5 - 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair reax/c, perpetual - attributes: half, newton off, ghost - pair build: half/bin/newtoff/ghost - stencil: half/ghost/bin/3d/newtoff - bin: standard - (2) fix qeq/reax, perpetual, copy from (1) - attributes: half, newton off, ghost - pair build: copy - stencil: none - bin: none -Per MPI rank memory allocation (min/avg/max) = 25.97 | 25.97 | 25.97 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 0 -10246.825 0 -10246.825 42.256089 - 300 199.45773 -10218.342 0 -10159.482 -66.730725 -Loop time of 1.06721 on 1 procs for 300 steps with 100 atoms - -Performance: 6.072 ns/day, 3.953 hours/ns, 281.107 timesteps/s -98.8% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.93954 | 0.93954 | 0.93954 | 0.0 | 88.04 -Neigh | 0.029087 | 0.029087 | 0.029087 | 0.0 | 2.73 -Comm | 0.0018935 | 0.0018935 | 0.0018935 | 0.0 | 0.18 -Output | 1.8358e-05 | 1.8358e-05 | 1.8358e-05 | 0.0 | 0.00 -Modify | 0.096112 | 0.096112 | 0.096112 | 0.0 | 9.01 -Other | | 0.0005522 | | | 0.05 - -Nlocal: 100 ave 100 max 100 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 608 ave 608 max 608 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 3441 ave 3441 max 3441 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 3441 -Ave neighs/atom = 34.41 -Neighbor list builds = 30 -Dangerous builds not checked - -Please see the log.cite file for references relevant to this simulation - -Total wall time: 0:00:01 diff --git a/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 b/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 deleted file mode 100644 index a6d1c4a955..0000000000 --- a/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.1 +++ /dev/null @@ -1,132 +0,0 @@ -LAMMPS (30 Apr 2019) - using 1 OpenMP thread(s) per MPI task - -units metal -kim_style init ex_sim_model_Si_mod_tersoff -units metal -newton on - -atom_style atomic -atom_modify map array -boundary p p p - -# temperatures -variable tlo equal 1800.0 -variable thi equal 2400.0 - -# coordination number cutoff - -variable r equal 2.835 - -# minimization parameters - -variable etol equal 1.0e-5 -variable ftol equal 1.0e-5 -variable maxiter equal 100 -variable maxeval equal 100 -variable dmax equal 1.0e-1 - -# diamond unit cell - -variable a equal 5.431 -lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 -lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 -Lattice spacing in x,y,z = 5.431 5.431 5.431 - -region myreg block 0 4 0 4 0 4 -create_box 1 myreg -Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) - 1 by 1 by 1 MPI processor grid -create_atoms 1 region myreg -Created 512 atoms - create_atoms CPU = 0.000393867 secs - -mass 1 28.06 - -group Si type 1 -512 atoms in group Si - -velocity all create ${thi} 5287286 mom yes rot yes dist gaussian -velocity all create 2400 5287286 mom yes rot yes dist gaussian - -# make a vacancy - -group del id 300 -1 atoms in group del -delete_atoms group del -Deleted 1 atoms, new total = 511 -kim_style define Si -Using KIM Simulator Model : ex_sim_model_Si_mod_tersoff -For Simulator : LAMMPS 12-Dec-2018 -Running on : LAMMPS 30 Apr 2019 -pair_style tersoff/mod -pair_coeff * * /tmp/kim-simulator-model-parameter-file-XXXXXXVWG8uV Si -Reading potential file /tmp/kim-simulator-model-parameter-file-XXXXXXVWG8uV with DATE: 2013-07-26 - -thermo 10 - -fix 1 all nve -fix 2 all langevin ${thi} ${thi} 0.1 48278 -fix 2 all langevin 2400 ${thi} 0.1 48278 -fix 2 all langevin 2400 2400 0.1 48278 - -timestep 1.0e-3 -neighbor 1.0 bin -neigh_modify every 1 delay 10 check yes - -run 100 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 4.3 - ghost atom cutoff = 4.3 - binsize = 2.15, bins = 11 11 11 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair tersoff/mod, perpetual - attributes: full, newton on - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 3.11 | 3.11 | 3.11 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 2397.3877 -2363.0694 0 -2205.0272 15086.224 - 10 1328.4035 -2289.1682 0 -2201.5963 29164.666 - 20 1086.1557 -2254.4447 0 -2182.8424 31906.878 - 30 1528.8439 -2270.2968 0 -2169.5113 21610.528 - 40 1345.227 -2250.3915 0 -2161.7105 22146.886 - 50 1300.3329 -2235.8593 0 -2150.1379 23557.875 - 60 1546.1664 -2241.3019 0 -2139.3744 21648.774 - 70 1662.2896 -2236.2369 0 -2126.6543 23958.738 - 80 1631.7284 -2223.45 0 -2115.8821 28842.194 - 90 1795.3629 -2225.2998 0 -2106.9447 29522.37 - 100 1830.156 -2224.3733 0 -2103.7245 28805.09 -Loop time of 0.201725 on 1 procs for 100 steps with 511 atoms - -Performance: 42.831 ns/day, 0.560 hours/ns, 495.724 timesteps/s -99.3% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.19292 | 0.19292 | 0.19292 | 0.0 | 95.63 -Neigh | 0.0037313 | 0.0037313 | 0.0037313 | 0.0 | 1.85 -Comm | 0.00074744 | 0.00074744 | 0.00074744 | 0.0 | 0.37 -Output | 0.00026727 | 0.00026727 | 0.00026727 | 0.0 | 0.13 -Modify | 0.0036564 | 0.0036564 | 0.0036564 | 0.0 | 1.81 -Other | | 0.0004075 | | | 0.20 - -Nlocal: 511 ave 511 max 511 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 970 ave 970 max 970 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 9174 ave 9174 max 9174 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 9174 -Ave neighs/atom = 17.953 -Neighbor list builds = 4 -Dangerous builds = 0 - -Total wall time: 0:00:00 diff --git a/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 b/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 deleted file mode 100644 index dcb170aeb6..0000000000 --- a/examples/kim/log.30Apr2019.kim.ex_si.simulator_model.g++.4 +++ /dev/null @@ -1,132 +0,0 @@ -LAMMPS (30 Apr 2019) - using 1 OpenMP thread(s) per MPI task - -units metal -kim_style init ex_sim_model_Si_mod_tersoff -units metal -newton on - -atom_style atomic -atom_modify map array -boundary p p p - -# temperatures -variable tlo equal 1800.0 -variable thi equal 2400.0 - -# coordination number cutoff - -variable r equal 2.835 - -# minimization parameters - -variable etol equal 1.0e-5 -variable ftol equal 1.0e-5 -variable maxiter equal 100 -variable maxeval equal 100 -variable dmax equal 1.0e-1 - -# diamond unit cell - -variable a equal 5.431 -lattice custom $a a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 -lattice custom 5.431 a1 1.0 0.0 0.0 a2 0.0 1.0 0.0 a3 0.0 0.0 1.0 basis 0.0 0.0 0.0 basis 0.0 0.5 0.5 basis 0.5 0.0 0.5 basis 0.5 0.5 0.0 basis 0.25 0.25 0.25 basis 0.25 0.75 0.75 basis 0.75 0.25 0.75 basis 0.75 0.75 0.25 -Lattice spacing in x,y,z = 5.431 5.431 5.431 - -region myreg block 0 4 0 4 0 4 -create_box 1 myreg -Created orthogonal box = (0 0 0) to (21.724 21.724 21.724) - 1 by 2 by 2 MPI processor grid -create_atoms 1 region myreg -Created 512 atoms - create_atoms CPU = 0.102434 secs - -mass 1 28.06 - -group Si type 1 -512 atoms in group Si - -velocity all create ${thi} 5287286 mom yes rot yes dist gaussian -velocity all create 2400 5287286 mom yes rot yes dist gaussian - -# make a vacancy - -group del id 300 -1 atoms in group del -delete_atoms group del -Deleted 1 atoms, new total = 511 -kim_style define Si -Using KIM Simulator Model : ex_sim_model_Si_mod_tersoff -For Simulator : LAMMPS 12-Dec-2018 -Running on : LAMMPS 30 Apr 2019 -pair_style tersoff/mod -pair_coeff * * /tmp/kim-simulator-model-parameter-file-XXXXXXqDlERL Si -Reading potential file /tmp/kim-simulator-model-parameter-file-XXXXXXqDlERL with DATE: 2013-07-26 - -thermo 10 - -fix 1 all nve -fix 2 all langevin ${thi} ${thi} 0.1 48278 -fix 2 all langevin 2400 ${thi} 0.1 48278 -fix 2 all langevin 2400 2400 0.1 48278 - -timestep 1.0e-3 -neighbor 1.0 bin -neigh_modify every 1 delay 10 check yes - -run 100 -Neighbor list info ... - update every 1 steps, delay 10 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 4.3 - ghost atom cutoff = 4.3 - binsize = 2.15, bins = 11 11 11 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair tersoff/mod, perpetual - attributes: full, newton on - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 3.082 | 3.082 | 3.082 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 2397.5824 -2363.0694 0 -2205.0143 15087.562 - 10 1298.5003 -2292.5456 0 -2206.945 28361.893 - 20 1114.7065 -2260.7006 0 -2187.2161 30574.077 - 30 1504.9472 -2271.8639 0 -2172.6537 20395.651 - 40 1357.5949 -2248.6066 0 -2159.1103 21779.773 - 50 1351.7212 -2235.0803 0 -2145.9713 23404.844 - 60 1582.4191 -2238.3233 0 -2134.006 21711.26 - 70 1654.3988 -2230.0965 0 -2121.0341 24276.504 - 80 1654.9629 -2218.6654 0 -2109.5658 27571.472 - 90 1815.7206 -2219.2065 0 -2099.5093 28475.757 - 100 1901.1544 -2216.5428 0 -2091.2137 28962.04 -Loop time of 4.36959 on 4 procs for 100 steps with 511 atoms - -Performance: 1.977 ns/day, 12.138 hours/ns, 22.885 timesteps/s -47.8% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 0.051784 | 0.056551 | 0.064825 | 2.1 | 1.29 -Neigh | 0.00093389 | 0.001028 | 0.0011392 | 0.3 | 0.02 -Comm | 2.8964 | 2.9342 | 3.016 | 2.8 | 67.15 -Output | 0.673 | 0.68159 | 0.69707 | 1.1 | 15.60 -Modify | 0.0011303 | 0.0029655 | 0.0081694 | 5.5 | 0.07 -Other | | 0.6933 | | | 15.87 - -Nlocal: 127.75 ave 134 max 123 min -Histogram: 1 0 0 2 0 0 0 0 0 1 -Nghost: 495 ave 498 max 489 min -Histogram: 1 0 0 0 0 0 0 1 1 1 -Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 2302 ave 2443 max 2194 min -Histogram: 1 0 0 2 0 0 0 0 0 1 - -Total # of neighbors = 9208 -Ave neighs/atom = 18.0196 -Neighbor list builds = 4 -Dangerous builds = 0 - -Total wall time: 0:00:05 diff --git a/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 b/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 deleted file mode 100644 index 94aaf1aaef..0000000000 --- a/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.1 +++ /dev/null @@ -1,104 +0,0 @@ -LAMMPS (30 Apr 2019) - using 1 OpenMP thread(s) per MPI task -# 3d Lennard-Jones melt -# -# This example requires that the example models provided with -# the kim-api package are installed. see the ./lib/kim/README or -# ./lib/kim/Install.py files for details on how to install these -# example models. -# - -variable x index 1 -variable y index 1 -variable z index 1 - -variable xx equal 20*$x -variable xx equal 20*1 -variable yy equal 20*$y -variable yy equal 20*1 -variable zz equal 20*$z -variable zz equal 20*1 - -units metal -atom_style atomic -newton on - -kim_style init LennardJones_Ar - -lattice fcc 4.4300 -Lattice spacing in x,y,z = 4.43 4.43 4.43 -region box block 0 ${xx} 0 ${yy} 0 ${zz} -region box block 0 20 0 ${yy} 0 ${zz} -region box block 0 20 0 20 0 ${zz} -region box block 0 20 0 20 0 20 -create_box 1 box -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 1 by 1 MPI processor grid -create_atoms 1 box -Created 32000 atoms - create_atoms CPU = 0.00314307 secs - -#pair_style lj/cut 8.1500 -#pair_coeff 1 1 0.0104 3.4000 - -kim_style define Ar -pair_style kim LennardJones_Ar -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:980) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:985) -pair_coeff * * Ar - -mass 1 39.95 -velocity all create 200.0 232345 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 - -run 100 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair kim, perpetual - attributes: full, newton off, cut 8.45 - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 28.12 | 28.12 | 28.12 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 4.91804 on 1 procs for 100 steps with 32000 atoms - -Performance: 1.757 ns/day, 13.661 hours/ns, 20.333 timesteps/s -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 4.3033 | 4.3033 | 4.3033 | 0.0 | 87.50 -Neigh | 0.53176 | 0.53176 | 0.53176 | 0.0 | 10.81 -Comm | 0.024606 | 0.024606 | 0.024606 | 0.0 | 0.50 -Output | 0.00016403 | 0.00016403 | 0.00016403 | 0.0 | 0.00 -Modify | 0.038671 | 0.038671 | 0.038671 | 0.0 | 0.79 -Other | | 0.01951 | | | 0.40 - -Nlocal: 32000 ave 32000 max 32000 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 19911 ave 19911 max 19911 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 0 ave 0 max 0 min -Histogram: 1 0 0 0 0 0 0 0 0 0 -FullNghs: 4.25375e+06 ave 4.25375e+06 max 4.25375e+06 min -Histogram: 1 0 0 0 0 0 0 0 0 0 - -Total # of neighbors = 4253750 -Ave neighs/atom = 132.93 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:05 diff --git a/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 b/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 deleted file mode 100644 index 3377f22d02..0000000000 --- a/examples/kim/log.30Apr2019.kim.lj.simulator_model.g++.4 +++ /dev/null @@ -1,104 +0,0 @@ -LAMMPS (30 Apr 2019) - using 1 OpenMP thread(s) per MPI task -# 3d Lennard-Jones melt -# -# This example requires that the example models provided with -# the kim-api package are installed. see the ./lib/kim/README or -# ./lib/kim/Install.py files for details on how to install these -# example models. -# - -variable x index 1 -variable y index 1 -variable z index 1 - -variable xx equal 20*$x -variable xx equal 20*1 -variable yy equal 20*$y -variable yy equal 20*1 -variable zz equal 20*$z -variable zz equal 20*1 - -units metal -atom_style atomic -newton on - -kim_style init LennardJones_Ar - -lattice fcc 4.4300 -Lattice spacing in x,y,z = 4.43 4.43 4.43 -region box block 0 ${xx} 0 ${yy} 0 ${zz} -region box block 0 20 0 ${yy} 0 ${zz} -region box block 0 20 0 20 0 ${zz} -region box block 0 20 0 20 0 20 -create_box 1 box -Created orthogonal box = (0 0 0) to (88.6 88.6 88.6) - 1 by 2 by 2 MPI processor grid -create_atoms 1 box -Created 32000 atoms - create_atoms CPU = 0.0979962 secs - -#pair_style lj/cut 8.1500 -#pair_coeff 1 1 0.0104 3.4000 - -kim_style define Ar -pair_style kim LennardJones_Ar -WARNING: KIM Model does not provide `partialParticleEnergy'; energy per atom will be zero (src/KIM/pair_kim.cpp:980) -WARNING: KIM Model does not provide `partialParticleVirial'; virial per atom will be zero (src/KIM/pair_kim.cpp:985) -pair_coeff * * Ar - -mass 1 39.95 -velocity all create 200.0 232345 loop geom - -neighbor 0.3 bin -neigh_modify delay 0 every 1 check yes - -fix 1 all nve -#fix 1 all npt temp 1.0 1.0 1.0 iso 1.0 1.0 3.0 - -run 100 -Neighbor list info ... - update every 1 steps, delay 0 steps, check yes - max neighbors/atom: 2000, page size: 100000 - master list distance cutoff = 8.45 - ghost atom cutoff = 8.45 - binsize = 4.225, bins = 21 21 21 - 1 neighbor lists, perpetual/occasional/extra = 1 0 0 - (1) pair kim, perpetual - attributes: full, newton off, cut 8.45 - pair build: full/bin/atomonly - stencil: full/bin/3d - bin: standard -Per MPI rank memory allocation (min/avg/max) = 9.789 | 9.789 | 9.789 Mbytes -Step Temp E_pair E_mol TotEng Press - 0 200 6290.8194 0 7118.0584 129712.25 - 100 95.179725 6718.814 0 7112.496 133346.59 -Loop time of 6.29539 on 4 procs for 100 steps with 32000 atoms - -Performance: 1.372 ns/day, 17.487 hours/ns, 15.885 timesteps/s -48.4% CPU use with 4 MPI tasks x 1 OpenMP threads - -MPI task timing breakdown: -Section | min time | avg time | max time |%varavg| %total ---------------------------------------------------------------- -Pair | 1.9399 | 2.079 | 2.2181 | 9.1 | 33.02 -Neigh | 0.25924 | 0.26632 | 0.2692 | 0.8 | 4.23 -Comm | 2.5011 | 2.6605 | 2.751 | 5.9 | 42.26 -Output | 0.069904 | 0.07097 | 0.071545 | 0.3 | 1.13 -Modify | 0.011383 | 0.012206 | 0.01419 | 1.0 | 0.19 -Other | | 1.206 | | | 19.16 - -Nlocal: 8000 ave 8018 max 7967 min -Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 9131 ave 9164 max 9113 min -Histogram: 2 0 0 1 0 0 0 0 0 1 -Neighs: 0 ave 0 max 0 min -Histogram: 4 0 0 0 0 0 0 0 0 0 -FullNghs: 1.06344e+06 ave 1.06594e+06 max 1.05881e+06 min -Histogram: 1 0 0 0 0 0 1 0 0 2 - -Total # of neighbors = 4253750 -Ave neighs/atom = 132.93 -Neighbor list builds = 3 -Dangerous builds = 0 -Total wall time: 0:00:07 diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index dc8d0544f6..85b865d03f 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -220,8 +220,9 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg, url += qfunction; std::string query(arg[0]); - query += "&model="; + query += "&model=[\""; query += model_name; + query += "\"]"; for (int i=1; i < narg; ++i) { query += '&'; query += arg[i]; -- GitLab From fe83e4de2ec4acc6e5a190bac6dd597e52a1aab5 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 Jul 2019 16:00:01 -0400 Subject: [PATCH 209/236] revise logic and documentation of communication cutoff selection one more time --- doc/src/comm_modify.txt | 21 +++++++-------- src/comm.cpp | 59 ++++++++++++++++++++++++++++------------- 2 files changed, 50 insertions(+), 30 deletions(-) diff --git a/doc/src/comm_modify.txt b/doc/src/comm_modify.txt index d5f5aecf54..5f03636c1d 100644 --- a/doc/src/comm_modify.txt +++ b/doc/src/comm_modify.txt @@ -69,18 +69,15 @@ processors. By default the ghost cutoff = neighbor cutoff = pairwise force cutoff + neighbor skin. See the "neighbor"_neighbor.html command for more information about the skin distance. If the specified Rcut is greater than the neighbor cutoff, then extra ghost atoms will be acquired. -If the provided cutoff is smaller, the provided value will be ignored -and the ghost cutoff is set to the neighbor cutoff. Specifying a -cutoff value of 0.0 will reset any previous value to the default. -If bonded interactions exist and equilibrium bond length information is -available, then also a heuristic based on that bond length (2.0x {r_eq} -for systems with dihedrals or improper, 1.5x {r_eq} without) plus -neighbor skin is applied if the communication cutoff is set to its -default value of 0.0. This avoids problems for systems without a pair -style or where the non-bonded cutoff is (much) shorter than the largest -bond lengths. A warning message is printed, if a specified -communication cutoff > 0.0 is overridden or the bond length heuristics -lead to a larger communication cutoff. +If the provided cutoff is smaller, the provided value will be ignored, +the ghost cutoff is set to the neighbor cutoff and a warning will be +printed. Specifying a cutoff value of 0.0 will reset any previous value +to the default. If bonded interactions exist and equilibrium bond length +information is available, then also a heuristic based on that bond length +is computed. It is used as communication cutoff, if there is no pair +style present and no {comm_modify cutoff} command used. Otherwise a +warning is printed, if this bond based estimate is larger than the +communication cutoff used. A The {cutoff/multi} option is equivalent to {cutoff}, but applies to communication mode {multi} instead. Since in this case the communication diff --git a/src/comm.cpp b/src/comm.cpp index ae2715f0fd..303bd6a8cb 100644 --- a/src/comm.cpp +++ b/src/comm.cpp @@ -588,30 +588,42 @@ void Comm::set_proc_grid(int outflag) /* ---------------------------------------------------------------------- determine suitable communication cutoff. - use the larger of the user specified value and the cutoff required - by the neighborlist build for pair styles. - if bonded interactions exist, apply a heuristic based on the equilibrium - bond length (use 1.5x r_bond if no dihedral or improper style exists - otherwise 2x r_bond) plus neighbor list skin. - if no user specified communication cutoff is given include this - heuristic, otherwise ignore it. + this uses three inputs: 1) maximum neighborlist cutoff, 2) an estimate + based on bond lengths and bonded interaction styles present, and 3) a + user supplied communication cutoff. + the neighbor list cutoff (1) is *always* used, since it is a requirement + for neighborlists working correctly. the bond length based cutoff is + *only* used, if no pair style is defined and no user cutoff is provided. + otherwise, a warning is printed. if the bond length based estimate is + larger than what is used. print a warning, if a user specified communication cutoff is overridden. ------------------------------------------------------------------------- */ double Comm::get_comm_cutoff() { - double maxcommcutoff = 0.0; - double maxbondcutoff = 0.0; + double maxcommcutoff, maxbondcutoff = 0.0; if (force->bond) { int n = atom->nbondtypes; for (int i = 1; i <= n; ++i) maxbondcutoff = MAX(maxbondcutoff,force->bond->equilibrium_distance(i)); - if (force->dihedral || force->improper) { - maxbondcutoff *= 2.0; + // apply bond length based heuristics. + + if (force->newton_bond) { + if (force->dihedral || force->improper) { + maxbondcutoff *= 2.25; + } else { + maxbondcutoff *=1.5; + } } else { - maxbondcutoff *=1.5; + if (force->dihedral || force->improper) { + maxbondcutoff *= 3.125; + } else if (force->angle) { + maxbondcutoff *= 2.25; + } else { + maxbondcutoff *=1.5; + } } maxbondcutoff += neighbor->skin; } @@ -620,16 +632,27 @@ double Comm::get_comm_cutoff() maxcommcutoff = MAX(cutghostuser,neighbor->cutneighmax); - // consider cutoff estimate from bond length only if no user specified cutoff + // use cutoff estimate from bond length only if no user specified + // cutoff was given and no pair style present. Otherwise print a + // warning, if the estimated bond based cutoff is larger than what + // is currently used. - if (cutghostuser == 0.0) maxcommcutoff = MAX(maxcommcutoff,maxbondcutoff); + if (!force->pair && (cutghostuser == 0.0)) { + maxcommcutoff = MAX(maxcommcutoff,maxbondcutoff); + } else { + if ((me == 0) && (maxbondcutoff > maxcommcutoff)) { + char mesg[256]; + snprintf(mesg,256,"Communication cutoff %g is shorter than a bond " + "length based estimate of %g. This may lead to errors.", + maxcommcutoff,maxbondcutoff); + error->warning(FLERR,mesg); + } + } - // print warning if neighborlist cutoff overrides user cutoff or - // applied bond based cutoff is larger than neighbor cutoff. + // print warning if neighborlist cutoff overrides user cutoff if (me == 0) { - if ( ((cutghostuser > 0.0) && (maxcommcutoff > cutghostuser)) - || ((cutghostuser == 0.0) && (maxcommcutoff == maxbondcutoff)) ) { + if ((cutghostuser > 0.0) && (maxcommcutoff > cutghostuser)) { char mesg[128]; snprintf(mesg,128,"Communication cutoff adjusted to %g",maxcommcutoff); error->warning(FLERR,mesg); -- GitLab From 60dfa7daf81e056a126dc52e131295aafe97a3d1 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Thu, 25 Jul 2019 18:31:40 -0500 Subject: [PATCH 210/236] doc spelling update --- doc/src/Install_mac.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/Install_mac.txt b/doc/src/Install_mac.txt index e277f7e0e4..773c9ec93a 100644 --- a/doc/src/Install_mac.txt +++ b/doc/src/Install_mac.txt @@ -28,7 +28,7 @@ Lennard-Jones benchmark file: % brew test lammps -v :pre The LAMMPS binary is built with the "KIM package"_Build_extras#kim which -results in homebrew also installing the `kim-api` binaries when LAMMPS is +results in Homebrew also installing the `kim-api` binaries when LAMMPS is installed. In order to use potentials from "openkim.org"_openkim, you can install the `openkim-models` package -- GitLab From 52e175546420c04705ac101f58806a94f5705aba Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Thu, 25 Jul 2019 21:20:42 -0400 Subject: [PATCH 211/236] fix spelling errors and false positives --- doc/src/kim_commands.txt | 4 ++-- doc/utils/sphinx-config/false_positives.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index dd61f6f5cc..0bb7de03d6 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -282,7 +282,7 @@ keyword {fixed_types} for models that have a preset fixed mapping (i.e. the mapping between LAMMPS atom types and chemical species is defined by the model and cannot be changed). In the latter case, the user must consult the model documentation to see how many atom types there are and how they -map to the chemcial species. +map to the chemical species. For example, consider an OpenKIM IM that supports Si and C species. If the LAMMPS simulation has four atom types, where the first three are Si, @@ -488,7 +488,7 @@ The citation format for an IM is displayed on its page on "OpenKIM"_https://openkim.org along with the corresponding BibTex file, and is automatically added to the LAMMPS {log.cite} file. -Citing the IM software (KIM infrastucture and specific PM or SM codes) +Citing the IM software (KIM infrastructure and specific PM or SM codes) used in the simulation gives credit to the researchers who developed them and enables open source efforts like OpenKIM to function. diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index e383fddfa9..cf9b823ba3 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -884,6 +884,7 @@ Fogarty Foiles fopenmp forestgreen +formatarg formulae Forschungszentrum Fortran -- GitLab From 47689b4ad36198e7501d5bbd37419d658dce3c3f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jul 2019 06:03:21 -0400 Subject: [PATCH 212/236] make include files independent of previously included headers. include them first in implementation files. this is to be compliant with upcoming definition of include file policy --- src/KIM/fix_store_kim.cpp | 2 +- src/KIM/fix_store_kim.h | 1 - src/KIM/kim_init.cpp | 2 +- src/KIM/kim_init.h | 1 + src/KIM/kim_interactions.cpp | 2 +- src/KIM/kim_interactions.h | 1 + src/KIM/kim_query.cpp | 2 +- src/KIM/pair_kim.cpp | 2 +- 8 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/KIM/fix_store_kim.cpp b/src/KIM/fix_store_kim.cpp index 1bd924bcfb..16d606d2ed 100644 --- a/src/KIM/fix_store_kim.cpp +++ b/src/KIM/fix_store_kim.cpp @@ -54,8 +54,8 @@ Designed for use with the kim-api-2.0.2 (and newer) package ------------------------------------------------------------------------- */ -#include #include "fix_store_kim.h" +#include extern "C" { #include "KIM_SimulatorModel.h" } diff --git a/src/KIM/fix_store_kim.h b/src/KIM/fix_store_kim.h index 655be83ad0..6baf480993 100644 --- a/src/KIM/fix_store_kim.h +++ b/src/KIM/fix_store_kim.h @@ -63,7 +63,6 @@ FixStyle(STORE/KIM,FixStoreKIM) #ifndef LMP_FIX_STORE_KIM_H #define LMP_FIX_STORE_KIM_H -#include #include "fix.h" namespace LAMMPS_NS { diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 83638f3428..bae286aff6 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -55,11 +55,11 @@ Designed for use with the kim-api-2.1.0 (and newer) package ------------------------------------------------------------------------- */ +#include "kim_init.h" #include #include #include #include -#include "kim_init.h" #include "error.h" #include "atom.h" #include "comm.h" diff --git a/src/KIM/kim_init.h b/src/KIM/kim_init.h index 7c7a24615b..2b5dc520c7 100644 --- a/src/KIM/kim_init.h +++ b/src/KIM/kim_init.h @@ -65,6 +65,7 @@ CommandStyle(kim_init,KimInit) #define LMP_KIM_INIT_H #include "pointers.h" +#include namespace LAMMPS_NS { diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp index d0fbb809d2..449b6bcb13 100644 --- a/src/KIM/kim_interactions.cpp +++ b/src/KIM/kim_interactions.cpp @@ -55,10 +55,10 @@ Designed for use with the kim-api-2.1.0 (and newer) package ------------------------------------------------------------------------- */ +#include "kim_interactions.h" #include #include #include -#include "kim_interactions.h" #include "error.h" #include "atom.h" #include "comm.h" diff --git a/src/KIM/kim_interactions.h b/src/KIM/kim_interactions.h index 6da1880f84..8172004d53 100644 --- a/src/KIM/kim_interactions.h +++ b/src/KIM/kim_interactions.h @@ -65,6 +65,7 @@ CommandStyle(kim_interactions,KimInteractions) #define LMP_KIM_INTERACTIONS_H #include "pointers.h" +#include namespace LAMMPS_NS { diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index 85b865d03f..6688ed6690 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -54,11 +54,11 @@ Designed for use with the kim-api-2.1.0 (and newer) package ------------------------------------------------------------------------- */ +#include "kim_query.h" #include #include #include #include -#include "kim_query.h" #include "comm.h" #include "error.h" #include "input.h" diff --git a/src/KIM/pair_kim.cpp b/src/KIM/pair_kim.cpp index 50eef1de2b..74b92a3e2b 100644 --- a/src/KIM/pair_kim.cpp +++ b/src/KIM/pair_kim.cpp @@ -53,13 +53,13 @@ /* ---------------------------------------------------------------------- Designed for use with the kim-api-2.0.2 (and newer) package ------------------------------------------------------------------------- */ +#include "pair_kim.h" #include #include #include // includes from LAMMPS -#include "pair_kim.h" #include "atom.h" #include "comm.h" #include "universe.h" -- GitLab From e8d891c0ddb78c5be220fb9ccdcdbba1fa24509f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jul 2019 06:06:03 -0400 Subject: [PATCH 213/236] simplify installation of data folders and make it consistent fixes #1586 --- cmake/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 0f99cc6274..7cd7b62c91 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -551,11 +551,9 @@ include(Documentation) ############################################################################### # Install potential and force field files in data directory ############################################################################### -set(LAMMPS_INSTALL_POTENTIALS_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/potentials) -install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_POTENTIALS_DIR}) - -set(LAMMPS_INSTALL_FRC_FILES_DIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps/frc_files) -install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files/ DESTINATION ${LAMMPS_INSTALL_FRC_FILES_DIR}) +set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps) +install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR}) +install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR}) configure_file(etc/profile.d/lammps.sh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh @ONLY) configure_file(etc/profile.d/lammps.csh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh @ONLY) -- GitLab From 8d4f1896994e50d7f66ab1f66a7bf8bd306f48e0 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jul 2019 09:38:32 -0400 Subject: [PATCH 214/236] Revert "new versions of jacobi() method" This reverts commit 39315268e885fba886a0ff30eccc619ffaa64c5f. --- src/math_extra.cpp | 229 ++++++++++++--------------------------------- src/math_extra.h | 9 +- 2 files changed, 63 insertions(+), 175 deletions(-) diff --git a/src/math_extra.cpp b/src/math_extra.cpp index 4184e84b59..797d210d0e 100644 --- a/src/math_extra.cpp +++ b/src/math_extra.cpp @@ -13,7 +13,6 @@ /* ---------------------------------------------------------------------- Contributing author: Mike Brown (SNL) - Arno Mayrhofer (DCS Computing), jacobi() functions ------------------------------------------------------------------------- */ #include "math_extra.h" @@ -96,189 +95,83 @@ int mldivide3(const double m[3][3], const double *v, double *ans) /* ---------------------------------------------------------------------- compute evalues and evectors of 3x3 real symmetric matrix based on Jacobi rotations - two variants for passing in matrix - - procedure jacobi(S ∈ Rn×n; out e ∈ Rn; out E ∈ Rn×n) - var - i, k, l, m, state ∈ N - s, c, t, p, y, d, r ∈ R - ind ∈ Nn - changed ∈ Ln - ! init e, E, and arrays ind, changed - E := I; state := n - for k := 1 to n do indk := maxind(k); ek := Skk; changedk := true endfor - while state≠0 do ! next rotation - m := 1 ! find index (k,l) of pivot p - for k := 2 to n−1 do - if │Sk indk│ > │Sm indm│ then m := k endif - endfor - k := m; l := indm; p := Skl - ! calculate c = cos φ, s = sin φ - y := (el−ek)/2; d := │y│+√(p2+y2) - r := √(p2+d2); c := d/r; s := p/r; t := p2/d - if y<0 then s := −s; t := −t endif - Skl := 0.0; update(k,−t); update(l,t) - ! rotate rows and columns k and l - for i := 1 to k−1 do rotate(i,k,i,l) endfor - for i := k+1 to l−1 do rotate(k,i,i,l) endfor - for i := l+1 to n do rotate(k,i,l,i) endfor - ! rotate eigenvectors - for i := 1 to n do - ┌ ┐ ┌ ┐┌ ┐ - │Eik│ │c −s││Eik│ - │ │ := │ ││ │ - │Eil│ │s c││Eil│ - └ ┘ └ ┘└ ┘ - endfor - ! rows k, l have changed, update rows indk, indl - indk := maxind(k); indl := maxind(l) - loop - endproc + adapted from Numerical Recipes jacobi() function ------------------------------------------------------------------------- */ int jacobi(double matrix[3][3], double *evalues, double evectors[3][3]) { - evectors[0][0] = 1.0; evectors[0][1] = 0.0; evectors[0][2] = 0.0; - evectors[1][0] = 0.0; evectors[1][1] = 1.0; evectors[1][2] = 0.0; - evectors[2][0] = 0.0; evectors[2][1] = 0.0; evectors[2][2] = 1.0; - evalues[0] = 0.0; evalues[1] = 0.0; evalues[2] = 0.0; - double threshold = 0.0; - - for (int i = 0; i < 3; i++) - for (int j = i; j < 3; j++) - threshold += fabs(matrix[i][j]); - - if (threshold < 1.0e-200) return 0; - threshold *= 1.0e-12; - int state = 2; - bool changed[3] = {true, true, true}; - - int iteration = 0; - while (state > 0 && iteration < MAXJACOBI) { - for (int k = 0; k < 2; k++) { - for (int l = k+1; l < 3; l++) { - const double p = matrix[k][l]; - const double y = (matrix[l][l]-matrix[k][k])*0.5; - const double d = fabs(y)+sqrt(p*p + y*y); - const double r = sqrt(p*p + d*d); - const double c = r > threshold ? d/r : 1.0; - double s = r > threshold ? p/r : 0.0; - double t = d > threshold ? p*p/d : 0.0; - if (y < 0.0) { - s *= -1.0; - t *= -1.0; - } - matrix[k][l] = 0.0; - update_eigenvalue(matrix[k][k], changed[k], state, -t, threshold); - update_eigenvalue(matrix[l][l], changed[l], state, t, threshold); - for (int i = 0; i < k; i++) - rotate(matrix[i][k], matrix[i][l],c,s); - for (int i = k+1; i < l; i++) - rotate(matrix[k][i], matrix[i][l],c,s); - for (int i = l+1; i < 3; i++) - rotate(matrix[k][i], matrix[l][i],c,s); - for (int i = 0; i < 3; i++) - rotate(evectors[i][k], evectors[i][l],c,s); - } - } - iteration++; - } - - for (int i = 0; i < 3; i++) - evalues[i] = matrix[i][i]; + int i,j,k; + double tresh,theta,tau,t,sm,s,h,g,c,b[3],z[3]; - if (iteration == MAXJACOBI) return 1; - return 0; -} + for (i = 0; i < 3; i++) { + for (j = 0; j < 3; j++) evectors[i][j] = 0.0; + evectors[i][i] = 1.0; + } + for (i = 0; i < 3; i++) { + b[i] = evalues[i] = matrix[i][i]; + z[i] = 0.0; + } -int jacobi(double **matrix, double *evalues, double **evectors) -{ - evectors[0][0] = 1.0; evectors[0][1] = 0.0; evectors[0][2] = 0.0; - evectors[1][0] = 0.0; evectors[1][1] = 1.0; evectors[1][2] = 0.0; - evectors[2][0] = 0.0; evectors[2][1] = 0.0; evectors[2][2] = 1.0; - evalues[0] = 0.0; evalues[1] = 0.0; evalues[2] = 0.0; - double threshold = 0.0; - - for (int i = 0; i < 3; i++) - for (int j = i; j < 3; j++) - threshold += fabs(matrix[i][j]); - - if (threshold < 1.0e-200) return 0; - threshold *= 1.0e-12; - int state = 2; - bool changed[3] = {true, true, true}; - - int iteration = 0; - while (state > 0 && iteration < MAXJACOBI) { - for (int k = 0; k < 2; k++) { - for (int l = k+1; l < 3; l++) { - const double p = matrix[k][l]; - const double y = (matrix[l][l]-matrix[k][k])*0.5; - const double d = fabs(y)+sqrt(p*p + y*y); - const double r = sqrt(p*p + d*d); - const double c = r > threshold ? d/r : 1.0; - double s = r > threshold ? p/r : 0.0; - double t = d > threshold ? p*p/d : 0.0; - if (y < 0.0) { - s *= -1.0; - t *= -1.0; + for (int iter = 1; iter <= MAXJACOBI; iter++) { + sm = 0.0; + for (i = 0; i < 2; i++) + for (j = i+1; j < 3; j++) + sm += fabs(matrix[i][j]); + if (sm == 0.0) return 0; + + if (iter < 4) tresh = 0.2*sm/(3*3); + else tresh = 0.0; + + for (i = 0; i < 2; i++) { + for (j = i+1; j < 3; j++) { + g = 100.0*fabs(matrix[i][j]); + if (iter > 4 && fabs(evalues[i])+g == fabs(evalues[i]) + && fabs(evalues[j])+g == fabs(evalues[j])) + matrix[i][j] = 0.0; + else if (fabs(matrix[i][j]) > tresh) { + h = evalues[j]-evalues[i]; + if (fabs(h)+g == fabs(h)) t = (matrix[i][j])/h; + else { + theta = 0.5*h/(matrix[i][j]); + t = 1.0/(fabs(theta)+sqrt(1.0+theta*theta)); + if (theta < 0.0) t = -t; + } + c = 1.0/sqrt(1.0+t*t); + s = t*c; + tau = s/(1.0+c); + h = t*matrix[i][j]; + z[i] -= h; + z[j] += h; + evalues[i] -= h; + evalues[j] += h; + matrix[i][j] = 0.0; + for (k = 0; k < i; k++) rotate(matrix,k,i,k,j,s,tau); + for (k = i+1; k < j; k++) rotate(matrix,i,k,k,j,s,tau); + for (k = j+1; k < 3; k++) rotate(matrix,i,k,j,k,s,tau); + for (k = 0; k < 3; k++) rotate(evectors,k,i,k,j,s,tau); } - matrix[k][l] = 0.0; - update_eigenvalue(matrix[k][k], changed[k], state, -t, threshold); - update_eigenvalue(matrix[l][l], changed[l], state, t, threshold); - for (int i = 0; i < k; i++) - rotate(matrix[i][k], matrix[i][l],c,s); - for (int i = k+1; i < l; i++) - rotate(matrix[k][i], matrix[i][l],c,s); - for (int i = l+1; i < 3; i++) - rotate(matrix[k][i], matrix[l][i],c,s); - for (int i = 0; i < 3; i++) - rotate(evectors[i][k], evectors[i][l],c,s); } } - iteration++; - } - for (int i = 0; i < 3; i++) - evalues[i] = matrix[i][i]; - - if (iteration == MAXJACOBI) return 1; - return 0; -} - -/* ---------------------------------------------------------------------- - perform a single Jacobi rotation of Sij, Skl - ┌ ┐ ┌ ┐┌ ┐ - │Skl│ │c −s││Skl│ - │ │ := │ ││ │ - │Sij│ │s c││Sij│ - └ ┘ └ ┘└ ┘ -------------------------------------------------------------------------- */ - -void rotate(double &matrix_kl, double &matrix_ij, - const double c, const double s) -{ - const double tmp_kl = matrix_kl; - matrix_kl = c*matrix_kl - s*matrix_ij; - matrix_ij = s*tmp_kl + c*matrix_ij; + for (i = 0; i < 3; i++) { + evalues[i] = b[i] += z[i]; + z[i] = 0.0; + } + } + return 1; } /* ---------------------------------------------------------------------- - update eigenvalue and its status + perform a single Jacobi rotation ------------------------------------------------------------------------- */ -void update_eigenvalue(double &eigenvalue, bool &changed, int &state, - const double t, const double threshold) +void rotate(double matrix[3][3], int i, int j, int k, int l, + double s, double tau) { - eigenvalue += t; - - if (changed && fabs(t) < threshold) { - changed = false; - state--; - } else if (!changed && fabs(t) > threshold) { - changed = true; - state++; - } + double g = matrix[i][j]; + double h = matrix[k][l]; + matrix[i][j] = g-s*(h+g*tau); + matrix[k][l] = h+s*(g-h*tau); } /* ---------------------------------------------------------------------- diff --git a/src/math_extra.h b/src/math_extra.h index ad8105d271..09b135c641 100644 --- a/src/math_extra.h +++ b/src/math_extra.h @@ -74,14 +74,9 @@ namespace MathExtra { void write3(const double mat[3][3]); int mldivide3(const double mat[3][3], const double *vec, double *ans); - int jacobi(double matrix[3][3], double *evalues, double evectors[3][3]); - int jacobi(double **matrix, double *evalues, double **evectors); - void rotate(double &matrix_kl, double &matrix_ij, - const double c, const double s); - void update_eigenvalue(double &eigenvalue, bool &changed, int &state, - const double t, const double threshold); - + void rotate(double matrix[3][3], int i, int j, int k, int l, + double s, double tau); void richardson(double *q, double *m, double *w, double *moments, double dtq); void no_squish_rotate(int k, double *p, double *q, double *inertia, double dt); -- GitLab From 0bb9df76c2d132e66e79f482432ac2f33ec9781e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jul 2019 09:58:18 -0400 Subject: [PATCH 215/236] correct shell profile variables to point to the installation directory --- cmake/etc/profile.d/lammps.csh.in | 4 ++-- cmake/etc/profile.d/lammps.sh.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/etc/profile.d/lammps.csh.in b/cmake/etc/profile.d/lammps.csh.in index 42f222d67c..1c13583914 100644 --- a/cmake/etc/profile.d/lammps.csh.in +++ b/cmake/etc/profile.d/lammps.csh.in @@ -1,4 +1,4 @@ # set environment for LAMMPS and msi2lmp executables # to find potential and force field files -if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS @LAMMPS_POTENTIALS_DIR@ -if ( "$?MSI2LMP_LIBRARY" == 0 ) setenv MSI2LMP_LIBRARY @LAMMPS_FRC_FILES_DIR@ +if ( "$?LAMMPS_POTENTIALS" == 0 ) setenv LAMMPS_POTENTIALS @LAMMPS_INSTALL_DATADIR@/potentials +if ( "$?MSI2LMP_LIBRARY" == 0 ) setenv MSI2LMP_LIBRARY @LAMMPS_INSTALL_DATADIR@/frc_files diff --git a/cmake/etc/profile.d/lammps.sh.in b/cmake/etc/profile.d/lammps.sh.in index c1967cb5b2..1542a8982f 100644 --- a/cmake/etc/profile.d/lammps.sh.in +++ b/cmake/etc/profile.d/lammps.sh.in @@ -1,5 +1,5 @@ # set environment for LAMMPS and msi2lmp executables # to find potential and force field files -LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_POTENTIALS_DIR@} -MSI2LMP_LIBRARY=${MSI2LMP_LIBRARY-@LAMMPS_FRC_FILES_DIR@} +LAMMPS_POTENTIALS=${LAMMPS_POTENTIALS-@LAMMPS_INSTALL_DATADIR@/potentials} +MSI2LMP_LIBRARY=${MSI2LMP_LIBRARY-@LAMMPS_INSTALL_DATADIR@/frc_files} export LAMMPS_POTENTIALS MSI2LMP_LIBRARY -- GitLab From 010cb0edf304035fafd16b7870dce1a4b05fc7b9 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Fri, 26 Jul 2019 11:10:54 -0500 Subject: [PATCH 216/236] Add warning to cmake if PKG_KIM=ON but DOWNLOAD_KIM not set & KIM is not found This can be a scenario where the user has KIM installed but does not have the environment setup correctly to be found. The config. step should provide some warning of this. Otherwise, it is easy to miss the fact that KIM is being downloaded and built. --- cmake/Modules/Packages/KIM.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 1a9dcf83a4..5987ebbf0a 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -9,6 +9,7 @@ if(PKG_KIM) if(KIM-API_FOUND) set(DOWNLOAD_KIM_DEFAULT OFF) else() + message(WARNING "KIM-API package not found. We will download and build our own") set(DOWNLOAD_KIM_DEFAULT ON) endif() option(DOWNLOAD_KIM "Download KIM-API from OpenKIM instead of using an already installed one" ${DOWNLOAD_KIM_DEFAULT}) -- GitLab From 6a5902ec489b49386cf21b9d6fdc5487baa00f33 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Fri, 26 Jul 2019 11:14:46 -0500 Subject: [PATCH 217/236] Update kim_init to use KIM::Collections::GetItemType() A bit of a cleaner solution. Should be no visible change for users. --- src/KIM/kim_init.cpp | 106 +++++++++++++++++++++++++------------------ 1 file changed, 63 insertions(+), 43 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index bae286aff6..954a4b0f2c 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -164,21 +164,39 @@ void KimInit::determine_model_type_and_units(char * model_name, KIM_TemperatureUnit temperatureUnit; KIM_TimeUnit timeUnit; int units_accepted; - KIM_Model * kim_MO; - - get_kim_unit_names(user_units, lengthUnit, energyUnit, - chargeUnit, temperatureUnit, timeUnit, error); - int kim_error = KIM_Model_Create(KIM_NUMBERING_zeroBased, - lengthUnit, - energyUnit, - chargeUnit, - temperatureUnit, - timeUnit, - model_name, - &units_accepted, - &kim_MO); - - if (!kim_error) { // model is an MO + KIM_Collections * kim_Coll; + KIM_CollectionItemType itemType; + + int kim_error = KIM_Collections_Create(&kim_Coll); + if (kim_error) { + error->all(FLERR,"Unable to access KIM Collections to find Model."); + } + + kim_error = KIM_Collections_GetItemType(kim_Coll, model_name, &itemType); + if (kim_error) { + error->all(FLERR,"KIM Model name not found."); + } + KIM_Collections_Destroy(&kim_Coll); + + if (KIM_CollectionItemType_Equal(itemType, + KIM_COLLECTION_ITEM_TYPE_portableModel)) + { + get_kim_unit_names(user_units, lengthUnit, energyUnit, + chargeUnit, temperatureUnit, timeUnit, error); + KIM_Model * kim_MO; + int kim_error = KIM_Model_Create(KIM_NUMBERING_zeroBased, + lengthUnit, + energyUnit, + chargeUnit, + temperatureUnit, + timeUnit, + model_name, + &units_accepted, + &kim_MO); + + if (kim_error) + error->all(FLERR,"Unable to load KIM Simulator Model."); + model_type = MO; KIM_Model_Destroy(&kim_MO); @@ -213,37 +231,39 @@ void KimInit::determine_model_type_and_units(char * model_name, error->all(FLERR,"KIM Model does not support the requested unit system"); } } + else if (KIM_CollectionItemType_Equal( + itemType, KIM_COLLECTION_ITEM_TYPE_simulatorModel)) { + KIM_SimulatorModel * kim_SM; + kim_error = KIM_SimulatorModel_Create(model_name, &kim_SM); + if (kim_error) + error->all(FLERR,"Unable to load KIM Simulator Model."); + model_type = SM; + + int sim_fields; + int sim_lines; + char const * sim_field; + char const * sim_value; + KIM_SimulatorModel_GetNumberOfSimulatorFields(kim_SM, &sim_fields); + KIM_SimulatorModel_CloseTemplateMap(kim_SM); + for (int i=0; i < sim_fields; ++i) { + KIM_SimulatorModel_GetSimulatorFieldMetadata( + kim_SM,i,&sim_lines,&sim_field); - KIM_SimulatorModel * kim_SM; - kim_error = KIM_SimulatorModel_Create(model_name, &kim_SM); - if (kim_error) - error->all(FLERR,"KIM model name not found"); - model_type = SM; - - int sim_fields; - int sim_lines; - char const * sim_field; - char const * sim_value; - KIM_SimulatorModel_GetNumberOfSimulatorFields(kim_SM, &sim_fields); - KIM_SimulatorModel_CloseTemplateMap(kim_SM); - for (int i=0; i < sim_fields; ++i) { - KIM_SimulatorModel_GetSimulatorFieldMetadata( - kim_SM,i,&sim_lines,&sim_field); - - if (0 == strcmp(sim_field,"units")) { - KIM_SimulatorModel_GetSimulatorFieldLine(kim_SM,i,0,&sim_value); - int len=strlen(sim_value)+1; - *model_units = new char[len]; strcpy(*model_units,sim_value); - break; + if (0 == strcmp(sim_field,"units")) { + KIM_SimulatorModel_GetSimulatorFieldLine(kim_SM,i,0,&sim_value); + int len=strlen(sim_value)+1; + *model_units = new char[len]; strcpy(*model_units,sim_value); + break; + } } - } - KIM_SimulatorModel_Destroy(&kim_SM); + KIM_SimulatorModel_Destroy(&kim_SM); - if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) { - std::string mesg("Incompatible units for KIM Simulator Model, " - "required units = "); - mesg += *model_units; - error->all(FLERR,mesg.c_str()); + if ((! unit_conversion_mode) && (strcmp(*model_units, user_units)!=0)) { + std::string mesg("Incompatible units for KIM Simulator Model, " + "required units = "); + mesg += *model_units; + error->all(FLERR,mesg.c_str()); + } } } -- GitLab From 0f10c55c1cbc693491c6d180807a7ca40f61b18a Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 26 Jul 2019 17:26:59 -0400 Subject: [PATCH 218/236] avoid recursive header inclusion --- lib/poems/system.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/poems/system.h b/lib/poems/system.h index 1b59395de7..573044ce33 100644 --- a/lib/poems/system.h +++ b/lib/poems/system.h @@ -15,7 +15,6 @@ * CONTACT: anderk5@rpi.edu * *_________________________________________________________________________*/ - #ifndef SYSTEM_H #define SYSTEM_H @@ -31,7 +30,6 @@ #include "workspace.h" #include "matrixfun.h" #include "onsolver.h" -#include "system.h" #include "inertialframe.h" #include "rigidbody.h" #include "revolutejoint.h" -- GitLab From a0abd270b53f58dd99b702ee1fa2691960ee3738 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 29 Jul 2019 11:41:01 -0500 Subject: [PATCH 219/236] kim_query check for empty query result --- src/KIM/kim_query.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index 6688ed6690..e81e8c5d18 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -130,11 +130,13 @@ void KimQuery::command(int narg, char **arg) // as the first element, and then the error message // that was returned by the web server + char errmsg[1024]; if (0 == strlen(value)) { - char errmsg[1024]; - sprintf(errmsg,"OpenKIM query failed: %s",value+1); - error->all(FLERR,errmsg); + error->all(FLERR,errmsg); + } else if (0 == strcmp(value,"EMPTY")) { + sprintf(errmsg,"OpenKIM query returned no results"); + error->all(FLERR,errmsg); } char **varcmd = new char*[3]; @@ -269,7 +271,11 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg, if (value[len] == ']') { retval = new char[len]; value[len] = '\0'; - strcpy(retval,value+1); + if (0 == strcmp(value+1, "")) { + strcpy(retval,"EMPTY"); + } + else + strcpy(retval,value+1); } else { retval = new char[len+2]; retval[0] = '\0'; -- GitLab From 5307558727d3b7ea07a3a664aa9e550713547239 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 13:34:04 -0400 Subject: [PATCH 220/236] need to install some base C++ headers for C++ library use --- cmake/CMakeLists.txt | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 7cd7b62c91..eee595df7e 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -497,10 +497,44 @@ if(BUILD_LIB) if(LAMMPS_DEPS) add_dependencies(lammps ${LAMMPS_DEPS}) endif() + set(LAMMPS_CXX_HEADERS + angle.h + atom.h + bond.h + citeme.h + comm.h + compute.h + dihedral.h + domain.h + error.h + fix.h + force.h + group.h + improper.h + input.h + kspace.h + lammps.h + lattice.h + lmppython.h + memory.h + modify.h + neighbor.h + neigh_list.h + output.h + pair.h + pointers.h + region.h + timer.h + universe.h + update.h + variable.h) + list(TRANSFORM LAMMPS_CXX_HEADERS PREPEND ${LAMMPS_SOURCE_DIR}/) + set_target_properties(lammps PROPERTIES OUTPUT_NAME lammps${LAMMPS_LIB_SUFFIX}) set_target_properties(lammps PROPERTIES SOVERSION ${SOVERSION}) install(TARGETS lammps LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(FILES ${LAMMPS_SOURCE_DIR}/library.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps) + install(FILES ${LAMMPS_CXX_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lammps) configure_file(pkgconfig/liblammps.pc.in ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liblammps${LAMMPS_LIB_SUFFIX}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) configure_file(FindLAMMPS.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindLAMMPS${LAMMPS_LIB_SUFFIX}.cmake @ONLY) -- GitLab From 96e0b03ede16ae551fde9fce4c2657e9d972181f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 13:38:38 -0400 Subject: [PATCH 221/236] .frc files only need to be installed if msi2lmp is built --- cmake/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index eee595df7e..eaa699106c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -587,7 +587,9 @@ include(Documentation) ############################################################################### set(LAMMPS_INSTALL_DATADIR ${CMAKE_INSTALL_FULL_DATADIR}/lammps) install(DIRECTORY ${LAMMPS_POTENTIALS_DIR} DESTINATION ${LAMMPS_INSTALL_DATADIR}) -install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR}) +if(BUILD_TOOLS) + install(DIRECTORY ${LAMMPS_TOOLS_DIR}/msi2lmp/frc_files DESTINATION ${LAMMPS_INSTALL_DATADIR}) +endif() configure_file(etc/profile.d/lammps.sh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.sh @ONLY) configure_file(etc/profile.d/lammps.csh.in ${CMAKE_BINARY_DIR}/etc/profile.d/lammps.csh @ONLY) -- GitLab From 6a1b61637bb7eaded180ef01167c7e3295af1ce6 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 13:43:06 -0400 Subject: [PATCH 222/236] provide some more details about 'make install' with CMake --- doc/src/Build_cmake.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/src/Build_cmake.txt b/doc/src/Build_cmake.txt index a16ba995a8..8106b008bb 100644 --- a/doc/src/Build_cmake.txt +++ b/doc/src/Build_cmake.txt @@ -52,11 +52,16 @@ LAMMPS or need to re-compile LAMMPS repeatedly, installation of the ccache (= Compiler Cache) software may speed up repeated compilation even more. -After compilation, you can optionally copy the LAMMPS executable and -library into your system folders (by default under $HOME/.local) with: +After compilation, you may optionally install the LAMMPS executable into +your system with: make install # optional, copy LAMMPS executable & library elsewhere :pre +This will install the lammps executable and library (if requested), some +tools (if configured) and additional files like library API headers, manpages, +potential files. The location of the installation tree is set by the CMake +variable "CMAKE_INSTALL_PREFIX" which defaults to $\{HOME\}/.local + :line There are 3 variants of CMake: a command-line version (cmake), a text mode -- GitLab From e0b20c4fd404cff90e2a6335862b1dcca69e22b3 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 15:23:23 -0400 Subject: [PATCH 223/236] add false positive --- doc/src/Build_cmake.txt | 7 ++++--- doc/utils/sphinx-config/false_positives.txt | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/src/Build_cmake.txt b/doc/src/Build_cmake.txt index 8106b008bb..6eb23b2bb5 100644 --- a/doc/src/Build_cmake.txt +++ b/doc/src/Build_cmake.txt @@ -58,9 +58,10 @@ your system with: make install # optional, copy LAMMPS executable & library elsewhere :pre This will install the lammps executable and library (if requested), some -tools (if configured) and additional files like library API headers, manpages, -potential files. The location of the installation tree is set by the CMake -variable "CMAKE_INSTALL_PREFIX" which defaults to $\{HOME\}/.local +tools (if configured) and additional files like library API headers, +manpages, potential and force field files. The location of the installation +tree is set by the CMake variable "CMAKE_INSTALL_PREFIX" which defaults +to $\{HOME\}/.local :line diff --git a/doc/utils/sphinx-config/false_positives.txt b/doc/utils/sphinx-config/false_positives.txt index da5c869075..e6fdaf826b 100644 --- a/doc/utils/sphinx-config/false_positives.txt +++ b/doc/utils/sphinx-config/false_positives.txt @@ -1539,6 +1539,7 @@ Mandelli Manh manifoldforce Manolopoulos +manpages manybody MANYBODY Maras -- GitLab From 2afc498a2b595157ef63c50894c03e5106b57dbc Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 29 Jul 2019 15:04:15 -0500 Subject: [PATCH 224/236] Add logging to kim_query (compile error at moment) --- src/KIM/kim_query.cpp | 15 ++++++++++++++- src/KIM/kim_query.h | 4 ++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index e81e8c5d18..e2bee158ed 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -154,14 +154,16 @@ void KimQuery::command(int narg, char **arg) varcmd[0] = const_cast(splitname.str().c_str()); varcmd[2] = const_cast(token.c_str()); input->variable->set(3,varcmd); + echo_var_assign(splitname.str(), varcmd[2]); } } else { varcmd[0] = varname; varcmd[1] = (char *) "string"; varcmd[2] = value; - input->variable->set(3,varcmd); + + echo_var_assign(varname, value); } delete[] varcmd; @@ -297,3 +299,14 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg, return retval; } #endif + +void KimQuery::echo_var_assign(std::string const & name, + std::string const & value) const +{ + if (comm->me == 0) { + std::string mesg; + mesg = name + " = " + value + "\n"; + if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); + if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); + } +} diff --git a/src/KIM/kim_query.h b/src/KIM/kim_query.h index b5433def79..9cffc9ad28 100644 --- a/src/KIM/kim_query.h +++ b/src/KIM/kim_query.h @@ -64,6 +64,7 @@ CommandStyle(kim_query,KimQuery) #define LMP_KIM_QUERY_H #include "pointers.h" +#include namespace LAMMPS_NS { @@ -71,6 +72,9 @@ class KimQuery : protected Pointers { public: KimQuery(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); + private: + void echo_var_assign(std::string const & name, std::string const & value) + const; }; } -- GitLab From 0beb39c1af9cf93979452cdd84722c3118cbebfb Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 15:59:42 -0400 Subject: [PATCH 225/236] fully integrate compute gyration/shape into doc build system --- doc/src/Commands_compute.txt | 1 + doc/src/Eqs/compute_shape_parameters.jpg | Bin 0 -> 7007 bytes doc/src/Eqs/compute_shape_parameters.tex | 3 +- doc/src/Errors_messages.txt | 8 ++++ doc/src/compute.txt | 1 + doc/src/compute_gyration.txt | 3 +- doc/src/compute_gyration_shape.txt | 48 ++++++++++---------- doc/src/computes.txt | 1 + doc/src/lammps.book | 1 + doc/utils/sphinx-config/false_positives.txt | 6 +++ 10 files changed, 46 insertions(+), 26 deletions(-) create mode 100644 doc/src/Eqs/compute_shape_parameters.jpg diff --git a/doc/src/Commands_compute.txt b/doc/src/Commands_compute.txt index f566702609..3413116e80 100644 --- a/doc/src/Commands_compute.txt +++ b/doc/src/Commands_compute.txt @@ -66,6 +66,7 @@ KOKKOS, o = USER-OMP, t = OPT. "group/group"_compute_group_group.html, "gyration"_compute_gyration.html, "gyration/chunk"_compute_gyration_chunk.html, +"gyration/shape"_compute_gyration_shape.html, "heat/flux"_compute_heat_flux.html, "heat/flux/tally"_compute_tally.html, "hexorder/atom"_compute_hexorder_atom.html, diff --git a/doc/src/Eqs/compute_shape_parameters.jpg b/doc/src/Eqs/compute_shape_parameters.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9e2374561b40690173497a2e1c9a28c869b0c819 GIT binary patch literal 7007 zcmex=oIr{vTivYZ;lC8CV2ag%k}P*@OcV*_8@Kj2b5{E zCr+Nabot8FYu9hwy!G(W<0ns_J%91?)yGetzkL1n{m0K=Ab&A3FoS&sA|M_^^Oqn4 z6C)D~3o{El$X|?1Sas$bx1YB0@MQ!g0foS!c2zxGb1R?2~CEWOVlss_mn^2o0~o7-<1vj85VV} z`pLN% zW4Em{)epYk>UsQePXHT#qrNGxL-uy@s-ExLPOkFKO}nhc{PcLM`jb$0{r%e=wAZaG zJ`h!S$%cPP#EF|byh|rNp69au_wn=lo||4+y|^KCYBNt0Uy%mml@ResF-J3%Z#hgp z$9_`yp7*n_|C@W zrgt7(JKs)Is55zM^*(amgLMm+M&EK0nW$1eFH`-pwD|ow*UdkcM*K0~pL#Ol`L^=o z-(5aV{#p7*gX!DaRj=wKH*LJKReHrbg-MSj^d}~BZ1~wDV3WR1bViC{PT!+ls~+w% z(DwXrKCsO$by{{v58u+>BNgkOHCUX!y<(|rpf|DMV`gR{UEwIxt#uzq-&t9y z9I>odR658~D<3W_ zE?lOzvUW%8D=zhn&J(TtniBGFRzAPlE%$ZmgVkr9{xbx8)Y)#;^Svw}%QrJaEriu2 zi+SS45Wzhg{xdXOcU^hkc}d3gSuG1Va^BucleG&8s$ZH|W4pyFzv0W4ou%SN&fj)V z@>hJS=63$kkvb8^D;M3|*GDyd@}99a_RZT%j|zJ??%5ZSSNU^8;qk2uuJtR9FP|N6 zD7)`+!M4}iH=7msZx=1v(JvTZ(bzZnS;n-^UN@y3S2#}|PN-k~_;sx4)O*`?FR4D8 zn48ad?xoO|6YerK`y$TUePLYT<|ui5$2#waf8Q-!nR#pJ(`O59-|((HFFIwi7V{Ig z+l)U&-F4Pfh3)SuEnM&;IP_`}bJVSqTIsu4t=%6LXvwp^>|R)5?sZwB-|X5=vAQac z5aZ_`lj@}y?ylj`oA3QG{aZ-i+3Xcg-_2(C)$A1LH#2H5%$#WB{7^DMdbw1~snxHRT}rB-uz+t(vGGqN5+O z-<;=hXrfB>cGiRgUsNWz8BV_OXl+!)($$`d(;}BoW_&iK=?q(e1p|Xo1p}YwE8i$+ zot@O~FaL0KOPp`ZwoB1p@7%Xg*r>ibW%B%} zJBu1DcS{H#mE)f7agCYt7Td-vg3>&jSZ^JXuaopII8}Yw^sZX8J$qKuS(SbJBjPeb z8~#2yEqCMC1qO>-J0xDQ*JUq>NRFHr+UwHCkj^}f+2Z84lYd_ATe|Fa*0r>2Z_SVH zRgtijlrWlqaEe^TqXtWUzN0MvbhmBY^7+>3!?$e0CeB=(qUKq6v%!*+tNwoJ-B52{ zv+KT|VK+H4ml&N^HcX#*g1Ol6$s7jT28IO2uoukMVV9R&;ccJxYJb|EzK7e(x#zL( zH(l&1!Z>%`i);H7F6Nc2KJfNO<_HkPlh&YM&nIRWjn>*)&O6cJ|X_h7%an zmCLOrx&K}NxVlm#Z`;L%lZ%@V?wrCP{%Yg9^M6aDUc8*>EW^1;Kd}-^Jy+P-+ca*Shn|H1vSIk3k zhW>f32{TzeWn>pLH=lUaV76jK-h15~-IQH>cDCKRXE=RYI!BjPkw4SM{|pb!KTQA2 zE2aLAN9jMqqZQ0mT_-kwjBhXHUb1!5^)IVucUpKP?&-a|<2-}RJngs!je~15%cJJp zO5L|GSN99|uIP%VJRf@=>#!?N()wCBPy9ba=ls4sk!$A9vPfoqW71pyGdxOvyk0C@{aK%6 z;-v-Z8#>E9|1a>)JL1|!K>r%O6*LVRVle= z|MxZr%VQSj*XG@-*mmmOZLgV%^R4Dy*|uRBqxIs?=7!JTC8;U&Em$veZP{XrO_$ca z6XSgPX;G!k>Qpv&1>siN8{fXKGe5LT_fpocpv|2nYq@=Y>u%ZS*nM{9x28KA?>MRJ zSe%}dK8K-vYvX?gj=9_FpJ=YDe{d=PpVsyl3wXTid2Zj1Id1jJ>hO#k29c(ck$%4n2Dx1gu_;sXJeEYgDzip0?2@Fm_?0 z^w%KHFu5NJpYJu8feYg$R?FrWmR*~0|JKQ(1=Cv9f*!N8KV`R(dbV)a6}^2L_g}tT z8Dlpycj=PJ(GQu9oAfy`IJNy=aePwM6>+N|{}n&-{Wi`#y1f0J;IsX6k3CZ|mO3Ea zd*=4BHw6alL97gAUjlumIr8XhGdXD{_h&KGibnhI@pbpzy014fd1tFyXx;(?7UrK< zXEA6ksaiJQ^x@{Ne^=kN6*HY#dd%w2&hw(@YBvYWezfuO!z<}lB~tOX@^rhF9i4bT zB|%{KF753q-&RfE<>X!X@UGOMO1rZQ@44E1|IWv)#~9jTE1h5qyne+Gs=eJe+M6TUGQYU)3bf!Xt)F(mB&gg=eZ|AER zZYxbVjzkRUWX1esV*6!oVbEa8X)Rf8VGw{p_J&1ya0@%4B@bnum@9v&9DEE26A-%f4( z&(Ik9o1fuFx$nNVPq%KpKi7I@;?G^ZM^;HZpSxZ$s8W66^;xrhF67i`FZFy9`?KuZ zMbD?Um-SAU=)`WSc&t9j-&N-0tP@*zUeT{{UKMrp5vS0(gKsW)T|D+L2+O;cl4ai)p2NuaJbfI z6{GU)uH6nY@lBEWU(btX=NvYl)w#8K{$9~d9iMEsPyh4k>+%L0>*QL|CuY~@l?44f z{VdDeNbk?PJE2Ro{3@T6K3nrLPO{l)>m*&fN~1;jn>ia&TTVT5d%>8vqi?xIfUW2A zoUebwYR!Ej-bX&W^7VSt-MJz=wshXu=Vo~7(4WWs231@P?_W>7w*HSxiLHZOYubw3 zC9G|W{Mas^v)T1()wabs*Jq{PT_v#AL|;OEfvU&9EsW=1ivLrRGHr<&ky`(xcS*P@79)C3$CV@CU1Q5+hIz>jT1i|Vjh24ckP(< zl+Jr^56*Je3ys!lUJ!WT1;hE3C*M2pTuHgIsMT*~W@fQw{>;3*C|2exqP?GLH`r~R z{cXS4e})UfF8>)0?%DsRH!7-cdgiJ_8{^#0b=_`=l(hV{QgrTr29C1!{|t7U>mS72 z{}aj(b9vddrBjbBU;gsj#nzuuw|+iX`6X~sjeVd0r7hXkeiyd<)e4_>PTalp*3o6< zk6#?Q*2_@*pW(yYANK#+_VWK{U^Dp7@G*4Zvg}=U+n@bsNO`r*{GXrA`Asn@yN&0h zXIh-&k9Q7;ujspU!0#FN$w%AH&)40$+hb!w%5#}H<=m63ul|;P9qV_D`?chy>c|T= zMaPQP@E1Br7XP?>Xxnz7+jlBvyR}u!Su*itz0f8D3x%eeEOLf{{}~RIKlsn^OX`dL zABn^N8IFeatzD%zJzJXN&+E=70?`iAY>|8g#y1!^)i(rHhsF!OethVk?ELUuTW7tp zPT@7WEyBY0{CVQBY9@c>E{4_Sy*8r7EED`6JhFT$&~Y}rmCcXITbJ#z??djgwYjU}er!J+bT8WB zqOx-_OZDB4&wPF;>m4a!V4U`P&h-V6F@HB5y7&52#hw?_{B{3*N?~q(XB>Qi-5%4~ z?tj$l`2RC3T<`p!;b4#bpU@JKnUc!N$}1M|@c;1pBmbYlIj;RbL$gHvk5%>$tv}TN z<*kzc$CLP<;nC^^Yx;$=KmJH|*m?E&mU+*(6L+~bEJ%%ypV?MxU{v|iK~(kQ_GY!t zN7Ii=aUXjXdT}dUC z(|3bqj)tWL!~8?*?!7X&G2`MjPqpcGF@}oiHKi7B*xWo1NXmTD+BWr(G;h+gSJ&7k zS)X=dJ-X)Oj3@mzO^&bllZ^P+GGxKqg{~ru=Z=fcZ!*#Kd-v?ur)PK9rS86MoS$&X z%q6hFdgB4vqI+NcAI@v7et4fL;>IftEHr)~Kh7Oz?^ zuzF{Oy#~A87si>zio1SHP0TuOcr$a-UDp2$%O+VJll~A|_@9BvH29JDuhM<(4?ljc z&w4ds$;#I}>E|YY>ES=NHcoT%kLk-|E&g8pHrI4U{;!O_O&Wi~&)9zu4$R&ax6;11 zS(*c;-HUWtC%AxxcjnI`{*TG)f0{7FW!=h~^J@C7 z)}^a0PObT@C1krPd-m3ka&0z+t4@`!wQ#$YJ8AXoB?pzf*EAGgNvTWPbyA@%iD#qR zlaf0N9&OOg$^Fmp(CX^uY_aoiZtK*&Nw&+qR=@nEgLGI`Z{MPxZ|2j!d$sdi@LI?C z#lrM-jmLimpNl1bS&B;MdU3lmub(1)X2M@HH}}V}H3dgGlr%0fK4}fmp7v30=E^%2 zyIroV)jjgz#_hWt#~zr)c&u7+hErbe?w_9dX9CzGU5l?*ty`G?=&iO_|H%ryph(qI zbN_{87^^uRuuDF+AbHv2m)&yWSC?NealNw4lb0 ztd(ou@4ziv%cQ5K&kdOPiqZ63#E*XGc!_Kyv#rZHZr!?~ExqKR!s$6Ozx&VaI;s0` zMzfCLPFZdZ)5gT){QnG`eOqToZ2LRwx@1rCnw<-HSKB(B4(wgBanJT$y?)m+RQVXc zoG?9IfVRy-B~r_wAkRcjel@N2ccH<=29uwHoR?lK9v{ zQaj(z^S}4#eWOzT54U}{4zmaD-myRM-;qn3m;bW}+Z6>K=K^)FPS1CZ{NtIvwszYq z^KDHYcIWz7g4h(Ewpl96gzGOpsJ8iIa?nTB723<9G7ozRecL(1d+(`VEx&huJ;%?s zYW6{8s+(P6>fMbJjc0nHcm+%BOr+(96R8H{YBP^q8o}*}@}n r Date: Mon, 29 Jul 2019 16:16:24 -0400 Subject: [PATCH 226/236] cleanup of compute gyration/shape code. - use MathSpecial::square(x) instead of pow(x,2) for improved precision and handling of small and negative numbers - remove unused include statements - no need to refetch the compute in every step. during init() is sufficient --- src/USER-MISC/compute_gyration_shape.cpp | 47 +++++++++++------------- src/USER-MISC/compute_gyration_shape.h | 7 ++++ 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/USER-MISC/compute_gyration_shape.cpp b/src/USER-MISC/compute_gyration_shape.cpp index 0e566e671f..a0ee6089b7 100644 --- a/src/USER-MISC/compute_gyration_shape.cpp +++ b/src/USER-MISC/compute_gyration_shape.cpp @@ -16,17 +16,14 @@ * ------------------------------------------------------------------------- */ +#include "compute_gyration_shape.h" #include #include -#include "compute_gyration_shape.h" -#include "math_extra.h" -#include "update.h" -#include "atom.h" -#include "group.h" -#include "domain.h" #include "error.h" +#include "math_extra.h" +#include "math_special.h" #include "modify.h" -#include "compute.h" +#include "update.h" using namespace LAMMPS_NS; @@ -67,27 +64,26 @@ void ComputeGyrationShape::init() // check that the compute gyration command exist int icompute = modify->find_compute(id_gyration); if (icompute < 0) - error->all(FLERR,"Compute gyration does not exist for compute gyration/shape"); + error->all(FLERR,"Compute gyration ID does not exist for " + "compute gyration/shape"); // check the id_gyration corresponds really to a compute gyration command c_gyration = (Compute *) modify->compute[icompute]; if (strcmp(c_gyration->style,"gyration") != 0) - error->all(FLERR,"Compute gyration/shape does not use gyration compute"); + error->all(FLERR,"Compute gyration compute ID does not point to " + "gyration compute for compute gyration/shape"); } /* ---------------------------------------------------------------------- - compute shape parameters based on the eigenvalues of the gyration tensor of group of atoms + compute shape parameters based on the eigenvalues of the + gyration tensor of group of atoms ------------------------------------------------------------------------- */ void ComputeGyrationShape::compute_vector() { invoked_vector = update->ntimestep; - - // get the gyration tensor from the compute gyration - int icompute = modify->find_compute(id_gyration); - Compute *compute = modify->compute[icompute]; - compute->compute_vector(); - double *gyration_tensor = compute->vector; + c_gyration->compute_vector(); + double *gyration_tensor = c_gyration->vector; // call the function for the calculation of the eigenvalues double ione[3][3], evalues[3], evectors[3][3]; @@ -100,7 +96,8 @@ void ComputeGyrationShape::compute_vector() ione[0][2] = ione[2][0] = gyration_tensor[5]; int ierror = MathExtra::jacobi(ione,evalues,evectors); - if (ierror) error->all(FLERR, "Insufficient Jacobi rotations for gyration/shape"); + if (ierror) error->all(FLERR, "Insufficient Jacobi rotations " + "for gyration/shape"); // sort the eigenvalues according to their size with bubble sort double t; @@ -115,19 +112,19 @@ void ComputeGyrationShape::compute_vector() } // compute the shape parameters of the gyration tensor - double sq_eigen_x = pow(evalues[0], 2); - double sq_eigen_y = pow(evalues[1], 2); - double sq_eigen_z = pow(evalues[2], 2); + double sq_eigen_x = MathSpecial::square(evalues[0]); + double sq_eigen_y = MathSpecial::square(evalues[1]); + double sq_eigen_z = MathSpecial::square(evalues[2]); - double nominator = pow(sq_eigen_x, 2) + pow(sq_eigen_y, 2) + pow(sq_eigen_z, 2); - double denominator = pow(sq_eigen_x+sq_eigen_y+sq_eigen_z, 2); + double nominator = MathSpecial::square(sq_eigen_x) + + MathSpecial::square(sq_eigen_y) + + MathSpecial::square(sq_eigen_z); + double denominator = MathSpecial::square(sq_eigen_x+sq_eigen_y+sq_eigen_z); vector[0] = evalues[0]; vector[1] = evalues[1]; vector[2] = evalues[2]; vector[3] = sq_eigen_z - 0.5*(sq_eigen_x + sq_eigen_y); vector[4] = sq_eigen_y - sq_eigen_x; - vector[5] = 0.5*(3*nominator/denominator -1); - + vector[5] = 0.5*(3*nominator/denominator - 1.0); } - diff --git a/src/USER-MISC/compute_gyration_shape.h b/src/USER-MISC/compute_gyration_shape.h index 1b39dd2e38..1d58f000dd 100644 --- a/src/USER-MISC/compute_gyration_shape.h +++ b/src/USER-MISC/compute_gyration_shape.h @@ -50,4 +50,11 @@ Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. +E: Compute gyration ID does not exist for compute gyration/shape + +Self-explanatory. Provide a valid compute ID + +E: Compute gyration/shape compute ID does not point to a gyration compute + +Self-explanatory. Provide an ID of a compute gyration command. */ -- GitLab From 0f059c56f946b9de88a869401370e6e874fd808c Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 29 Jul 2019 15:30:46 -0500 Subject: [PATCH 227/236] Add details about installing models to KIM example input --- examples/kim/in.kim-pm-query.melt | 9 +++++++++ examples/kim/in.kim-pm.melt | 9 +++++++++ examples/kim/in.kim-sm.melt | 11 ++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/examples/kim/in.kim-pm-query.melt b/examples/kim/in.kim-pm-query.melt index d39dd2d464..fa04d90436 100644 --- a/examples/kim/in.kim-pm-query.melt +++ b/examples/kim/in.kim-pm-query.melt @@ -4,6 +4,15 @@ # SW_StillingerWeber_1985_Si__MO_405512056662_005 # is installed. This can be done with the command # kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005 +# If this command does not work, you may need to setup your PATH to find the utility. +# If you installed the kim-api using the LAMMPS CMake build, you can do the following +# (where the current working directory is assumed to be the LAMMPS build directory) +# source ./kim_build-prefix/bin/kim-api-activate +# If you installed the kim-api using the LAMMPS Make build, you can do the following +# (where the current working directory is assumed to be the LAMMPS src directory) +# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate +# (where you should relplace X.Y.Z with the appropriate kim-api version number). +# # Or, see https://openkim.org/doc/obtaining-models for alternative options. # diff --git a/examples/kim/in.kim-pm.melt b/examples/kim/in.kim-pm.melt index 999cf77180..9959a66793 100644 --- a/examples/kim/in.kim-pm.melt +++ b/examples/kim/in.kim-pm.melt @@ -4,6 +4,15 @@ # SW_StillingerWeber_1985_Si__MO_405512056662_005 # is installed. This can be done with the command # kim-api-collections-management install user SW_StillingerWeber_1985_Si__MO_405512056662_005 +# If this command does not work, you may need to setup your PATH to find the utility. +# If you installed the kim-api using the LAMMPS CMake build, you can do the following +# (where the current working directory is assumed to be the LAMMPS build directory) +# source ./kim_build-prefix/bin/kim-api-activate +# If you installed the kim-api using the LAMMPS Make build, you can do the following +# (where the current working directory is assumed to be the LAMMPS src directory) +# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate +# (where you should relplace X.Y.Z with the appropriate kim-api version number). +# # Or, see https://openkim.org/doc/obtaining-models for alternative options. # diff --git a/examples/kim/in.kim-sm.melt b/examples/kim/in.kim-sm.melt index 32f8c6170f..0ee8e9a857 100644 --- a/examples/kim/in.kim-sm.melt +++ b/examples/kim/in.kim-sm.melt @@ -4,7 +4,16 @@ # Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 # is installed. This can be done with the command # kim-api-collections-management install user Sim_LAMMPS_ReaxFF_StrachanVanDuinChakraborty_2003_CHNO__SM_107643900657_000 -# Or, see https://openkim.org/doc/obtaining-models for alternative options. +# If this command does not work, you may need to setup your PATH to find the utility. +# If you installed the kim-api using the LAMMPS CMake build, you can do the following +# (where the current working directory is assumed to be the LAMMPS build directory) +# source ./kim_build-prefix/bin/kim-api-activate +# If you installed the kim-api using the LAMMPS Make build, you can do the following +# (where the current working directory is assumed to be the LAMMPS src directory) +# source ../lib/kim/installed-kim-api-X.Y.Z/bin/kim-api-activate +# (where you should relplace X.Y.Z with the appropriate kim-api version number). +# +# See https://openkim.org/doc/obtaining-models for alternative options. # variable x index 1 -- GitLab From ea4107c4b433082aad60b811588e8e53fc1c1651 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 16:36:57 -0400 Subject: [PATCH 228/236] add write_echo() method to Input class for logging implicit commands where the echo command would send explicit ones --- src/KIM/kim_init.cpp | 14 ++++---------- src/KIM/kim_interactions.cpp | 3 +-- src/KIM/kim_query.cpp | 3 +-- src/input.cpp | 11 +++++++++++ src/input.h | 5 ++--- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/src/KIM/kim_init.cpp b/src/KIM/kim_init.cpp index 954a4b0f2c..a4272caa01 100644 --- a/src/KIM/kim_init.cpp +++ b/src/KIM/kim_init.cpp @@ -377,8 +377,7 @@ void KimInit::kim_init_log_delimiter(std::string const begin_end) const mesg = "#=== END kim-init ============================================\n\n"; - if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); - if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); + input->write_echo(mesg.c_str()); } } @@ -425,8 +424,7 @@ void KimInit::do_variables(char *user_units, char *model_units) mesg += " to "; mesg += to; mesg += ":\n"; - if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); - if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); + input->write_echo(mesg.c_str()); } for (int i = 0; i < nunits; i++) { @@ -455,14 +453,10 @@ void KimInit::do_variables(char *user_units, char *model_units) << " internal " << std::setprecision(12) << std::scientific << conversion_factor << std::endl; - if ((screen) && (input->echo_screen)) fputs(mesg.str().c_str(),screen); - if ((logfile) && (input->echo_log)) fputs(mesg.str().c_str(),logfile); + input->write_echo(mesg.str().c_str()); } } - if (comm->me == 0) { - if ((screen) && (input->echo_screen)) fputs("#\n",screen); - if ((logfile) && (input->echo_log)) fputs("#\n",logfile); - } + if (comm->me == 0) input->write_echo("#\n"); } /* ---------------------------------------------------------------------- */ diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp index 449b6bcb13..7dbe523033 100644 --- a/src/KIM/kim_interactions.cpp +++ b/src/KIM/kim_interactions.cpp @@ -106,8 +106,7 @@ void KimInteractions::kim_interactions_log_delimiter( mesg = "#=== END kim_interactions ====================================\n\n"; - if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); - if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); + input->write_echo(mesg.c_str()); } } diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index e2bee158ed..1e699e74b0 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -306,7 +306,6 @@ void KimQuery::echo_var_assign(std::string const & name, if (comm->me == 0) { std::string mesg; mesg = name + " = " + value + "\n"; - if ((screen) && (input->echo_screen)) fputs(mesg.c_str(),screen); - if ((logfile) && (input->echo_log)) fputs(mesg.c_str(),logfile); + input->write_echo(mesg.c_str()); } } diff --git a/src/input.cpp b/src/input.cpp index 08e3655437..8bf4fc12e1 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -314,6 +314,17 @@ char *Input::one(const char *single) return command; } +/* ---------------------------------------------------------------------- + Send text to active echo file pointers +------------------------------------------------------------------------- */ +void Input::write_echo(const char *txt) +{ + if (me == 0) { + if (echo_screen && screen) fputs(txt,screen); + if (echo_log && logfile) fputs(txt,logfile); + } +} + /* ---------------------------------------------------------------------- parse copy of command line by inserting string terminators strip comment = all chars from # on diff --git a/src/input.h b/src/input.h index dc5a2670d4..b86982cb39 100644 --- a/src/input.h +++ b/src/input.h @@ -25,8 +25,6 @@ class Input : protected Pointers { friend class Info; friend class Error; friend class Deprecated; - friend class KimInit; - friend class KimInteractions; public: int narg; // # of command args @@ -41,7 +39,8 @@ class Input : protected Pointers { void substitute(char *&, char *&, int &, int &, int); // substitute for variables in a string int expand_args(int, char **, int, char **&); // expand args due to wildcard - + void write_echo(const char *); // send text to active echo file pointers + protected: char *command; // ptr to current command int echo_screen; // 0 = no, 1 = yes -- GitLab From 2ffc35297bfc7904051cbc18ec4c6ea7d6599d86 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 16:57:34 -0400 Subject: [PATCH 229/236] make kim_query log of variable setting look more like other KIM log messages this adds BEGIN/END marker comments and echoes the actual command line that the kim_query command implicitly executes --- src/KIM/kim_query.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index 1e699e74b0..cfb26c4d5e 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -305,7 +305,9 @@ void KimQuery::echo_var_assign(std::string const & name, { if (comm->me == 0) { std::string mesg; - mesg = name + " = " + value + "\n"; + mesg = "#=== BEGIN kim_query =========================================\n"; + mesg += "variable " + name + " string " + value + "\n"; + mesg += "#=== END kim_query ===========================================\n"; input->write_echo(mesg.c_str()); } } -- GitLab From c03e9c9711b5eed9ba3e2c589c18af4b5728e7e7 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 29 Jul 2019 16:11:08 -0500 Subject: [PATCH 230/236] Adjust write_echo() within kim_query --- src/KIM/kim_query.cpp | 23 +++++++++++++++++++++-- src/KIM/kim_query.h | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index cfb26c4d5e..e35afa9a8b 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -139,6 +139,7 @@ void KimQuery::command(int narg, char **arg) error->all(FLERR,errmsg); } + kim_query_log_delimiter("begin"); char **varcmd = new char*[3]; if (split) { int counter = 1; @@ -165,6 +166,7 @@ void KimQuery::command(int narg, char **arg) echo_var_assign(varname, value); } + kim_query_log_delimiter("end"); delete[] varcmd; delete[] value; @@ -300,14 +302,31 @@ char *do_query(char *qfunction, char * model_name, int narg, char **arg, } #endif +/* ---------------------------------------------------------------------- */ + +void KimQuery::kim_query_log_delimiter(std::string const begin_end) const +{ + if (comm->me == 0) { + std::string mesg; + if (begin_end == "begin") + mesg = + "#=== BEGIN kim-query =========================================\n"; + else if (begin_end == "end") + mesg = + "#=== END kim-query ===========================================\n\n"; + + input->write_echo(mesg.c_str()); + } +} + +/* ---------------------------------------------------------------------- */ + void KimQuery::echo_var_assign(std::string const & name, std::string const & value) const { if (comm->me == 0) { std::string mesg; - mesg = "#=== BEGIN kim_query =========================================\n"; mesg += "variable " + name + " string " + value + "\n"; - mesg += "#=== END kim_query ===========================================\n"; input->write_echo(mesg.c_str()); } } diff --git a/src/KIM/kim_query.h b/src/KIM/kim_query.h index 9cffc9ad28..33a37f5131 100644 --- a/src/KIM/kim_query.h +++ b/src/KIM/kim_query.h @@ -73,6 +73,7 @@ class KimQuery : protected Pointers { KimQuery(class LAMMPS *lmp) : Pointers(lmp) {}; void command(int, char **); private: + void kim_query_log_delimiter(std::string const begin_end) const; void echo_var_assign(std::string const & name, std::string const & value) const; }; -- GitLab From 9f276be0e532cee13031b807303cb8ffb5b0d43f Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 20:48:47 -0400 Subject: [PATCH 231/236] fix up legacy doc building for final kim doc files --- doc/src/lammps.book | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/lammps.book b/doc/src/lammps.book index 79b410c783..a3ec9c568b 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -168,7 +168,7 @@ include.html info.html jump.html kim_query.html -kim_style.html +kim_commands.html label.html lattice.html log.html -- GitLab From 90c678849ade82a139852971a5040039485ecfbf Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 21:10:49 -0400 Subject: [PATCH 232/236] replace non-ascii characters with ASCII equivalents --- doc/src/compute.txt | 2 +- doc/src/kim_commands.txt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/src/compute.txt b/doc/src/compute.txt index 53ed373aa5..0741699e61 100644 --- a/doc/src/compute.txt +++ b/doc/src/compute.txt @@ -177,7 +177,7 @@ compute"_Commands_compute.html doc page are followed by one or more of "angle"_compute_angle.html - energy of each angle sub-style "angle/local"_compute_angle_local.html - theta and energy of each angle "angmom/chunk"_compute_angmom_chunk.html - angular momentum for each chunk -"basal/atom"_compute_basal_atom.html - calculates the hexagonal close-packed “c” lattice vector of each atom +"basal/atom"_compute_basal_atom.html - calculates the hexagonal close-packed "c" lattice vector of each atom "body/local"_compute_body_local.html - attributes of body sub-particles "bond"_compute_bond.html - energy of each bond sub-style "bond/local"_compute_bond_local.html - distance and energy of each bond diff --git a/doc/src/kim_commands.txt b/doc/src/kim_commands.txt index 0bb7de03d6..93c4e8c4a8 100644 --- a/doc/src/kim_commands.txt +++ b/doc/src/kim_commands.txt @@ -258,12 +258,12 @@ variable xyfinal equal xy*$\{_u_distance\} variable xzfinal equal xz*$\{_u_distance\} variable yzfinal equal yz*$\{_u_distance\} change_box all x scale $\{_u_distance\} & -               y scale $\{_u_distance\} & -               z scale $\{_u_distance\} & -               xy final $\{xyfinal\} & -               xz final $\{xzfinal\} & -               yz final $\{yzfinal\} & -               remap :pre + y scale $\{_u_distance\} & + z scale $\{_u_distance\} & + xy final $\{xyfinal\} & + xz final $\{xzfinal\} & + yz final $\{yzfinal\} & + remap :pre NOTE: Unit conversion will only work if the conversion factors are placed in all appropriate places in the input script. It is up to the user to do this -- GitLab From 9004ebc3fe8ebb38b1b64236eb7e95b144a6882e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 21:11:13 -0400 Subject: [PATCH 233/236] one more fixup for compatibility for old PDF build scheme --- doc/src/lammps.book | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/lammps.book b/doc/src/lammps.book index a3ec9c568b..b3808e18dc 100644 --- a/doc/src/lammps.book +++ b/doc/src/lammps.book @@ -42,6 +42,7 @@ Commands_compute.html Commands_pair.html Commands_bond.html Commands_kspace.html +Commands_removed.html Packages.html Packages_standard.html Packages_user.html @@ -167,7 +168,6 @@ if.html include.html info.html jump.html -kim_query.html kim_commands.html label.html lattice.html -- GitLab From 4289dbb78d3fe8267e2a91881e30a92c6dbbd461 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Mon, 29 Jul 2019 22:28:29 -0400 Subject: [PATCH 234/236] clean up includes and whitespace --- src/USER-MISC/compute_momentum.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/USER-MISC/compute_momentum.cpp b/src/USER-MISC/compute_momentum.cpp index f8fc0ec6ab..541b52d9c0 100644 --- a/src/USER-MISC/compute_momentum.cpp +++ b/src/USER-MISC/compute_momentum.cpp @@ -1,12 +1,9 @@ -#include #include "compute_momentum.h" +#include #include "atom.h" -#include "update.h" -#include "force.h" -#include "domain.h" -#include "group.h" #include "error.h" +#include "update.h" using namespace LAMMPS_NS; @@ -45,14 +42,14 @@ void ComputeMomentum::compute_vector() if (rmass) { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { - for(int j = 0; j < 3; ++j) - mom[j] += rmass[i] * v[i][j]; + for(int j = 0; j < 3; ++j) + mom[j] += rmass[i] * v[i][j]; } } else { for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) - for(int j = 0; j < 3; ++j) - mom[j] += mass[type[i]] * v[i][j]; + for(int j = 0; j < 3; ++j) + mom[j] += mass[type[i]] * v[i][j]; } MPI_Allreduce(&mom, vector, 3, MPI_DOUBLE, MPI_SUM, world); -- GitLab From c9f3f99ee84f2136acf5cb16c590289de41c4a14 Mon Sep 17 00:00:00 2001 From: "Ryan S. Elliott" Date: Mon, 29 Jul 2019 21:48:12 -0500 Subject: [PATCH 235/236] Update to kim-api-2.1.2 --- cmake/Modules/Packages/KIM.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/Packages/KIM.cmake b/cmake/Modules/Packages/KIM.cmake index 5987ebbf0a..d9d028f6dc 100644 --- a/cmake/Modules/Packages/KIM.cmake +++ b/cmake/Modules/Packages/KIM.cmake @@ -9,7 +9,9 @@ if(PKG_KIM) if(KIM-API_FOUND) set(DOWNLOAD_KIM_DEFAULT OFF) else() - message(WARNING "KIM-API package not found. We will download and build our own") + if (NOT DOWNLOAD_KIM) + message(WARNING "KIM-API package not found. We will download and build our own") + endif() set(DOWNLOAD_KIM_DEFAULT ON) endif() option(DOWNLOAD_KIM "Download KIM-API from OpenKIM instead of using an already installed one" ${DOWNLOAD_KIM_DEFAULT}) @@ -22,8 +24,8 @@ if(PKG_KIM) enable_language(Fortran) include(ExternalProject) ExternalProject_Add(kim_build - URL https://s3.openkim.org/kim-api/kim-api-2.1.1.txz - URL_MD5 ae0ee413e026c6e93d35692db5966fb4 + URL https://s3.openkim.org/kim-api/kim-api-2.1.2.txz + URL_MD5 6ac52e14ef52967fc7858220b208cba5 BINARY_DIR build CMAKE_ARGS -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -- GitLab From d201d6c2d11f8150d11e74ad58498fd1fc678d9e Mon Sep 17 00:00:00 2001 From: mkanski Date: Tue, 30 Jul 2019 10:18:53 +0200 Subject: [PATCH 236/236] fix grammar error --- doc/src/create_atoms.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/create_atoms.txt b/doc/src/create_atoms.txt index e673849793..2c97194cba 100644 --- a/doc/src/create_atoms.txt +++ b/doc/src/create_atoms.txt @@ -242,7 +242,7 @@ write_dump all atom sinusoid.lammpstrj :pre :c,image(JPG/sinusoid_small.jpg,JPG/sinusoid.jpg) -The {rotate} keyword allows to specify the orientation +The {rotate} keyword allows specification of the orientation at which molecules are inserted. The axis of rotation is determined by the rotation vector (Rx,Ry,Rz) that goes through the insertion point. The specified {theta} determines the angle of -- GitLab