fix/ARTn

namespace LAMMPS_NS
class FixARTn : public Fix
#include <fix_artn.h>

Class Fix/ARTn for LAMMPS.

Authors

Matic Poberznic, Miha Gunde, Nicolas Salles

@par Purpose

Interface for LAMMPS to apply the ARTn algorithm associate with the FIRE algorithm

Public Functions

FixARTn(class LAMMPS*, int, char**)

Constructor of the Class FixARTn.

Authors

Matic Poberznic Miha Gunde Nicolas Salles

Parameters:
  • lmp[in] PTR, on the Class lammps

  • narg[in] INT, number words are in arguments of the executable

  • arg[in] CHAR, Array of string of the argument

virtual ~FixARTn()

Destructor.

int setmask()

Set mask to define when this fix must be active.

virtual void init()

Initialize the class.

void min_setup(int)

Setup the class.

void min_post_force(int)

Apply the ARTn algorithm.

void post_run()

Finilize ARTn algorithm (clean_artn)

int modify_param(int, char**) override

Protected Functions

void Collect_Arrays(int*, double**, double**, double**, int, double**, double**, double**, int*, int*)

Collect distributed arrays.

Authors

Matic Poberznic Miha Gunde Nicolas Salles

@par Purpose

Collect the distributed array, position, velicity, and force, trough the N processor. Return uniq array for each quantities in order as it received

Parameters:
  • nloc[in] number of element of the arrays is on the processor

  • x[in] 2D array of Position

  • v[in] 2D array of Velocity

  • f[in] 2D array of Force

  • nat[in] Number total of element of arrays

  • xtot[out] 2D array contains the distributed Position over the N procs

  • vtot[out] 2D array contains the distributed Velocity over the N procs

  • ftot[out] 2D array contains the distributed Forces over the N procs

  • order_tot[in] 1D array contains the order of atoms over the N procs following the rank od the procs

  • typ_tot[in] 1D array contains the type of each atoms

void Spread_Arrays(int*, double**, double**, double**, int, double**, double**, double**)

Spread distributed arrays.

Authors

Matic Poberznic Miha Gunde Nicolas Salles

@par Purpose

Redistribut/Spread the distributed array, position, velicity, and force, trough the N processor.

Parameters:
  • nloc[in] INT, number of element of the arrays is on the processor

  • xtot[in] DOUBLE, 2D array contains the distributed Position over the N procs

  • vtot[in] DOUBLE, 2D array contains the distributed Velocity over the N procs

  • ftot[in] DOUBLE 2D array contains the distributed Forces over the N procs

  • nat[in] INT, Number total of element of arrays

  • x[out] DOUBLE, 2D array of Position

  • v[out] DOUBLE, 2D array of Velocity

  • f[out] DOUBLE, 2D array of Force

void collect_name(const char *name, int type, int count, void *data)
void spread_name(const char *name, int type, int count, void *data)
void Check_min_params(const char*)
void resize_total_system(int)

Resize the global arrays.

Authors

Matic Poberznic Miha Gunde Nicolas Salles

@par Purpose

Resize the 2D array containing the entire data of Position, Velocity and Forces

Parameters:

ntot[in] INT, Total number of atoms in the system

void resize_local_system(int)

Resize the local arrays.

Authors

Matic Poberznic Miha Gunde Nicolas Salles

@par Purpose

Verify, resize and redistribut the data Position, Velocity and Forces through the N procs

Parameters:

nlocal[in] INT, number of atoms on the proc

Protected Attributes

int istep

Number of time lammps call min_post_force()

int nword

Number of arguments for min->modify_params()

int natoms

Total number of atoms.

int nmax

Number of atoms and ghost.

char **word

Array of string for min->modify_params()

int PERP
int RELX
int *order

Array with the local order of atoms.

int *order_tot

Array with global order of atoms following the ascending order of id proc.

int **if_pos

array of 0/1 if the atoms can move or not

char *elt

Array of Atoms Name (Chemical name)

int nextblank

Flag telling if the nexcall is at the same step.

double **f_prev

2D array store the previous forces field

double **v_prev

2D array store the previous velocity field

double **ftot

2D array of global forces over the N procs

double **xtot

2D array of global positions over the N procs

double **vtot

2D array of global velocities over the N procs

double etol

Tolerence on energies.

double ftol

Tolerence on forces.

double alpha_init

FIRE: \( \alpha_0 \).

double alphashrink

FIRE: alpha reduction parameter.

double dt_init

FIRE: dt \(_0\).

double dtsk

FIRE: dt reduction parameter.

double dtgrow

FIRE: dt increase parameter.

double tmax

FIRE:

double tmin
double dtmax
double dtmin
double dmax
int check_dmax_flag

Flag to Check the FIRE dmax value.

int fire_integrator

FIRE integrator Selector.

int ntimestep_start

Save the time step when it start.

int delaystep_start_flag

FIRE control the parameters initialization.

int nsteppos

Current delaystep (for the relax step)

int nsteppos0

Defined delaystep (for the relax step)

double dt_curr

Current dt.

double alpha

Current alpha.

class Compute *pe_compute

compute for potential energy

const char *alphab = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

Should disappear.

int me

Rank of the procs.

int nproc

Number of Procs.

int *nloc

Local number of atoms.

int oldnloc

Array to store the local number of atoms.

int *istart

Array for the resize routines.

int *length

Array for the resize routines.

int *nlresize

Array for the resize routines.

namespace std
namespace FixConst