Add parameter reading for LAMMPS variant

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti
2022-03-17 02:44:34 +01:00
parent d4b34e1fa4
commit 887f41871c
11 changed files with 293 additions and 80 deletions

View File

@@ -43,6 +43,7 @@ extern void initAtom(Atom*);
extern void createAtom(Atom*, Parameter*);
extern int readAtom(Atom*, Parameter*);
extern int readAtom_pdb(Atom*, Parameter*);
extern int readAtom_gro(Atom*, Parameter*);
extern int readAtom_dmp(Atom*, Parameter*);
extern void growAtom(Atom*);

View File

@@ -31,9 +31,11 @@
typedef struct {
int force_field;
char* param_file;
char* input_file;
char* vtk_file;
MD_FLOAT epsilon;
MD_FLOAT sigma;
MD_FLOAT sigma6;
MD_FLOAT temp;
MD_FLOAT rho;
@@ -41,8 +43,10 @@ typedef struct {
int ntypes;
int ntimes;
int nstat;
int every;
int halfneigh;
int reneigh_every;
int x_out_every;
int v_out_every;
int half_neigh;
MD_FLOAT dt;
MD_FLOAT dtforce;
MD_FLOAT skin;
@@ -55,4 +59,9 @@ typedef struct {
double proc_freq;
char* eam_file;
} Parameter;
void initParameter(Parameter*);
void readParameter(Parameter*, const char*);
void printParameter(Parameter*);
#endif

View File

@@ -32,6 +32,15 @@
#ifndef ABS
#define ABS(a) ((a) >= 0 ? (a) : -(a))
#endif
#ifdef DEBUG
#define DEBUG_MESSAGE printf
#else
#define DEBUG_MESSAGE
#endif
#ifndef MAXLINE
#define MAXLINE 4096
#endif
#define FF_LJ 0
#define FF_EAM 1