git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@11908 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -230,9 +230,7 @@ void DihedralClass2::compute(int eflag, int vflag)
|
|||||||
sinphi = sqrt(1.0 - c*c);
|
sinphi = sqrt(1.0 - c*c);
|
||||||
sinphi = MAX(sinphi,SMALL);
|
sinphi = MAX(sinphi,SMALL);
|
||||||
|
|
||||||
// addition by Andrew Jewett, Jan 2013
|
// n123 = vb1 x vb2
|
||||||
// adjust the sign of phi if necessary for negative input angles
|
|
||||||
// n123 = vb2 x vb1
|
|
||||||
|
|
||||||
double n123x = vb1y*vb2z - vb1z*vb2y;
|
double n123x = vb1y*vb2z - vb1z*vb2y;
|
||||||
double n123y = vb1z*vb2x - vb1x*vb2z;
|
double n123y = vb1z*vb2x - vb1x*vb2z;
|
||||||
|
|||||||
@ -859,20 +859,20 @@ void Neighbor::init()
|
|||||||
|
|
||||||
// set ptrs to topology build functions
|
// set ptrs to topology build functions
|
||||||
|
|
||||||
if (bond_off) bond_build = &Neighbor::bond_partial;
|
if (atom->molecular == 2) bond_build = &Neighbor::bond_template;
|
||||||
else if (atom->molecular == 2) bond_build = &Neighbor::bond_template;
|
else if (bond_off) bond_build = &Neighbor::bond_partial;
|
||||||
else bond_build = &Neighbor::bond_all;
|
else bond_build = &Neighbor::bond_all;
|
||||||
|
|
||||||
if (angle_off) angle_build = &Neighbor::angle_partial;
|
if (atom->molecular == 2) angle_build = &Neighbor::angle_template;
|
||||||
else if (atom->molecular == 2) angle_build = &Neighbor::angle_template;
|
else if (angle_off) angle_build = &Neighbor::angle_partial;
|
||||||
else angle_build = &Neighbor::angle_all;
|
else angle_build = &Neighbor::angle_all;
|
||||||
|
|
||||||
if (dihedral_off) dihedral_build = &Neighbor::dihedral_partial;
|
if (atom->molecular == 2) dihedral_build = &Neighbor::dihedral_template;
|
||||||
else if (atom->molecular == 2) dihedral_build = &Neighbor::dihedral_template;
|
else if (dihedral_off) dihedral_build = &Neighbor::dihedral_partial;
|
||||||
else dihedral_build = &Neighbor::dihedral_all;
|
else dihedral_build = &Neighbor::dihedral_all;
|
||||||
|
|
||||||
if (improper_off) improper_build = &Neighbor::improper_partial;
|
if (atom->molecular == 2) improper_build = &Neighbor::improper_template;
|
||||||
else if (atom->molecular == 2) improper_build = &Neighbor::improper_template;
|
else if (improper_off) improper_build = &Neighbor::improper_partial;
|
||||||
else improper_build = &Neighbor::improper_all;
|
else improper_build = &Neighbor::improper_all;
|
||||||
|
|
||||||
// set topology neighbor list counts to 0
|
// set topology neighbor list counts to 0
|
||||||
|
|||||||
@ -218,21 +218,25 @@ void WriteData::header()
|
|||||||
fprintf(fp,BIGINT_FORMAT " atoms\n",atom->natoms);
|
fprintf(fp,BIGINT_FORMAT " atoms\n",atom->natoms);
|
||||||
fprintf(fp,"%d atom types\n",atom->ntypes);
|
fprintf(fp,"%d atom types\n",atom->ntypes);
|
||||||
|
|
||||||
if (atom->nbonds || atom->nbondtypes) {
|
// do not write molecular topology info for atom_style template
|
||||||
fprintf(fp,BIGINT_FORMAT " bonds\n",nbonds);
|
|
||||||
fprintf(fp,"%d bond types\n",atom->nbondtypes);
|
if (atom->molecular == 1) {
|
||||||
}
|
if (atom->nbonds || atom->nbondtypes) {
|
||||||
if (atom->nangles || atom->nangletypes) {
|
fprintf(fp,BIGINT_FORMAT " bonds\n",nbonds);
|
||||||
fprintf(fp,BIGINT_FORMAT " angles\n",nangles);
|
fprintf(fp,"%d bond types\n",atom->nbondtypes);
|
||||||
fprintf(fp,"%d angle types\n",atom->nangletypes);
|
}
|
||||||
}
|
if (atom->nangles || atom->nangletypes) {
|
||||||
if (atom->ndihedrals || atom->ndihedraltypes) {
|
fprintf(fp,BIGINT_FORMAT " angles\n",nangles);
|
||||||
fprintf(fp,BIGINT_FORMAT " dihedrals\n",atom->ndihedrals);
|
fprintf(fp,"%d angle types\n",atom->nangletypes);
|
||||||
fprintf(fp,"%d dihedral types\n",atom->ndihedraltypes);
|
}
|
||||||
}
|
if (atom->ndihedrals || atom->ndihedraltypes) {
|
||||||
if (atom->nimpropers || atom->nimpropertypes) {
|
fprintf(fp,BIGINT_FORMAT " dihedrals\n",atom->ndihedrals);
|
||||||
fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers);
|
fprintf(fp,"%d dihedral types\n",atom->ndihedraltypes);
|
||||||
fprintf(fp,"%d improper types\n",atom->nimpropertypes);
|
}
|
||||||
|
if (atom->nimpropers || atom->nimpropertypes) {
|
||||||
|
fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers);
|
||||||
|
fprintf(fp,"%d improper types\n",atom->nimpropertypes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < modify->nfix; i++)
|
for (int i = 0; i < modify->nfix; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user