Files
lammps/src/min.h
Axel Kohlmeyer 48aa45f7f0 Merge branch 'master' into lammps-icms
Resolved Conflicts (i hope):
	src/REPLICA/neb.cpp
	src/REPLICA/prd.cpp
	src/REPLICA/tad.cpp
	src/REPLICA/verlet_split.cpp
	src/USER-CUDA/atom_vec_angle_cuda.h
	src/USER-CUDA/atom_vec_atomic_cuda.h
	src/USER-CUDA/atom_vec_charge_cuda.h
	src/USER-CUDA/atom_vec_full_cuda.h
	src/USER-CUDA/compute_pe_cuda.h
	src/USER-CUDA/compute_pressure_cuda.h
	src/USER-CUDA/compute_temp_cuda.h
	src/USER-CUDA/compute_temp_partial_cuda.h
	src/USER-CUDA/cuda.cpp
	src/USER-CUDA/cuda.h
	src/USER-CUDA/cuda_data.h
	src/USER-CUDA/cuda_neigh_list.h
	src/USER-CUDA/fft3d_cuda.h
	src/USER-CUDA/fft3d_wrap_cuda.h
	src/USER-CUDA/fix_addforce_cuda.h
	src/USER-CUDA/fix_aveforce_cuda.h
	src/USER-CUDA/fix_enforce2d_cuda.h
	src/USER-CUDA/fix_freeze_cuda.h
	src/USER-CUDA/fix_gravity_cuda.h
	src/USER-CUDA/fix_nve_cuda.h
	src/USER-CUDA/fix_set_force_cuda.h
	src/USER-CUDA/fix_temp_berendsen_cuda.h
	src/USER-CUDA/fix_temp_rescale_cuda.h
	src/USER-CUDA/fix_temp_rescale_limit_cuda.h
	src/USER-CUDA/fix_viscous_cuda.h
	src/USER-CUDA/pair_born_coul_long_cuda.h
	src/USER-CUDA/pair_buck_coul_cut_cuda.h
	src/USER-CUDA/pair_buck_coul_long_cuda.h
	src/USER-CUDA/pair_buck_cuda.h
	src/USER-CUDA/pair_cg_cmm_coul_cut_cuda.cpp
	src/USER-CUDA/pair_cg_cmm_coul_cut_cuda.h
	src/USER-CUDA/pair_cg_cmm_coul_debye_cuda.cpp
	src/USER-CUDA/pair_cg_cmm_coul_debye_cuda.h
	src/USER-CUDA/pair_cg_cmm_coul_long_cuda.cpp
	src/USER-CUDA/pair_cg_cmm_coul_long_cuda.h
	src/USER-CUDA/pair_cg_cmm_cuda.cpp
	src/USER-CUDA/pair_cg_cmm_cuda.h
	src/USER-CUDA/pair_eam_cuda.h
	src/USER-CUDA/pair_gran_hooke_cuda.h
	src/USER-CUDA/pair_lj96_cut_cuda.h
	src/USER-CUDA/pair_lj_charmm_coul_charmm_cuda.h
	src/USER-CUDA/pair_lj_charmm_coul_charmm_implicit_cuda.h
	src/USER-CUDA/pair_lj_charmm_coul_long_cuda.h
	src/USER-CUDA/pair_lj_class2_coul_cut_cuda.h
	src/USER-CUDA/pair_lj_class2_coul_long_cuda.h
	src/USER-CUDA/pair_lj_class2_cuda.h
	src/USER-CUDA/pair_lj_cut_coul_cut_cuda.h
	src/USER-CUDA/pair_lj_cut_coul_debye_cuda.h
	src/USER-CUDA/pair_lj_cut_coul_long_cuda.h
	src/USER-CUDA/pair_lj_cut_cuda.h
	src/USER-CUDA/pair_lj_cut_experimental_cuda.h
	src/USER-CUDA/pair_lj_expand_cuda.h
	src/USER-CUDA/pair_lj_gromacs_coul_gromacs_cuda.h
	src/USER-CUDA/pair_lj_gromacs_cuda.h
	src/USER-CUDA/pair_lj_sdk_coul_long_cuda.cpp
	src/USER-CUDA/pair_lj_sdk_coul_long_cuda.h
	src/USER-CUDA/pair_lj_sdk_cuda.h
	src/USER-CUDA/pair_lj_smooth_cuda.h
	src/USER-CUDA/pair_morse_cuda.h
	src/USER-CUDA/pair_sw_cuda.h
	src/USER-CUDA/pair_tersoff_cuda.h
	src/USER-CUDA/pair_tersoff_zbl_cuda.h
	src/USER-CUDA/pppm_cuda.h
	src/USER-CUDA/verlet_cuda.cpp
	src/USER-CUDA/verlet_cuda.h
	src/comm.cpp
	src/finish.cpp
	src/fix_rigid_nvt.h
	src/respa.cpp
	src/run.cpp
