akohlmey / topotools

VMD plugin for manipulating topology information
Other
28 stars 16 forks source link

Wrong number of lines skipped for PairIJ Coeffs section in topolammps.tcl #3

Closed BrianMoths closed 8 years ago

BrianMoths commented 8 years ago

There is an error in the formula giving the number of lines to skip for the "PairIJ Coeffs" section of a lammps input file. I will explain more.

topolammps.tcl has a readlammpsdata command that can extract topological information from a lammps input file. Part of what this script does is to ignore non-topological information in the lammps input file. One section of non-topological information is the "PairIJ" coefficients section. If and when the script finds this section, it tries to skip the section by skipping a certain number of lines depending on the number of atom types. It can be seen in line 158 that the number of lines skipped is n(n-1), were n is the number of atom types. But if we look at the lammps documentation (search for "PairIJ Coeffs section"), we see that lammps expects n(n+1)/2 lines, which makes sense, since that's the number of different pairings you can have including each atom type with itself.

akohlmey commented 8 years ago

Thanks for the report. This is easily corrected.