mirror of https://github.com/lammps/lammps.git
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@4596 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
fcf3068325
commit
74dc9c26f5
|
@ -113,7 +113,7 @@ class Data {
|
|||
double *pair_ljgromacs_epsilon,*pair_ljgromacs_sigma;
|
||||
double *pair_ljsmooth_epsilon,*pair_ljsmooth_sigma;
|
||||
double *pair_morse_d0,*pair_morse_alpha,*pair_morse_r0;
|
||||
double *pair_soft_start,*pair_soft_stop;
|
||||
double *pair_soft_A;
|
||||
double *pair_yukawa_A;
|
||||
|
||||
double *bond_class2_r0,*bond_class2_k2,*bond_class2_k3,*bond_class2_k4;
|
||||
|
@ -1530,6 +1530,32 @@ void pair(FILE *fp, Data &data, char *style, int flag)
|
|||
} else if (strcmp(style,"eam/fs") == 0) {
|
||||
} else if (strcmp(style,"eam/fs/opt") == 0) {
|
||||
|
||||
} else if (strcmp(style,"eff/cut") == 0) {
|
||||
|
||||
double cut_coul = read_double(fp);
|
||||
int limit_size_flag = read_int(fp);
|
||||
int flexible_pressure_flag = read_int(fp);
|
||||
int offset_flag = read_int(fp);
|
||||
int mix_flag = read_int(fp);
|
||||
|
||||
if (!flag) return;
|
||||
|
||||
for (i = 1; i <= data.ntypes; i++)
|
||||
for (j = i; j <= data.ntypes; j++) {
|
||||
itmp = read_int(fp);
|
||||
if (i == j && itmp == 0) {
|
||||
printf("ERROR: Pair coeff %d,%d is not in restart file\n",i,j);
|
||||
exit(1);
|
||||
}
|
||||
if (itmp) {
|
||||
if (i == j) {
|
||||
double cut = read_double(fp);
|
||||
} else {
|
||||
double cut = read_double(fp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else if (strcmp(style,"gayberne") == 0) {
|
||||
|
||||
double gamma = read_double(fp);
|
||||
|
@ -1939,8 +1965,7 @@ void pair(FILE *fp, Data &data, char *style, int flag)
|
|||
|
||||
if (!flag) return;
|
||||
|
||||
data.pair_soft_start = new double[data.ntypes+1];
|
||||
data.pair_soft_stop = new double[data.ntypes+1];
|
||||
data.pair_soft_A = new double[data.ntypes+1];
|
||||
|
||||
for (i = 1; i <= data.ntypes; i++)
|
||||
for (j = i; j <= data.ntypes; j++) {
|
||||
|
@ -1951,12 +1976,10 @@ void pair(FILE *fp, Data &data, char *style, int flag)
|
|||
}
|
||||
if (itmp) {
|
||||
if (i == j) {
|
||||
data.pair_soft_start[i] = read_double(fp);
|
||||
data.pair_soft_stop[i] = read_double(fp);
|
||||
data.pair_soft_A[i] = read_double(fp);
|
||||
double cut = read_double(fp);
|
||||
} else {
|
||||
double soft_start = read_double(fp);
|
||||
double soft_stop = read_double(fp);
|
||||
double soft_A = read_double(fp);
|
||||
double cut = read_double(fp);
|
||||
}
|
||||
}
|
||||
|
@ -2651,6 +2674,7 @@ void Data::write(FILE *fp, FILE *fp2)
|
|||
(strcmp(pair_style,"eam/alloy/opt") != 0) &&
|
||||
(strcmp(pair_style,"eam/fs") != 0) &&
|
||||
(strcmp(pair_style,"eam/fs/opt") != 0) &&
|
||||
(strcmp(pair_style,"eff/cut") != 0) &&
|
||||
(strcmp(pair_style,"gran/history") != 0) &&
|
||||
(strcmp(pair_style,"gran/no_history") != 0) &&
|
||||
(strcmp(pair_style,"gran/hertzian") != 0) &&
|
||||
|
@ -2753,8 +2777,8 @@ void Data::write(FILE *fp, FILE *fp2)
|
|||
|
||||
} else if (strcmp(pair_style,"soft") == 0) {
|
||||
for (int i = 1; i <= ntypes; i++)
|
||||
fprintf(fp,"%d %g %g\n",i,
|
||||
pair_soft_start[i],pair_soft_stop[i]);
|
||||
fprintf(fp,"%d %g\n",i,
|
||||
pair_soft_A[i]);
|
||||
|
||||
} else if (strcmp(pair_style,"yukawa") == 0) {
|
||||
for (int i = 1; i <= ntypes; i++)
|
||||
|
|
Loading…
Reference in New Issue