Dear LAMMPS users,
Is there a way to access a list of all bonds in a system via some python API, be it lammps.py or PyLammps?
My goal is to define angle potential terms between these bonds, since it looks like there’s no automated way to do that (
create_bonds many only creates bonds and angle terms must be added one by one, as I understand from the documentation)
I’m building a coarse-grained structure for graphene consisting in a triangular lattice with one particle/bead in the basis, with bonds and angles defined between first neighbors. I currently set up the lattice, add atoms via the
create_atoms command and then run
create_bonds many to. well, create many bonds.
create_bonds many command correctly creates six bonds per particle, but no angles, which is expected, according to the docs. I made a Python script that reads the bonds from a data file and generates a sequence of appropriate
create bonds single/angle commands. So in order to have a full system setup, for each lattice/supercell, I currently have to:
- set up the
create_atomsin that box
write_datato a file
- read this file with a python script to generate a list of angles
includethe file created by the python script.
I wish to avoid generating and reading/parsing the data file and creating/including the command file for each supercell.
Thanks form an unusually cloudy and rainy Natal,