git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13432 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2015-04-27 16:08:53 +00:00
parent f3b21a9ca3
commit 45ca7c3df5
2 changed files with 13 additions and 0 deletions

View File

@ -14,6 +14,7 @@
#include "math.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "pair_morse.h"
#include "atom.h"
#include "comm.h"
@ -346,3 +347,14 @@ double PairMorse::single(int i, int j, int itype, int jtype, double rsq,
phi = d0[itype][jtype] * (dexp*dexp - 2.0*dexp) - offset[itype][jtype];
return factor_lj*phi;
}
/* ---------------------------------------------------------------------- */
void *PairMorse::extract(const char *str, int &dim)
{
dim = 2;
if (strcmp(str,"d") == 0) return (void *) d0;
if (strcmp(str,"r0") == 0) return (void *) r0;
if (strcmp(str,"alpha") == 0) return (void *) alpha;
return NULL;
}