Set EAM parameters for same case as miniMD

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti 2021-10-27 01:38:56 +02:00
parent 70cc6aeb19
commit d9c9cba12d
2 changed files with 18 additions and 6 deletions

View File

@ -45,7 +45,10 @@ void initEam(Eam* eam, Parameter* param) {
void coeff(Eam* eam, Parameter* param) {
read_file(&eam->file, param->input_file);
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) {

View File

@ -50,11 +50,20 @@ void setupThermo(Parameter *param, int natoms)
engarr = (MD_FLOAT*) malloc(maxstat * sizeof(MD_FLOAT));
prsarr = (MD_FLOAT*) malloc(maxstat * sizeof(MD_FLOAT));
mvv2e = 1.0;
dof_boltz = (natoms * 3 - 3);
t_scale = mvv2e / dof_boltz;
p_scale = 1.0 / 3 / param->xprd / param->yprd / param->zprd;
e_scale = 0.5;
if(param->force_field == FF_LJ) {
mvv2e = 1.0;
dof_boltz = (natoms * 3 - 3);
t_scale = mvv2e / dof_boltz;
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");
}