zincware / IPSuite

Machine Learned Interatomic Potential Tools
https://ipsuite.readthedocs.io
Eclipse Public License 2.0
19 stars 11 forks source link

Adds Packmol PBC functionality #337

Closed bananenpampe closed 3 months ago

bananenpampe commented 3 months ago

Since version 20.15 packmol supports packing with periodic boundary conditions: https://github.com/m3g/packmol/releases/tag/v20.15.0

After checking for the newest packmol version installed it incooporates these changes into the packing.

I have not found contributor guidelines, so I was unable to run any linting Happy to do so if someone could kindly show me how. I have not found tests that test the packmol utility, so all I could do was to run a few test locally. I was unable to run the packmol-example from the ipsuite getting-started page:

mol = ips.configuration_generation.SmilesToAtoms(smiles="O")
# Duplicate water molecules
packmol = ips.configuration_generation.Packmol(
    data=[mol.atoms], count=[10], density=876
    )

packmol.run()

I receive as an error message:

'SmilesToAtoms.atoms' is not set

I was able to make it run, defining atoms myself:

mol = ips.configuration_generation.SmilesToAtoms(smiles="O")
# Duplicate water molecules
packmol = ips.configuration_generation.Packmol(
    data=[[molecule("H2O")]], count=[10], density=876
    )

packmol.run()

For such a small system, and the default tolerances you have set, packmol does not converge, instead maybe one could choose simply a larger number of atoms (converges):

mol = ips.configuration_generation.SmilesToAtoms(smiles="O")
# Duplicate water molecules
packmol = ips.configuration_generation.Packmol(
    data=[[molecule("H2O")]], count=[100], density=876
    )

packmol.run()
bananenpampe commented 3 months ago

closed as part of https://github.com/zincware/rdkit2ase/pull/9