From 0a1b02b821bb446fb7998c6bce29157a81c6d1f1 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Mon, 13 Jun 2011 21:58:07 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@6374 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/MAKE/Makefile.g++ | 3 +++ src/Makefile | 4 ++-- src/atom.cpp | 4 ++++ src/atom.h | 6 +++++- src/compute_slice.cpp | 2 +- src/force.h | 4 ++++ src/update.cpp | 24 ++++++++++++++++++++++++ 7 files changed, 43 insertions(+), 4 deletions(-) diff --git a/src/MAKE/Makefile.g++ b/src/MAKE/Makefile.g++ index df0332892e..90771bb1eb 100755 --- a/src/MAKE/Makefile.g++ +++ b/src/MAKE/Makefile.g++ @@ -62,16 +62,19 @@ gpu_SYSINC = meam_SYSINC = reax_SYSINC = user-atc_SYSINC = +user-awpmd_SYSINC = gpu_SYSLIB = -lcudart -lcuda meam_SYSLIB = -lgfortran reax_SYSLIB = -lgfortran user-atc_SYSLIB = -lblas -llapack +user-awpmd_SYSLIB = -lblas -llapack gpu_SYSPATH = -L/usr/local/cuda/lib64 meam_SYSPATH = reax_SYSPATH = user-atc_SYSPATH = +user-awpmd_SYSPATH = # --------------------------------------------------------------------- # build rules and dependencies diff --git a/src/Makefile b/src/Makefile index a1b626f669..5b3246591f 100755 --- a/src/Makefile +++ b/src/Makefile @@ -17,8 +17,8 @@ PACKAGE = asphere class2 colloid dipole dsmc gpu granular \ kspace manybody meam molecule opt peri poems reax replica \ shock srd xtc -PACKUSER = user-ackland user-atc user-cd-eam user-cg-cmm user-cuda \ - user-eff user-ewaldn user-imd user-reaxc user-smd +PACKUSER = user-ackland user-atc user-awpmd user-cd-eam user-cg-cmm \ + user-cuda user-eff user-ewaldn user-imd user-reaxc user-smd PACKALL = $(PACKAGE) $(PACKUSER) diff --git a/src/atom.cpp b/src/atom.cpp index 103fd5bc57..b9c9c3e707 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -81,6 +81,8 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) ellipsoid = NULL; spin = NULL; eradius = ervel = erforce = NULL; + cs = csforce = vforce = ervelforce = NULL; + etag = NULL; maxspecial = 1; nspecial = NULL; @@ -104,10 +106,12 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp) // customize by adding new flag sphere_flag = ellipsoid_flag = peri_flag = electron_flag = 0; + wavepacket_flag = 0; molecule_flag = q_flag = mu_flag = 0; rmass_flag = radius_flag = omega_flag = torque_flag = angmom_flag = 0; vfrac_flag = spin_flag = eradius_flag = ervel_flag = erforce_flag = 0; + cs_flag = csforce_flag = vforce_flag = ervelforce_flag= etag_flag = 0; // ntype-length arrays diff --git a/src/atom.h b/src/atom.h index e4972b27e6..9b56510ca3 100644 --- a/src/atom.h +++ b/src/atom.h @@ -53,7 +53,9 @@ class Atom : protected Pointers { double **x0; int *ellipsoid; int *spin; - double *eradius,*ervel,*erforce; + double *eradius,*ervel,*erforce,*ervelforce; + double *cs,*csforce,*vforce; + int *etag; int **nspecial; // 0,1,2 = cummulative # of 1-2,1-3,1-4 neighs int **special; // IDs of 1-2,1-3,1-4 neighs of each atom @@ -79,10 +81,12 @@ class Atom : protected Pointers { // customize by adding new flag int sphere_flag,ellipsoid_flag,peri_flag,electron_flag; + int wavepacket_flag; int molecule_flag,q_flag,mu_flag; int rmass_flag,radius_flag,omega_flag,torque_flag,angmom_flag; int vfrac_flag,spin_flag,eradius_flag,ervel_flag,erforce_flag; + int cs_flag,csforce_flag,vforce_flag,ervelforce_flag,etag_flag; // extra peratom info in restart file destined for fix & diag diff --git a/src/compute_slice.cpp b/src/compute_slice.cpp index 15096b8c8c..51e7747e36 100644 --- a/src/compute_slice.cpp +++ b/src/compute_slice.cpp @@ -145,7 +145,7 @@ ComputeSlice::ComputeSlice(LAMMPS *lmp, int narg, char **arg) : extlist[j++] = modify->compute[icompute]->extlist[i-1]; } } else extvector = modify->compute[icompute]->extarray; - } else if (which[0] = FIX) { + } else if (which[0] == FIX) { int ifix = modify->find_fix(ids[0]); if (argindex[0] == 0) { extvector = modify->fix[ifix]->extvector; diff --git a/src/force.h b/src/force.h index 9f20b4c66c..df214c974f 100644 --- a/src/force.h +++ b/src/force.h @@ -31,6 +31,10 @@ class Force : protected Pointers { double xxt2kmu; // conversion of xx/t to kinematic-visc double dielectric; // dielectric constant double qqrd2e; // q^2/r to energy w/ dielectric constant + double e_mass; // electron mass + double hhmrr2e; // conversion of (hbar)^2/(mr^2) to energy + double mvh2r; // conversion of mv/hbar to distance + // hbar = h/(2*pi) int newton,newton_pair,newton_bond; // Newton's 3rd law settings diff --git a/src/update.cpp b/src/update.cpp index cc6f49b16f..5718368d18 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -127,6 +127,10 @@ void Update::set_units(const char *style) force->qe2f = 1.0; force->vxmu2f = 1.0; force->xxt2kmu = 1.0; + force->e_mass = 0.0; // not yet set + force->hhmrr2e = 0.0; + force->mvh2r = 0.0; + dt = 0.005; neighbor->skin = 0.3; @@ -140,6 +144,10 @@ void Update::set_units(const char *style) force->qe2f = 23.060549; force->vxmu2f = 1.4393264316e4; force->xxt2kmu = 0.1; + force->e_mass = 1.0/1836.1527556560675; + force->hhmrr2e = 0.0957018663603261; + force->mvh2r = 1.5339009481951; + dt = 1.0; neighbor->skin = 2.0; @@ -153,6 +161,10 @@ void Update::set_units(const char *style) force->qe2f = 1.0; force->vxmu2f = 0.6241509647; force->xxt2kmu = 1.0e-4; + force->e_mass = 0.0; // not yet set + force->hhmrr2e = 0.0; + force->mvh2r = 0.0; + dt = 0.001; neighbor->skin = 2.0; @@ -166,6 +178,10 @@ void Update::set_units(const char *style) force->qe2f = 1.0; force->vxmu2f = 1.0; force->xxt2kmu = 1.0; + force->e_mass = 0.0; // not yet set + force->hhmrr2e = 0.0; + force->mvh2r = 0.0; + dt = 1.0e-8; neighbor->skin = 0.001; @@ -179,6 +195,10 @@ void Update::set_units(const char *style) force->qe2f = 1.0; force->vxmu2f = 1.0; force->xxt2kmu = 1.0; + force->e_mass = 0.0; // not yet set + force->hhmrr2e = 0.0; + force->mvh2r = 0.0; + dt = 1.0e-8; neighbor->skin = 0.1; @@ -192,6 +212,10 @@ void Update::set_units(const char *style) force->qe2f = 1.94469051e-10; force->vxmu2f = 3.39893149e1; force->xxt2kmu = 3.13796367e-2; + force->e_mass = 0.0; // not yet set + force->hhmrr2e = 0.0; + force->mvh2r = 0.0; + dt = 0.001; neighbor->skin = 2.0;