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:
athomps 2010-10-19 00:14:14 +00:00
parent 3ef5954488
commit a70605cc75
6 changed files with 34 additions and 11 deletions

View File

@ -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
@ -7,10 +7,10 @@ SHELL = /bin/sh
# generally no need to edit this section
# unless additional compiler/linker flags or libraries needed for your machine
CC = mpic++
CC = ccache ${MPI_GCC4_PATH}/mpic++
CCFLAGS = -O -MMD -MG
DEPFLAGS = -M
LINK = mpic++
LINK = ccache ${MPI_GCC4_PATH}/mpic++
LINKFLAGS = -O
LIB =
ARCHIVE = ar

View File

@ -7,11 +7,11 @@ SHELL = /bin/sh
# generally no need to edit this section
# unless additional compiler/linker flags or libraries needed for your machine
CC = g++4
CCFLAGS = -O
CC = ccache g++-4
CCFLAGS = -v -O
DEPFLAGS = -M
LINK = g++4
LINKFLAGS = -O
LINK = ccache g++-4
LINKFLAGS = -v -O
LIB =
ARCHIVE = ar
ARFLAGS = -rc
@ -34,6 +34,7 @@ MPI_INC = -I../STUBS
MPI_PATH =
MPI_LIB = ../STUBS/libmpi.a
# FFT library, can be -DFFT_NONE if not using PPPM from kspace package
# INC = -DFFT_FFTW, -DFFT_INTEL, -DFFT_NONE, etc, FFT compiler settings
# PATH = path for FFT library

View File

@ -18,7 +18,7 @@ PACKAGE = asphere class2 colloid dipole dsmc gpu granular \
shock srd xtc
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)

View File

@ -51,6 +51,9 @@ PairREAX::PairREAX(LAMMPS *lmp) : Pair(lmp)
one_coeff = 1;
no_virial_compute = 1;
nextra = 14;
pvector = new double[nextra];
cutmax = 0.0;
hbcut = 6.0;
ihbnew = 1;
@ -85,6 +88,8 @@ PairREAX::PairREAX(LAMMPS *lmp) : Pair(lmp)
PairREAX::~PairREAX()
{
delete [] pvector;
if (allocated) {
memory->destroy_2d_int_array(setflag);
memory->destroy_2d_double_array(cutsq);
@ -183,7 +188,6 @@ void PairREAX::compute(int eflag, int vflag)
// compute_charge already contributed to eatom
if (eflag && eflag_global) {
// output_itemized_energy(energy_charge_equilibration);
evdwl += FORTRAN(cbkenergies, CBKENERGIES).eb;
evdwl += FORTRAN(cbkenergies, CBKENERGIES).ea;
evdwl += FORTRAN(cbkenergies, CBKENERGIES).elp;
@ -202,6 +206,25 @@ void PairREAX::compute(int eflag, int vflag)
eng_vdwl += evdwl;
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) {

View File

@ -88,7 +88,6 @@ class PairREAX : public Pair {
int[], double[], double[]);
void charge_reax(const int &, const int &, double[],
double[], int[], int[], double[]);
void output_itemized_energy(double);
};
}

View File

@ -15,7 +15,7 @@ OBJ = $(SRC:.c=.o)
# System-specific settings
CC = g++
CC = icc
CCFLAGS = -O
ARCHIVE = ar
ARCHFLAG = rs