Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-orthorhombic simulation boxes with LAMMPS #1091

Open
wutobias opened this issue Nov 2, 2024 · 4 comments
Open

Non-orthorhombic simulation boxes with LAMMPS #1091

wutobias opened this issue Nov 2, 2024 · 4 comments
Labels
lammps Relating to LAMMPS

Comments

@wutobias
Copy link

wutobias commented Nov 2, 2024

Description
Please describe the behavior you would like added to Interchange.

When building LAMMPS input using to_lammps with non-orthrombic simualation boxes, an error is raised NotImplementedError: Interchange does not yet support exporting non-rectangular boxes to LAMMPS. I'd like to use LAMMPS for simulations of non-orthorombic crystal lattices, hence the possibility to export these kind of simulation boxes would be nice. I am attaching an OFF topology as an example (.json serialized) off-topology.json.zip.

Below is code I'd like to use

forcefield = ForceField("openff-2.0.0.offxml")
interchange = forcefield.create_interchange(
        topology, charge_from_molecules=topology.molecules)
interchange.to_lammps("input.inp")
@wutobias wutobias changed the title Non-orthorombic simulation boxes with LAMMPS Non-orthorhombic simulation boxes with LAMMPS Nov 2, 2024
@mattwthompson mattwthompson added the lammps Relating to LAMMPS label Nov 4, 2024
@mattwthompson
Copy link
Member

This only isn't supported because I didn't think people would need it, nice to see that's not the case

I might not get to this for a few weeks - would be happy to take a PR if you're up for it. The change would need to go here, just converting the (OpenMM-style) box vectors into whichever format LAMMPS needs.

@mattwthompson
Copy link
Member

cc @timbernat

@wutobias
Copy link
Author

wutobias commented Nov 5, 2024

Thanks. I'll try to get a PR together (unless @timbernat wants to go ahead). From the documentation, it seems that LAMMPS's restricted triclinic box form is similar to the reduced form that OpenMM uses.

@timbernat
Copy link
Contributor

@wutobias I'd love to take a crack at this but won't have the bandwidth to do so until the week of 11/18, so I'm happy for you to take the reins on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lammps Relating to LAMMPS
Projects
None yet
Development

No branches or pull requests

3 participants