2012-06-07 16:42:38 -04:00

145 lines
4.7 KiB
C++

/* -*- c++ -*- ----------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
#ifndef LMP_MIN_H
#define LMP_MIN_H
#include "pointers.h"
namespace LAMMPS_NS {
class Min : protected Pointers {
public:
double einitial,efinal,eprevious;
double fnorm2_init,fnorminf_init,fnorm2_final,fnorminf_final;
double alpha_final;
int niter,neval;
int stop_condition;
char *stopstr;
int searchflag; // 0 if damped dynamics, 1 if sub-cycles on local search
Min(class LAMMPS *);
virtual ~Min();
virtual void init();
void setup();
void setup_minimal(int);
void run(int);
void cleanup();
int request(class Pair *, int, double);
virtual bigint memory_usage() {return 0;}
void modify_params(int, char **);
double fnorm_sqr();
double fnorm_inf();
virtual void init_style() {}
virtual void setup_style() = 0;
virtual void reset_vectors() = 0;
virtual int iterate(int) = 0;
protected:
int eflag,vflag; // flags for energy/virial computation
int virial_style; // compute virial explicitly or implicitly
int external_force_clear; // clear forces locally or externally
double dmax; // max dist to move any atom in one step
int linestyle; // 0 = backtrack, 1 = quadratic, 2 = forcezero
int nelist_global,nelist_atom; // # of PE,virial computes to check
int nvlist_global,nvlist_atom;
class Compute **elist_global; // lists of PE,virial Computes
class Compute **elist_atom;
class Compute **vlist_global;
class Compute **vlist_atom;
int triclinic; // 0 if domain is orthog, 1 if triclinic
int pairflag;
int torqueflag,erforceflag;
int e_flag,rho_flag;
int pair_compute_flag; // 0 if pair->compute is skipped
int kspace_compute_flag; // 0 if kspace->compute is skipped
int narray; // # of arrays stored by fix_minimize
class FixMinimize *fix_minimize; // fix that stores auxiliary data
class Compute *pe_compute; // compute for potential energy
double ecurrent; // current potential energy
bigint ndoftotal; // total dof for entire problem
int nvec; // local atomic dof = length of xvec
double *xvec; // variables for atomic dof, as 1d vector
double *fvec; // force vector for atomic dof, as 1d vector
int nextra_global; // # of extra global dof due to fixes
double *fextra; // force vector for extra global dof
// xextra is stored by fix
int nextra_atom; // # of extra per-atom variables
double **xextra_atom; // ptr to the variable
double **fextra_atom; // ptr to the force on the variable
int *extra_peratom; // # of values in variable, e.g. 3 in x
int *extra_nlen; // total local length of variable, e.g 3*nlocal
double *extra_max; // max allowed change per iter for atom's var
class Pair **requestor; // Pair that stores/manipulates the variable
int neigh_every,neigh_delay,neigh_dist_check; // neighboring params
double energy_force(int);
void force_clear();
double compute_force_norm_sqr();
double compute_force_norm_inf();
void ev_setup();
void ev_set(bigint);
char *stopstrings(int);
};
}
#endif
/* ERROR/WARNING messages:
W: Resetting reneighboring criteria during minimization
Minimization requires that neigh_modify settings be delay = 0, every =
1, check = yes. Since these settings were not in place, LAMMPS
changed them and will restore them to their original values after the
minimization.
E: Minimization could not find thermo_pe compute
This compute is created by the thermo command. It must have been
explicitly deleted by a uncompute command.
E: Cannot use a damped dynamics min style with fix box/relax
This is a current restriction in LAMMPS. Use another minimizer
style.
E: Cannot use a damped dynamics min style with per-atom DOF
This is a current restriction in LAMMPS. Use another minimizer
style.
E: Illegal ... command
Self-explanatory. Check the input script syntax and compare to the
documentation for the command. You can use -echo screen as a
command-line option when running LAMMPS to see the offending line.
*/