Set EAM parameters for same case as miniMD
Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
parent
70cc6aeb19
commit
d9c9cba12d
@ -45,7 +45,10 @@ void initEam(Eam* eam, Parameter* param) {
|
|||||||
void coeff(Eam* eam, Parameter* param) {
|
void coeff(Eam* eam, Parameter* param) {
|
||||||
read_file(&eam->file, param->input_file);
|
read_file(&eam->file, param->input_file);
|
||||||
param->cutforce = eam->file.cut;
|
param->cutforce = eam->file.cut;
|
||||||
param->cutneigh = param->cutforce + 0.3;
|
param->cutneigh = param->cutforce + 1.0;
|
||||||
|
param->temp = 600.0;
|
||||||
|
param->dt = 0.001;
|
||||||
|
param->rho = 0.07041125;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_style(Eam* eam, Parameter* param) {
|
void init_style(Eam* eam, Parameter* param) {
|
||||||
|
19
src/thermo.c
19
src/thermo.c
@ -50,11 +50,20 @@ void setupThermo(Parameter *param, int natoms)
|
|||||||
engarr = (MD_FLOAT*) malloc(maxstat * sizeof(MD_FLOAT));
|
engarr = (MD_FLOAT*) malloc(maxstat * sizeof(MD_FLOAT));
|
||||||
prsarr = (MD_FLOAT*) malloc(maxstat * sizeof(MD_FLOAT));
|
prsarr = (MD_FLOAT*) malloc(maxstat * sizeof(MD_FLOAT));
|
||||||
|
|
||||||
mvv2e = 1.0;
|
if(param->force_field == FF_LJ) {
|
||||||
dof_boltz = (natoms * 3 - 3);
|
mvv2e = 1.0;
|
||||||
t_scale = mvv2e / dof_boltz;
|
dof_boltz = (natoms * 3 - 3);
|
||||||
p_scale = 1.0 / 3 / param->xprd / param->yprd / param->zprd;
|
t_scale = mvv2e / dof_boltz;
|
||||||
e_scale = 0.5;
|
p_scale = 1.0 / 3 / param->xprd / param->yprd / param->zprd;
|
||||||
|
e_scale = 0.5;
|
||||||
|
} else {
|
||||||
|
mvv2e = 1.036427e-04;
|
||||||
|
dof_boltz = (natoms * 3 - 3) * 8.617343e-05;
|
||||||
|
t_scale = mvv2e / dof_boltz;
|
||||||
|
p_scale = 1.602176e+06 / 3 / param->xprd / param->yprd / param->zprd;
|
||||||
|
e_scale = 524287.985533;//16.0;
|
||||||
|
param->dtforce /= mvv2e;
|
||||||
|
}
|
||||||
|
|
||||||
printf("step\ttemp\t\tpressure\n");
|
printf("step\ttemp\t\tpressure\n");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user