1 /* -*- c++ -*- ---------------------------------------------------------- 2 LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator 3 https://www.lammps.org/, Sandia National Laboratories 4 Steve Plimpton, sjplimp@sandia.gov 5 6 Copyright (2003) Sandia Corporation. Under the terms of Contract 7 DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains 8 certain rights in this software. This software is distributed under 9 the GNU General Public License. 10 11 See the README file in the top-level LAMMPS directory. 12 ------------------------------------------------------------------------- */ 13 14 #ifndef LMP_MLIAP_MODEL_H 15 #define LMP_MLIAP_MODEL_H 16 17 #include "pointers.h" 18 19 namespace LAMMPS_NS { 20 21 class MLIAPModel : protected Pointers { 22 public: 23 MLIAPModel(LAMMPS *, char *); 24 virtual ~MLIAPModel(); 25 void set_ndescriptors(int); 26 void set_nelements(int); 27 virtual int get_nparams() = 0; 28 virtual int get_gamma_nnz(class MLIAPData *) = 0; 29 virtual void compute_gradients(class MLIAPData *) = 0; 30 virtual void compute_gradgrads(class MLIAPData *) = 0; 31 virtual void compute_force_gradients(class MLIAPData *) = 0; 32 virtual void init(); 33 virtual double memory_usage() = 0; 34 int nelements; // # of unique elements 35 int nonlinearflag; // 1 if gradient() requires descriptors 36 int ndescriptors; // number of descriptors 37 int nparams; // number of parameters per element 38 double **coeffelem; // element coefficients 39 40 protected: 41 virtual void read_coeffs(char *) = 0; 42 }; 43 44 class MLIAPModelSimple : public MLIAPModel { 45 public: 46 MLIAPModelSimple(LAMMPS *, char *); ~MLIAPModelSimple()47 ~MLIAPModelSimple(){}; 48 virtual double memory_usage(); 49 50 protected: 51 virtual void read_coeffs(char *); 52 }; 53 54 } // namespace LAMMPS_NS 55 56 #endif 57