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

add variable in the box packing functions to allow more packmol iterations #1185

Open
bc118 opened this issue May 5, 2024 · 3 comments · May be fixed by #787
Open

add variable in the box packing functions to allow more packmol iterations #1185

bc118 opened this issue May 5, 2024 · 3 comments · May be fixed by #787
Labels

Comments

@bc118
Copy link
Contributor

bc118 commented May 5, 2024

This is in the https://github.com/mosdef-hub/mbuild/blob/0.13.1/mbuild/packing.py file.

Packing fails in much larger systems unless the packing is not that dense, add the below variables would give the users more flexibility.

### Error from Packmol packing a 60^3 box with water with 80% actual density [so ~(65 Ang)^3 actual packing space)

The forced point was writen to the
output file: /tmp/tmp6sgmm0c0.xyz_FORCED

If you want that the packing procedure continues
for a longer time, add the following keyword
to the input file:

nloop [integer] (ex: nloop 200)

The default nloop value is 50 for each molecule.

@bc118 bc118 added the feature label May 5, 2024
@bc118 bc118 closed this as completed May 5, 2024
@bc118 bc118 reopened this May 6, 2024
@chrisjonesBSU
Copy link
Contributor

This would be great. Overall, I think we need more control over the interface with PACKMOL. There are a lot of parameters that could be tweaked. A long long time ago I started a PR to work on this: #787. At this point it might be easiest to start it again from scratch.

@chrisjonesBSU
Copy link
Contributor

At this point it might be easiest to start it again from scratch.

I take that back, the conflicts weren't as bad as I thought. I merged in upstream, maybe we can revisit this PR and get it merged soon.

@chrisjonesBSU
Copy link
Contributor

@bc118 here is an example how this looks using the changes in #787

import mbuild as mb

methane = mb.load("C", smiles=True)
filled = mb.fill_box(
    compound=methane,
    n_compounds=100, 
    box=[10, 10, 10],
    packmol_args={"maxit": 500, "movebadrandom": "", "nloop": 500}
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants