1 // clang-format off 2 /* -*- c++ -*- ---------------------------------------------------------- 3 LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator 4 https://www.lammps.org/, Sandia National Laboratories 5 Steve Plimpton, sjplimp@sandia.gov 6 7 Copyright (2003) Sandia Corporation. Under the terms of Contract 8 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 9 certain rights in this software. This software is distributed under 10 the GNU General Public License. 11 12 See the README file in the top-level LAMMPS directory. 13 ------------------------------------------------------------------------- */ 14 15 #ifdef FIX_CLASS 16 // clang-format off 17 FixStyle(reaxff/species,FixReaxFFSpecies); 18 FixStyle(reax/c/species,FixReaxFFSpecies); 19 // clang-format on 20 #else 21 22 #ifndef LMP_FIX_REAXC_SPECIES_H 23 #define LMP_FIX_REAXC_SPECIES_H 24 25 #include "fix.h" 26 27 #define BUFLEN 1000 28 29 namespace LAMMPS_NS { 30 31 typedef struct { 32 double x, y, z; 33 } AtomCoord; 34 35 class FixReaxFFSpecies : public Fix { 36 public: 37 FixReaxFFSpecies(class LAMMPS *, int, char **); 38 virtual ~FixReaxFFSpecies(); 39 int setmask(); 40 virtual void init(); 41 void init_list(int, class NeighList *); 42 void setup(int); 43 void post_integrate(); 44 double compute_vector(int); 45 46 protected: 47 int me, nprocs, nmax, nlocal, ntypes, ntotal; 48 int nrepeat, nfreq, posfreq; 49 int Nmoltype, vector_nmole, vector_nspec; 50 int *Name, *MolName, *NMol, *nd, *MolType, *molmap; 51 double *clusterID; 52 AtomCoord *x0; 53 54 double bg_cut; 55 double **BOCut; 56 char **tmparg; 57 58 FILE *fp, *pos; 59 int eleflag, posflag, multipos, padflag, setupflag; 60 int singlepos_opened, multipos_opened; 61 char *ele, **eletype, *filepos; 62 63 void Output_ReaxFF_Bonds(bigint, FILE *); 64 AtomCoord chAnchor(AtomCoord, AtomCoord); 65 virtual void FindMolecule(); 66 void SortMolecule(int &); 67 void FindSpecies(int, int &); 68 void WriteFormulas(int, int); 69 int CheckExistence(int, int); 70 71 int nint(const double &); 72 int pack_forward_comm(int, int *, double *, int, int *); 73 void unpack_forward_comm(int, int, double *); 74 void OpenPos(); 75 void WritePos(int, int); 76 double memory_usage(); 77 78 bigint nvalid; 79 80 class NeighList *list; 81 class FixAveAtom *f_SPECBOND; 82 class PairReaxFF *reaxff; 83 }; 84 } // namespace LAMMPS_NS 85 86 #endif 87 #endif 88