bonded interactions by type

I've been playing around with the idea of letting LAMMPS users specify
bonded interactions by type. Without modifying lammps, I've attached
a preprocessing utility which augments the LAMMPS data format with
these sections: "Angles By Type", "Dihedrals By Type", "Impropers By


Angles By Type

    7 1 2 1 * *
    8 2 2 * 11
    9 3 4 3 * *

(After the 1 in the first column, the next 3 columns correspond to
atom types, and the final 2 columns correspond to bond types.)

I've attached a utility "", a preprocessor, which
strips out these sections from a data file and replaces them with the
corresponding "Angles" "Dihedrals" or "Impropers" entries.
"" generates interactions by examining the
bond-network of the system, and searching for 3-body and 4-body
subgraphs corresponding to angle, dihedral, and improper interactions.
(I suppose you could also use it to identify sub-chemical-compounds
like sugar rings. Not sure how useful that would be for lammps users.)

-- Example usage: --

./ Angles < >

More details are in "docs_nbody_by_type.txt" (attached).

Mostly I posted this message in order to propose this new feature.
(Hopefully the code I wrote is useful for implementing it.)

-- Code details/status: --

I have tested this code (..with Angles at least).
It might have been premature to post this code at this point.
Unfortunately this program requires a number of other python files
(hopefully all also attached), and I haven't yet written a nice
installer for them. (In progress.) For now you can just save them in
the same directory and run it from that directory.

These files probably do contain bugs. I am actively working on this
project and will fix them. If you are interested, I will post
follow-up message here containing where to download updates.. (Or
email me for the location ) I won't post follow-up code here.

-- Moltemplate --

This program will be part of a much larger preprocessing program
("moltemplate") I will post on this mailing list in a few days.


docs_nbody_by_type.txt (5.35 KB) (1.3 KB) (13.2 KB) (35.9 KB) (1.64 KB) (1.81 KB) (1.69 KB) (3.15 KB) (7.06 KB) (55.6 KB) (23.2 KB)