whitespace fixes
This commit is contained in:
@ -302,40 +302,40 @@ void KimInteractions::KIM_SET_TYPE_PARAMETERS(char const *const input_line) cons
|
|||||||
|
|
||||||
if(nocomment) {
|
if(nocomment) {
|
||||||
if (strcmp(key,"pair") == 0) {
|
if (strcmp(key,"pair") == 0) {
|
||||||
species1 = strtok(ptr," \t");
|
species1 = strtok(ptr," \t");
|
||||||
species2 = strtok(NULL," \t");
|
species2 = strtok(NULL," \t");
|
||||||
the_rest = strtok(NULL,"\n");
|
the_rest = strtok(NULL,"\n");
|
||||||
|
|
||||||
for (int type_a = 0; type_a < atom->ntypes; ++type_a) {
|
for (int type_a = 0; type_a < atom->ntypes; ++type_a) {
|
||||||
for (int type_b = type_a; type_b < atom->ntypes; ++type_b) {
|
for (int type_b = type_a; type_b < atom->ntypes; ++type_b) {
|
||||||
if(((strcmp(species[type_a],species1) == 0) &&
|
if(((strcmp(species[type_a],species1) == 0) &&
|
||||||
(strcmp(species[type_b],species2) == 0))
|
(strcmp(species[type_b],species2) == 0))
|
||||||
||
|
||
|
||||||
((strcmp(species[type_b],species1) == 0) &&
|
((strcmp(species[type_b],species1) == 0) &&
|
||||||
(strcmp(species[type_a],species2) == 0))
|
(strcmp(species[type_a],species2) == 0))
|
||||||
) {
|
) {
|
||||||
char pair_command[MAXLINE];
|
char pair_command[MAXLINE];
|
||||||
sprintf(pair_command,"pair_coeff %i %i %s",type_a+1,type_b+1,
|
sprintf(pair_command,"pair_coeff %i %i %s",type_a+1,type_b+1,
|
||||||
the_rest);
|
the_rest);
|
||||||
input->one(pair_command);
|
input->one(pair_command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (strcmp(key,"charge") == 0) {
|
else if (strcmp(key,"charge") == 0) {
|
||||||
species1 = strtok(ptr," \t");
|
species1 = strtok(ptr," \t");
|
||||||
the_rest = strtok(NULL,"\n");
|
the_rest = strtok(NULL,"\n");
|
||||||
|
|
||||||
for (int type_a = 0; type_a < atom->ntypes; ++type_a) {
|
for (int type_a = 0; type_a < atom->ntypes; ++type_a) {
|
||||||
if(strcmp(species[type_a],species1) == 0) {
|
if(strcmp(species[type_a],species1) == 0) {
|
||||||
char pair_command[MAXLINE];
|
char pair_command[MAXLINE];
|
||||||
sprintf(pair_command,"set type %i charge %s",type_a+1,the_rest);
|
sprintf(pair_command,"set type %i charge %s",type_a+1,the_rest);
|
||||||
input->one(pair_command);
|
input->one(pair_command);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
error->one(FLERR,"Unrecognized KEY for KIM_SET_TYPE_PARAMETERS command");
|
error->one(FLERR,"Unrecognized KEY for KIM_SET_TYPE_PARAMETERS command");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2770,10 +2770,10 @@ void FixNPTCauchy::CauchyStat_Step(double (&Fi)[3][3], double (&Fdot)[3][3],
|
|||||||
n=uv(jj,2);
|
n=uv(jj,2);
|
||||||
dsds(ii,jj) = Fi(i,m)*Fi(j,n) + Fi(i,n)*Fi(j,m) + Fi(j,m)*Fi(i,n) + Fi(j,n)*Fi(i,m);
|
dsds(ii,jj) = Fi(i,m)*Fi(j,n) + Fi(i,n)*Fi(j,m) + Fi(j,m)*Fi(i,n) + Fi(j,n)*Fi(i,m);
|
||||||
for(int l = 1;l <= 3;l++) {
|
for(int l = 1;l <= 3;l++) {
|
||||||
for(int k = 1;k <= 3;k++) {
|
for(int k = 1;k <= 3;k++) {
|
||||||
dsdf(ii,jj) = dsdf(ii,jj) + cauchy(k,l)*
|
dsdf(ii,jj) = dsdf(ii,jj) + cauchy(k,l)*
|
||||||
( Fi(i,k)*Fi(j,l)*Fi(n,m) - Fi(i,m)*Fi(j,l)*Fi(n,k) - Fi(i,k)*Fi(j,m)*Fi(n,l) );
|
( Fi(i,k)*Fi(j,l)*Fi(n,m) - Fi(i,m)*Fi(j,l)*Fi(n,k) - Fi(i,k)*Fi(j,m)*Fi(n,l) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user