Commit d43bd57a authored by Christian Negre's avatar Christian Negre Committed by Steve Plimpton
Browse files

changes in fix_latte

parent b912db5c
Loading
Loading
Loading
Loading
+21 −4
Original line number Diff line number Diff line
# Settings that the LAMMPS build will import when this package library is used
# Settings that the LAMMPS build will import when this package is installed
# Change all the flags and paths accordingly
# If using PROGRESS/BML set PROGRESS to ON 
# For more information about these libraries see: 
# BML: https://github.com/qmmd/bml
# PROGRESS: https://github.com/losalamos/qmd-progress
# METIS: http://glaros.dtc.umn.edu/gkhome/metis/metis/download 

latte_SYSINC =
latte_SYSLIB = -lifcore -lsvml -lompstub -limf
latte_SYSPATH = -L/opt/intel/fce/10.0.023/lib
latte_PATH = ${HOME}/exaalt/LATTE
progress_PATH = ${HOME}/qmd-progress
bml_PATH = ${HOME}/bml
metis_PATH = ${HOME}/Programs/metis-5.1.0

latte_SYSINC  = -I${latte_PATH}/src -I${bml_PATH}/install/include -I${progress_PATH}/install/include
latte_SYSLIB  = -openmp ${latte_PATH}/src/latte_c_bind.o ${latte_PATH}/liblatte.a \
								-lifcore -lsvml -lompstub -limf -L${MKLROOT}/lib/intel64 -lmkl_lapack95_lp64 -lmkl_intel_lp64 \
                -lmkl_intel_thread -lmkl_core -lmkl_intel_thread -lpthread -openmp -O0 \
# Uncomment the following line to use PROGRESS/BML
latte_SYSLIB  += -L${progress_PATH}/install/lib -lprogress -L${bml_PATH}/install/lib -lbml -L${metis_PATH}/install -lmetis 


latte_SYSPATH = -L/opt/intel/composer_xe_2013_sp1.2.144/compiler/lib/intel64
+14 −3
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#include "force.h"
#include "update.h"
#include "neighbor.h"
#include "domain.h"
#include "neigh_request.h"
#include "neigh_list.h"
#include "modify.h"
@@ -29,7 +30,7 @@ using namespace LAMMPS_NS;
using namespace FixConst;

 extern "C" {
   void latte(int*, double*, int*, double*);
   void latte(int*, double*, int*, int*, double*, double*, double*, double*);
  }
  
#define INVOKED_PERATOM 8
@@ -226,7 +227,17 @@ void FixLatte::post_force(int vflag)
  modify->addstep_compute(update->ntimestep+1);
*/
  int natoms = (int) atom->natoms;
  latte(&natoms,&atom->x[0][0],atom->type,&atom->f[0][0]);  
//   int* n1types -> (int) atom->ntypes;
//   domain->boxlo;
//   domain->boxhi;
//   domain->boylo;
//   domain->boyhi;
//   domain->bozlo;
//   domain->bozhi;
//   double* lo = &domain->boxlo;   
  
  latte(&natoms,&atom->x[0][0],atom->type,&atom->ntypes,&atom->mass[1], \
                 &domain->boxlo[0],&domain->boxhi[0], &atom->f[0][0]);  
//   latte(&natoms,&atom->x[0][0],atom->type);
  
  // construct H0,S,Z