Removed output_itemized_energy(), added compute pair support
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@5074 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
# mac_mpi = Apple PowerBook G4 laptop, mpic++, gfortran, fink LAM/MPI, fink FFTW 2.1.5
|
# mac_mpi = Apple PowerBook G4 laptop, ccache mpic++, gfortran, fink LAM/MPI, fink FFTW 2.1.5
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
@ -7,10 +7,10 @@ SHELL = /bin/sh
|
|||||||
# generally no need to edit this section
|
# generally no need to edit this section
|
||||||
# unless additional compiler/linker flags or libraries needed for your machine
|
# unless additional compiler/linker flags or libraries needed for your machine
|
||||||
|
|
||||||
CC = mpic++
|
CC = ccache ${MPI_GCC4_PATH}/mpic++
|
||||||
CCFLAGS = -O -MMD -MG
|
CCFLAGS = -O -MMD -MG
|
||||||
DEPFLAGS = -M
|
DEPFLAGS = -M
|
||||||
LINK = mpic++
|
LINK = ccache ${MPI_GCC4_PATH}/mpic++
|
||||||
LINKFLAGS = -O
|
LINKFLAGS = -O
|
||||||
LIB =
|
LIB =
|
||||||
ARCHIVE = ar
|
ARCHIVE = ar
|
||||||
|
|||||||
@ -7,11 +7,11 @@ SHELL = /bin/sh
|
|||||||
# generally no need to edit this section
|
# generally no need to edit this section
|
||||||
# unless additional compiler/linker flags or libraries needed for your machine
|
# unless additional compiler/linker flags or libraries needed for your machine
|
||||||
|
|
||||||
CC = g++4
|
CC = ccache g++-4
|
||||||
CCFLAGS = -O
|
CCFLAGS = -v -O
|
||||||
DEPFLAGS = -M
|
DEPFLAGS = -M
|
||||||
LINK = g++4
|
LINK = ccache g++-4
|
||||||
LINKFLAGS = -O
|
LINKFLAGS = -v -O
|
||||||
LIB =
|
LIB =
|
||||||
ARCHIVE = ar
|
ARCHIVE = ar
|
||||||
ARFLAGS = -rc
|
ARFLAGS = -rc
|
||||||
@ -34,6 +34,7 @@ MPI_INC = -I../STUBS
|
|||||||
MPI_PATH =
|
MPI_PATH =
|
||||||
MPI_LIB = ../STUBS/libmpi.a
|
MPI_LIB = ../STUBS/libmpi.a
|
||||||
|
|
||||||
|
|
||||||
# FFT library, can be -DFFT_NONE if not using PPPM from kspace package
|
# FFT library, can be -DFFT_NONE if not using PPPM from kspace package
|
||||||
# INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings
|
# INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings
|
||||||
# PATH = path for FFT library
|
# PATH = path for FFT library
|
||||||
|
|||||||
@ -18,7 +18,7 @@ PACKAGE = asphere class2 colloid dipole dsmc gpu granular \
|
|||||||
shock srd xtc
|
shock srd xtc
|
||||||
|
|
||||||
PACKUSER = user-ackland user-atc user-cd-eam user-cg-cmm user-eff \
|
PACKUSER = user-ackland user-atc user-cd-eam user-cg-cmm user-eff \
|
||||||
user-ewaldn user-imd user-smd
|
user-ewaldn user-imd user-quip user-smd
|
||||||
|
|
||||||
PACKALL = $(PACKAGE) $(PACKUSER)
|
PACKALL = $(PACKAGE) $(PACKUSER)
|
||||||
|
|
||||||
|
|||||||
@ -51,6 +51,9 @@ PairREAX::PairREAX(LAMMPS *lmp) : Pair(lmp)
|
|||||||
one_coeff = 1;
|
one_coeff = 1;
|
||||||
no_virial_compute = 1;
|
no_virial_compute = 1;
|
||||||
|
|
||||||
|
nextra = 14;
|
||||||
|
pvector = new double[nextra];
|
||||||
|
|
||||||
cutmax = 0.0;
|
cutmax = 0.0;
|
||||||
hbcut = 6.0;
|
hbcut = 6.0;
|
||||||
ihbnew = 1;
|
ihbnew = 1;
|
||||||
@ -85,6 +88,8 @@ PairREAX::PairREAX(LAMMPS *lmp) : Pair(lmp)
|
|||||||
|
|
||||||
PairREAX::~PairREAX()
|
PairREAX::~PairREAX()
|
||||||
{
|
{
|
||||||
|
delete [] pvector;
|
||||||
|
|
||||||
if (allocated) {
|
if (allocated) {
|
||||||
memory->destroy_2d_int_array(setflag);
|
memory->destroy_2d_int_array(setflag);
|
||||||
memory->destroy_2d_double_array(cutsq);
|
memory->destroy_2d_double_array(cutsq);
|
||||||
@ -183,7 +188,6 @@ void PairREAX::compute(int eflag, int vflag)
|
|||||||
// compute_charge already contributed to eatom
|
// compute_charge already contributed to eatom
|
||||||
|
|
||||||
if (eflag && eflag_global) {
|
if (eflag && eflag_global) {
|
||||||
// output_itemized_energy(energy_charge_equilibration);
|
|
||||||
evdwl += FORTRAN(cbkenergies, CBKENERGIES).eb;
|
evdwl += FORTRAN(cbkenergies, CBKENERGIES).eb;
|
||||||
evdwl += FORTRAN(cbkenergies, CBKENERGIES).ea;
|
evdwl += FORTRAN(cbkenergies, CBKENERGIES).ea;
|
||||||
evdwl += FORTRAN(cbkenergies, CBKENERGIES).elp;
|
evdwl += FORTRAN(cbkenergies, CBKENERGIES).elp;
|
||||||
@ -202,6 +206,25 @@ void PairREAX::compute(int eflag, int vflag)
|
|||||||
|
|
||||||
eng_vdwl += evdwl;
|
eng_vdwl += evdwl;
|
||||||
eng_coul += ecoul;
|
eng_coul += ecoul;
|
||||||
|
|
||||||
|
// Store the different parts of the energy
|
||||||
|
// in a list for output by compute pair command
|
||||||
|
|
||||||
|
pvector[0] = FORTRAN(cbkenergies, CBKENERGIES).eb;
|
||||||
|
pvector[1] = FORTRAN(cbkenergies, CBKENERGIES).ea;
|
||||||
|
pvector[2] = FORTRAN(cbkenergies, CBKENERGIES).elp;
|
||||||
|
pvector[3] = FORTRAN(cbkenergies, CBKENERGIES).emol;
|
||||||
|
pvector[4] = FORTRAN(cbkenergies, CBKENERGIES).ev;
|
||||||
|
pvector[5] = FORTRAN(cbkenergies, CBKENERGIES).epen;
|
||||||
|
pvector[6] = FORTRAN(cbkenergies, CBKENERGIES).ecoa;
|
||||||
|
pvector[7] = FORTRAN(cbkenergies, CBKENERGIES).ehb;
|
||||||
|
pvector[8] = FORTRAN(cbkenergies, CBKENERGIES).et;
|
||||||
|
pvector[9] = FORTRAN(cbkenergies, CBKENERGIES).eco;
|
||||||
|
pvector[10] = FORTRAN(cbkenergies, CBKENERGIES).ew;
|
||||||
|
pvector[11] = FORTRAN(cbkenergies, CBKENERGIES).ep;
|
||||||
|
pvector[12] = FORTRAN(cbkenergies, CBKENERGIES).efi;
|
||||||
|
pvector[13] = energy_charge_equilibration;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eflag && eflag_atom) {
|
if (eflag && eflag_atom) {
|
||||||
|
|||||||
@ -88,7 +88,6 @@ class PairREAX : public Pair {
|
|||||||
int[], double[], double[]);
|
int[], double[], double[]);
|
||||||
void charge_reax(const int &, const int &, double[],
|
void charge_reax(const int &, const int &, double[],
|
||||||
double[], int[], int[], double[]);
|
double[], int[], int[], double[]);
|
||||||
void output_itemized_energy(double);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ OBJ = $(SRC:.c=.o)
|
|||||||
|
|
||||||
# System-specific settings
|
# System-specific settings
|
||||||
|
|
||||||
CC = g++
|
CC = icc
|
||||||
CCFLAGS = -O
|
CCFLAGS = -O
|
||||||
ARCHIVE = ar
|
ARCHIVE = ar
|
||||||
ARCHFLAG = rs
|
ARCHFLAG = rs
|
||||||
|
|||||||
Reference in New Issue
Block a user