Capitalise apip in PACE class names.

This commit is contained in:
David Immel
2025-06-05 14:57:00 +02:00
parent f34284fca0
commit 1086db672c
8 changed files with 47 additions and 47 deletions

8
src/.gitignore vendored
View File

@ -127,10 +127,10 @@
/pair_lambda_zone.h
/pair_pace_apip.cpp
/pair_pace_apip.h
/pair_pace_apip_precise.cpp
/pair_pace_apip_precise.h
/pair_pace_apip_fast.cpp
/pair_pace_apip_fast.h
/pair_pace_precise_apip.cpp
/pair_pace_precise_apip.h
/pair_pace_fast_apip.cpp
/pair_pace_fast_apip.h
/fix_atom_weight_apip.cpp
/fix_atom_weight_apip.h

View File

@ -64,7 +64,7 @@ FixAtomWeightAPIP::FixAtomWeightAPIP(LAMMPS *lmp, int narg, char **arg) :
if (strcmp(arg[4], "eam") == 0) {
time_simple_extract_name = utils::strdup("eam/apip:time_per_atom");
} else if (strcmp(arg[4], "ace") == 0) {
time_simple_extract_name = utils::strdup("pace/apip/fast:time_per_atom");
time_simple_extract_name = utils::strdup("pace/fast/apip:time_per_atom");
} else {
time_simple_atom = utils::numeric(FLERR, arg[4], false, lmp);
avg_time_atom[0] = time_simple_atom;

View File

@ -87,7 +87,7 @@ static int AtomicNumberByName_pace(char *elname)
}
/* ---------------------------------------------------------------------- */
PairPACEapip::PairPACEapip(LAMMPS *lmp) : Pair(lmp)
PairPACEAPIP::PairPACEAPIP(LAMMPS *lmp) : Pair(lmp)
{
single_enable = 0;
restartinfo = 0;
@ -118,7 +118,7 @@ PairPACEapip::PairPACEapip(LAMMPS *lmp) : Pair(lmp)
check if allocated, since class can be destructed when incomplete
------------------------------------------------------------------------- */
PairPACEapip::~PairPACEapip()
PairPACEAPIP::~PairPACEAPIP()
{
if (copymode) return;
@ -138,7 +138,7 @@ PairPACEapip::~PairPACEapip()
*/
// written by DI. This function is required for the adaptive-precision.
int PairPACEapip::check_abort_condition(double *lambda, double *lambda_const, int *lambda_required,
int PairPACEAPIP::check_abort_condition(double *lambda, double *lambda_const, int *lambda_required,
int i)
{
if ((lambda[i] == 1) && ((!lambda_thermostat) || (lambda_thermostat && lambda_const[i] == 1))) {
@ -154,7 +154,7 @@ int PairPACEapip::check_abort_condition(double *lambda, double *lambda_const, in
*/
// written by DI. This function is required for the adaptive-precision.
double PairPACEapip::compute_factor_lambda(double lambda)
double PairPACEAPIP::compute_factor_lambda(double lambda)
{
return 1 - lambda;
}
@ -164,14 +164,14 @@ double PairPACEapip::compute_factor_lambda(double lambda)
*/
// written by DI. This function is required for the adaptive-precision.
double *PairPACEapip::get_e_ref_ptr()
double *PairPACEAPIP::get_e_ref_ptr()
{
return atom->apip_e_precise;
}
/* ---------------------------------------------------------------------- */
void PairPACEapip::compute(int eflag, int vflag)
void PairPACEAPIP::compute(int eflag, int vflag)
{
// start of adaptive-precision modifications by DI
@ -357,7 +357,7 @@ void PairPACEapip::compute(int eflag, int vflag)
/* ---------------------------------------------------------------------- */
void PairPACEapip::allocate()
void PairPACEAPIP::allocate()
{
allocated = 1;
int n = atom->ntypes + 1;
@ -372,7 +372,7 @@ void PairPACEapip::allocate()
global settings
------------------------------------------------------------------------- */
void PairPACEapip::settings(int narg, char **arg)
void PairPACEAPIP::settings(int narg, char **arg)
{
if (narg > 3) utils::missing_cmd_args(FLERR, "pair_style pace", error);
@ -410,7 +410,7 @@ void PairPACEapip::settings(int narg, char **arg)
set coeffs for one or more type pairs
------------------------------------------------------------------------- */
void PairPACEapip::coeff(int narg, char **arg)
void PairPACEAPIP::coeff(int narg, char **arg)
{
if (!allocated) allocate();
@ -490,7 +490,7 @@ void PairPACEapip::coeff(int narg, char **arg)
init specific to this pair style
------------------------------------------------------------------------- */
void PairPACEapip::init_style()
void PairPACEAPIP::init_style()
{
if (atom->tag_enable == 0) error->all(FLERR, "Pair style pace requires atom IDs");
if (force->newton_pair == 0) error->all(FLERR, "Pair style pace requires newton pair on");
@ -510,7 +510,7 @@ void PairPACEapip::init_style()
init for one type pair i,j and corresponding j,i
------------------------------------------------------------------------- */
double PairPACEapip::init_one(int i, int j)
double PairPACEAPIP::init_one(int i, int j)
{
if (setflag[i][j] == 0) error->all(FLERR, "All pair coeffs are not set");
//cutoff from the basis set's radial functions settings
@ -525,7 +525,7 @@ double PairPACEapip::init_one(int i, int j)
*/
// written by DI. This function is required for the adaptive-precision.
void PairPACEapip::setup()
void PairPACEAPIP::setup()
{
if (modify->get_fix_by_style("^lambda_thermostat/apip$").size() == 0) {
lambda_thermostat = false;
@ -559,7 +559,7 @@ void PairPACEapip::setup()
*/
// written by DI. This function is required for the adaptive-precision.
void PairPACEapip::calculate_time_per_atom()
void PairPACEAPIP::calculate_time_per_atom()
{
if (n_computations_accumulated > 0)
time_per_atom = time_wall_accumulated / n_computations_accumulated;
@ -574,7 +574,7 @@ void PairPACEapip::calculate_time_per_atom()
/* ----------------------------------------------------------------------
extract method for extracting value of scale variable
---------------------------------------------------------------------- */
void *PairPACEapip::extract(const char *str, int &dim)
void *PairPACEAPIP::extract(const char *str, int &dim)
{
dim = 0;
//check if str=="corerep_flag" then compute extrapolation grades on this iteration
@ -598,7 +598,7 @@ void *PairPACEapip::extract(const char *str, int &dim)
1 or more = # of columns in per-atom array
return NULL if str is not recognized
---------------------------------------------------------------------- */
void *PairPACEapip::extract_peratom(const char *str, int &ncol)
void *PairPACEAPIP::extract_peratom(const char *str, int &ncol)
{
if (strcmp(str, "corerep") == 0) {
ncol = 0;

View File

@ -30,7 +30,7 @@ Copyright 2021 Yury Lysogorskiy^1, Cas van der Oord^2, Anton Bochkarev^1,
#ifdef PAIR_CLASS
// clang-format off
PairStyle(pace/apip,PairPACEapip);
PairStyle(pace/apip,PairPACEAPIP);
// clang-format on
#else
@ -41,10 +41,10 @@ PairStyle(pace/apip,PairPACEapip);
namespace LAMMPS_NS {
class PairPACEapip : public Pair {
class PairPACEAPIP : public Pair {
public:
PairPACEapip(class LAMMPS *);
~PairPACEapip() override;
PairPACEAPIP(class LAMMPS *);
~PairPACEAPIP() override;
void compute(int, int) override;
void settings(int, char **) override;

View File

@ -14,21 +14,21 @@
Contributing author: David Immel (d.immel@fz-juelich.de, FZJ, Germany)
------------------------------------------------------------------------- */
#include "pair_pace_apip_fast.h"
#include "pair_pace_fast_apip.h"
#include "atom.h"
#include "atom_vec_apip.h"
using namespace LAMMPS_NS;
PairPACEapipFast::PairPACEapipFast(LAMMPS *lmp) : PairPACEapip(lmp) {}
PairPACEFastAPIP::PairPACEFastAPIP(LAMMPS *lmp) : PairPACEAPIP(lmp) {}
/**
* Set lambda_required based on lambda and lambda_const
* @return true if this calculation is not required
*/
int PairPACEapipFast::check_abort_condition(double *lambda, double *lambda_const,
int PairPACEFastAPIP::check_abort_condition(double *lambda, double *lambda_const,
int *lambda_required, int i)
{
if ((lambda[i] == 0) && ((!lambda_thermostat) || (lambda_thermostat && lambda_const[i] == 0))) {
@ -43,7 +43,7 @@ int PairPACEapipFast::check_abort_condition(double *lambda, double *lambda_const
* @return prefactor lambda which is used for a fast ACE potential
*/
double PairPACEapipFast::compute_factor_lambda(double lambda)
double PairPACEFastAPIP::compute_factor_lambda(double lambda)
{
return lambda;
}
@ -52,7 +52,7 @@ double PairPACEapipFast::compute_factor_lambda(double lambda)
* @return atom->apip_e_fast which is used for a fast ACE potential
*/
double *PairPACEapipFast::get_e_ref_ptr()
double *PairPACEFastAPIP::get_e_ref_ptr()
{
return atom->apip_e_fast;
}
@ -60,12 +60,12 @@ double *PairPACEapipFast::get_e_ref_ptr()
/* ----------------------------------------------------------------------
extract method for extracting value of scale variable
---------------------------------------------------------------------- */
void *PairPACEapipFast::extract(const char *str, int &dim)
void *PairPACEFastAPIP::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str, "scale") == 0) return (void *) scale;
dim = 0;
if (strcmp(str, "pace/apip/fast:time_per_atom") == 0) {
if (strcmp(str, "pace/fast/apip:time_per_atom") == 0) {
calculate_time_per_atom();
return (void *) &time_per_atom;
}

View File

@ -16,20 +16,20 @@
#ifdef PAIR_CLASS
// clang-format off
PairStyle(pace/apip/fast,PairPACEapipFast);
PairStyle(pace/fast/apip,PairPACEFastAPIP);
// clang-format on
#else
#ifndef LMP_PAIR_PACE_APIP_FAST_H
#define LMP_PAIR_PACE_APIP_FAST_H
#ifndef LMP_PAIR_PACE_FAST_APIP_H
#define LMP_PAIR_PACE_FAST_APIP_H
#include "pair_pace_apip.h"
namespace LAMMPS_NS {
class PairPACEapipFast : public PairPACEapip {
class PairPACEFastAPIP : public PairPACEAPIP {
public:
PairPACEapipFast(class LAMMPS *);
PairPACEFastAPIP(class LAMMPS *);
void *extract(const char *, int &) override;
protected:

View File

@ -14,21 +14,21 @@
Contributing author: David Immel (d.immel@fz-juelich.de, FZJ, Germany)
------------------------------------------------------------------------- */
#include "pair_pace_apip_precise.h"
#include "pair_pace_precise_apip.h"
#include "atom.h"
#include "atom_vec_apip.h"
using namespace LAMMPS_NS;
PairPACEapipPrecise::PairPACEapipPrecise(LAMMPS *lmp) : PairPACEapip(lmp) {}
PairPACEPreciseAPIP::PairPACEPreciseAPIP(LAMMPS *lmp) : PairPACEAPIP(lmp) {}
/**
* Set lambda_required based on lambda and lambda_const
* @return true if this calculation is not required
*/
int PairPACEapipPrecise::check_abort_condition(double *lambda, double *lambda_const,
int PairPACEPreciseAPIP::check_abort_condition(double *lambda, double *lambda_const,
int *lambda_required, int i)
{
if ((lambda[i] == 1) && ((!lambda_thermostat) || (lambda_thermostat && lambda_const[i] == 1))) {
@ -43,7 +43,7 @@ int PairPACEapipPrecise::check_abort_condition(double *lambda, double *lambda_co
* @return prefactor 1-lambda which is used for a precise ACE potential
*/
double PairPACEapipPrecise::compute_factor_lambda(double lambda)
double PairPACEPreciseAPIP::compute_factor_lambda(double lambda)
{
return 1 - lambda;
}
@ -52,7 +52,7 @@ double PairPACEapipPrecise::compute_factor_lambda(double lambda)
* @return atom->apip_e_precise which is used for a precise ACE potential
*/
double *PairPACEapipPrecise::get_e_ref_ptr()
double *PairPACEPreciseAPIP::get_e_ref_ptr()
{
return atom->apip_e_precise;
}
@ -60,7 +60,7 @@ double *PairPACEapipPrecise::get_e_ref_ptr()
/* ----------------------------------------------------------------------
extract method for extracting value of scale variable
---------------------------------------------------------------------- */
void *PairPACEapipPrecise::extract(const char *str, int &dim)
void *PairPACEPreciseAPIP::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str, "scale") == 0) return (void *) scale;

View File

@ -16,20 +16,20 @@
#ifdef PAIR_CLASS
// clang-format off
PairStyle(pace/apip/precise,PairPACEapipPrecise);
PairStyle(pace/precise/apip,PairPACEPreciseAPIP);
// clang-format on
#else
#ifndef LMP_PAIR_PACE_APIP_PRECISE_H
#define LMP_PAIR_PACE_APIP_PRECISE_H
#ifndef LMP_PAIR_PACE_PRECISE_APIP_H
#define LMP_PAIR_PACE_PRECISE_APIP_H
#include "pair_pace_apip.h"
namespace LAMMPS_NS {
class PairPACEapipPrecise : public PairPACEapip {
class PairPACEPreciseAPIP : public PairPACEAPIP {
public:
PairPACEapipPrecise(class LAMMPS *);
PairPACEPreciseAPIP(class LAMMPS *);
void *extract(const char *, int &) override;
protected: