Apply override to more classes
This commit is contained in:
@ -31,13 +31,13 @@ namespace LAMMPS_NS {
|
|||||||
class FixNVEAwpmd : public Fix {
|
class FixNVEAwpmd : public Fix {
|
||||||
public:
|
public:
|
||||||
FixNVEAwpmd(class LAMMPS *, int, char **);
|
FixNVEAwpmd(class LAMMPS *, int, char **);
|
||||||
int setmask();
|
int setmask() override;
|
||||||
virtual void init();
|
void init() override;
|
||||||
virtual void initial_integrate(int);
|
void initial_integrate(int) override;
|
||||||
virtual void final_integrate();
|
void final_integrate() override;
|
||||||
void initial_integrate_respa(int, int, int);
|
void initial_integrate_respa(int, int, int) override;
|
||||||
void final_integrate_respa(int, int);
|
void final_integrate_respa(int, int) override;
|
||||||
void reset_dt();
|
void reset_dt() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double dtv, dtf;
|
double dtv, dtf;
|
||||||
|
|||||||
@ -34,22 +34,22 @@ class PairAWPMDCut : public Pair {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
PairAWPMDCut(class LAMMPS *);
|
PairAWPMDCut(class LAMMPS *);
|
||||||
virtual ~PairAWPMDCut();
|
~PairAWPMDCut() override;
|
||||||
virtual void compute(int, int);
|
void compute(int, int) override;
|
||||||
virtual void settings(int, char **);
|
void settings(int, char **) override;
|
||||||
void coeff(int, char **);
|
void coeff(int, char **) override;
|
||||||
void init_style();
|
void init_style() override;
|
||||||
void min_pointers(double **, double **);
|
void min_pointers(double **, double **);
|
||||||
double init_one(int, int);
|
double init_one(int, int) override;
|
||||||
void write_restart(FILE *);
|
void write_restart(FILE *) override;
|
||||||
void read_restart(FILE *);
|
void read_restart(FILE *) override;
|
||||||
virtual void write_restart_settings(FILE *);
|
void write_restart_settings(FILE *) override;
|
||||||
virtual void read_restart_settings(FILE *);
|
void read_restart_settings(FILE *) override;
|
||||||
|
|
||||||
void min_xf_pointers(int, double **, double **);
|
void min_xf_pointers(int, double **, double **) override;
|
||||||
void min_xf_get(int);
|
void min_xf_get(int) override;
|
||||||
void min_x_set(int);
|
void min_x_set(int) override;
|
||||||
double memory_usage();
|
double memory_usage() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int flexible_pressure_flag;
|
int flexible_pressure_flag;
|
||||||
|
|||||||
@ -49,9 +49,9 @@ class colvarproxy_lammps : public colvarproxy {
|
|||||||
friend class cvm::atom;
|
friend class cvm::atom;
|
||||||
colvarproxy_lammps(LAMMPS_NS::LAMMPS *lmp, const char *, const char *, const int, const double,
|
colvarproxy_lammps(LAMMPS_NS::LAMMPS *lmp, const char *, const char *, const int, const double,
|
||||||
MPI_Comm);
|
MPI_Comm);
|
||||||
virtual ~colvarproxy_lammps();
|
~colvarproxy_lammps() override;
|
||||||
void init(const char *);
|
void init(const char *);
|
||||||
virtual int setup();
|
int setup() override;
|
||||||
|
|
||||||
// disable default and copy constructor
|
// disable default and copy constructor
|
||||||
private:
|
private:
|
||||||
@ -61,8 +61,8 @@ class colvarproxy_lammps : public colvarproxy {
|
|||||||
// methods for lammps to move data or trigger actions in the proxy
|
// methods for lammps to move data or trigger actions in the proxy
|
||||||
public:
|
public:
|
||||||
void set_temperature(double t) { t_target = t; };
|
void set_temperature(double t) { t_target = t; };
|
||||||
bool total_forces_enabled() const { return total_force_requested; };
|
bool total_forces_enabled() const override { return total_force_requested; };
|
||||||
bool total_forces_same_step() const { return true; };
|
bool total_forces_same_step() const override { return true; };
|
||||||
bool want_exit() const { return do_exit; };
|
bool want_exit() const { return do_exit; };
|
||||||
|
|
||||||
// perform colvars computation. returns biasing energy
|
// perform colvars computation. returns biasing energy
|
||||||
@ -84,41 +84,41 @@ class colvarproxy_lammps : public colvarproxy {
|
|||||||
int read_state_file(char const *state_filename);
|
int read_state_file(char const *state_filename);
|
||||||
|
|
||||||
// Request to set the units used internally by Colvars
|
// Request to set the units used internally by Colvars
|
||||||
int set_unit_system(std::string const &units_in, bool check_only);
|
int set_unit_system(std::string const &units_in, bool check_only) override;
|
||||||
|
|
||||||
inline cvm::real backend_angstrom_value() { return my_angstrom; };
|
inline cvm::real backend_angstrom_value() override { return my_angstrom; };
|
||||||
|
|
||||||
inline cvm::real boltzmann() { return my_boltzmann; };
|
inline cvm::real boltzmann() override { return my_boltzmann; };
|
||||||
inline cvm::real temperature() { return t_target; };
|
inline cvm::real temperature() override { return t_target; };
|
||||||
inline cvm::real dt()
|
inline cvm::real dt() override
|
||||||
{
|
{
|
||||||
return my_timestep;
|
return my_timestep;
|
||||||
}; // return _lmp->update->dt * _lmp->force->femtosecond; };
|
}; // return _lmp->update->dt * _lmp->force->femtosecond; };
|
||||||
|
|
||||||
void add_energy(cvm::real energy) { bias_energy += energy; };
|
void add_energy(cvm::real energy) override { bias_energy += energy; };
|
||||||
void request_total_force(bool yesno) { total_force_requested = yesno; };
|
void request_total_force(bool yesno) override { total_force_requested = yesno; };
|
||||||
|
|
||||||
void log(std::string const &message);
|
void log(std::string const &message) override;
|
||||||
void error(std::string const &message);
|
void error(std::string const &message) override;
|
||||||
|
|
||||||
cvm::rvector position_distance(cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const;
|
cvm::rvector position_distance(cvm::atom_pos const &pos1, cvm::atom_pos const &pos2) const override;
|
||||||
|
|
||||||
int backup_file(char const *filename);
|
int backup_file(char const *filename) override;
|
||||||
|
|
||||||
cvm::real rand_gaussian(void) { return _random->gaussian(); };
|
cvm::real rand_gaussian(void) override { return _random->gaussian(); };
|
||||||
|
|
||||||
int init_atom(int atom_number);
|
int init_atom(int atom_number) override;
|
||||||
int check_atom_id(int atom_number);
|
int check_atom_id(int atom_number) override;
|
||||||
|
|
||||||
inline std::vector<int> *modify_atom_types() { return &atoms_types; }
|
inline std::vector<int> *modify_atom_types() { return &atoms_types; }
|
||||||
|
|
||||||
virtual int replica_enabled();
|
int replica_enabled() override;
|
||||||
virtual int replica_index();
|
int replica_index() override;
|
||||||
virtual int num_replicas();
|
int num_replicas() override;
|
||||||
|
|
||||||
virtual void replica_comm_barrier();
|
void replica_comm_barrier() override;
|
||||||
virtual int replica_comm_recv(char *msg_data, int buf_len, int src_rep);
|
int replica_comm_recv(char *msg_data, int buf_len, int src_rep) override;
|
||||||
virtual int replica_comm_send(char *msg_data, int msg_len, int dest_rep);
|
int replica_comm_send(char *msg_data, int msg_len, int dest_rep) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -43,23 +43,23 @@ class FixColvars : public Fix {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
FixColvars(class LAMMPS *, int, char **);
|
FixColvars(class LAMMPS *, int, char **);
|
||||||
virtual ~FixColvars();
|
~FixColvars() override;
|
||||||
|
|
||||||
virtual int setmask();
|
int setmask() override;
|
||||||
virtual void init();
|
void init() override;
|
||||||
virtual void setup(int);
|
void setup(int) override;
|
||||||
virtual int modify_param(int, char **);
|
int modify_param(int, char **) override;
|
||||||
virtual void min_setup(int vflag) { setup(vflag); };
|
void min_setup(int vflag) override { setup(vflag); };
|
||||||
virtual void min_post_force(int);
|
void min_post_force(int) override;
|
||||||
virtual void post_force(int);
|
void post_force(int) override;
|
||||||
virtual void post_force_respa(int, int, int);
|
void post_force_respa(int, int, int) override;
|
||||||
virtual void end_of_step();
|
void end_of_step() override;
|
||||||
virtual void post_run();
|
void post_run() override;
|
||||||
virtual double compute_scalar();
|
double compute_scalar() override;
|
||||||
virtual double memory_usage();
|
double memory_usage() override;
|
||||||
|
|
||||||
virtual void write_restart(FILE *);
|
void write_restart(FILE *) override;
|
||||||
virtual void restart(char *);
|
void restart(char *) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
colvarproxy_lammps *proxy; // pointer to the colvars proxy class
|
colvarproxy_lammps *proxy; // pointer to the colvars proxy class
|
||||||
|
|||||||
@ -71,8 +71,8 @@ namespace LAMMPS_NS {
|
|||||||
class FixStoreKIM : public Fix {
|
class FixStoreKIM : public Fix {
|
||||||
public:
|
public:
|
||||||
FixStoreKIM(class LAMMPS *, int, char **);
|
FixStoreKIM(class LAMMPS *, int, char **);
|
||||||
~FixStoreKIM();
|
~FixStoreKIM() override;
|
||||||
int setmask();
|
int setmask() override;
|
||||||
|
|
||||||
void setptr(const std::string &, void *);
|
void setptr(const std::string &, void *);
|
||||||
void *getptr(const std::string &);
|
void *getptr(const std::string &);
|
||||||
|
|||||||
@ -75,18 +75,18 @@ namespace LAMMPS_NS {
|
|||||||
class PairKIM : public Pair {
|
class PairKIM : public Pair {
|
||||||
public:
|
public:
|
||||||
PairKIM(class LAMMPS *);
|
PairKIM(class LAMMPS *);
|
||||||
~PairKIM();
|
~PairKIM() override;
|
||||||
|
|
||||||
// LAMMPS Pair class virtual function prototypes
|
// LAMMPS Pair class virtual function prototypes
|
||||||
virtual void compute(int, int);
|
void compute(int, int) override;
|
||||||
virtual void settings(int, char **);
|
void settings(int, char **) override;
|
||||||
virtual void coeff(int, char **);
|
void coeff(int, char **) override;
|
||||||
virtual void init_style();
|
void init_style() override;
|
||||||
virtual void init_list(int id, NeighList *ptr);
|
void init_list(int id, NeighList *ptr) override;
|
||||||
virtual double init_one(int, int);
|
double init_one(int, int) override;
|
||||||
virtual int pack_reverse_comm(int, int, double *);
|
int pack_reverse_comm(int, int, double *) override;
|
||||||
virtual void unpack_reverse_comm(int, int *, double *);
|
void unpack_reverse_comm(int, int *, double *) override;
|
||||||
virtual double memory_usage();
|
double memory_usage() override;
|
||||||
|
|
||||||
// Get the KIM_Model object
|
// Get the KIM_Model object
|
||||||
KIM_Model *get_kim_model();
|
KIM_Model *get_kim_model();
|
||||||
|
|||||||
@ -32,18 +32,18 @@ namespace LAMMPS_NS {
|
|||||||
class FixPlumed : public Fix {
|
class FixPlumed : public Fix {
|
||||||
public:
|
public:
|
||||||
FixPlumed(class LAMMPS *, int, char **);
|
FixPlumed(class LAMMPS *, int, char **);
|
||||||
~FixPlumed();
|
~FixPlumed() override;
|
||||||
int setmask();
|
int setmask() override;
|
||||||
void init();
|
void init() override;
|
||||||
void setup(int);
|
void setup(int) override;
|
||||||
void min_setup(int);
|
void min_setup(int) override;
|
||||||
void post_force(int);
|
void post_force(int) override;
|
||||||
void post_force_respa(int, int, int);
|
void post_force_respa(int, int, int) override;
|
||||||
void min_post_force(int);
|
void min_post_force(int) override;
|
||||||
double compute_scalar();
|
double compute_scalar() override;
|
||||||
void reset_dt();
|
void reset_dt() override;
|
||||||
int modify_param(int narg, char **arg);
|
int modify_param(int narg, char **arg) override;
|
||||||
double memory_usage();
|
double memory_usage() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PLMD::Plumed *p; // pointer to plumed object
|
PLMD::Plumed *p; // pointer to plumed object
|
||||||
|
|||||||
@ -29,28 +29,28 @@ namespace LAMMPS_NS {
|
|||||||
class FixPOEMS : public Fix {
|
class FixPOEMS : public Fix {
|
||||||
public:
|
public:
|
||||||
FixPOEMS(class LAMMPS *, int narg, char **arg);
|
FixPOEMS(class LAMMPS *, int narg, char **arg);
|
||||||
~FixPOEMS();
|
~FixPOEMS() override;
|
||||||
int setmask();
|
int setmask() override;
|
||||||
void init();
|
void init() override;
|
||||||
void setup(int);
|
void setup(int) override;
|
||||||
void initial_integrate(int);
|
void initial_integrate(int) override;
|
||||||
void post_force(int);
|
void post_force(int) override;
|
||||||
void final_integrate();
|
void final_integrate() override;
|
||||||
void initial_integrate_respa(int, int, int);
|
void initial_integrate_respa(int, int, int) override;
|
||||||
void post_force_respa(int, int, int);
|
void post_force_respa(int, int, int) override;
|
||||||
void final_integrate_respa(int, int);
|
void final_integrate_respa(int, int) override;
|
||||||
|
|
||||||
void grow_arrays(int);
|
void grow_arrays(int) override;
|
||||||
void copy_arrays(int, int, int);
|
void copy_arrays(int, int, int) override;
|
||||||
int pack_exchange(int, double *);
|
int pack_exchange(int, double *) override;
|
||||||
int unpack_exchange(int, double *);
|
int unpack_exchange(int, double *) override;
|
||||||
double memory_usage();
|
double memory_usage() override;
|
||||||
|
|
||||||
void pre_neighbor();
|
void pre_neighbor() override;
|
||||||
int dof(int);
|
int dof(int) override;
|
||||||
void deform(int);
|
void deform(int) override;
|
||||||
int modify_param(int, char **);
|
int modify_param(int, char **) override;
|
||||||
void reset_dt();
|
void reset_dt() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int me;
|
int me;
|
||||||
|
|||||||
@ -28,13 +28,13 @@ namespace LAMMPS_NS {
|
|||||||
class Scafacos : public KSpace {
|
class Scafacos : public KSpace {
|
||||||
public:
|
public:
|
||||||
Scafacos(class LAMMPS *);
|
Scafacos(class LAMMPS *);
|
||||||
~Scafacos();
|
~Scafacos() override;
|
||||||
void init();
|
void init() override;
|
||||||
void setup() {}
|
void setup() override {}
|
||||||
void settings(int, char **);
|
void settings(int, char **) override;
|
||||||
void compute(int, int);
|
void compute(int, int) override;
|
||||||
int modify_param(int, char **);
|
int modify_param(int, char **) override;
|
||||||
double memory_usage();
|
double memory_usage() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int me;
|
int me;
|
||||||
|
|||||||
@ -57,9 +57,9 @@ namespace LAMMPS_NS {
|
|||||||
class DumpVTK : public DumpCustom {
|
class DumpVTK : public DumpCustom {
|
||||||
public:
|
public:
|
||||||
DumpVTK(class LAMMPS *, int, char **);
|
DumpVTK(class LAMMPS *, int, char **);
|
||||||
virtual ~DumpVTK();
|
~DumpVTK() override;
|
||||||
|
|
||||||
virtual void write();
|
void write() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
char *label; // string for dump file header
|
char *label; // string for dump file header
|
||||||
@ -72,12 +72,12 @@ class DumpVTK : public DumpCustom {
|
|||||||
|
|
||||||
// private methods
|
// private methods
|
||||||
|
|
||||||
virtual void init_style();
|
void init_style() override;
|
||||||
virtual void write_header(bigint);
|
void write_header(bigint) override;
|
||||||
int count();
|
int count() override;
|
||||||
void pack(tagint *);
|
void pack(tagint *) override;
|
||||||
virtual void write_data(int, double *);
|
void write_data(int, double *) override;
|
||||||
double memory_usage();
|
double memory_usage() override;
|
||||||
|
|
||||||
int parse_fields(int, char **);
|
int parse_fields(int, char **);
|
||||||
void identify_vectors();
|
void identify_vectors();
|
||||||
@ -85,7 +85,7 @@ class DumpVTK : public DumpCustom {
|
|||||||
int add_fix(const char *);
|
int add_fix(const char *);
|
||||||
int add_variable(const char *);
|
int add_variable(const char *);
|
||||||
int add_custom(const char *, int);
|
int add_custom(const char *, int);
|
||||||
virtual int modify_param(int, char **);
|
int modify_param(int, char **) override;
|
||||||
|
|
||||||
typedef void (DumpVTK::*FnPtrHeader)(bigint);
|
typedef void (DumpVTK::*FnPtrHeader)(bigint);
|
||||||
FnPtrHeader header_choice; // ptr to write header functions
|
FnPtrHeader header_choice; // ptr to write header functions
|
||||||
|
|||||||
Reference in New Issue
Block a user