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

pack_box does not cover the full range of mnsol with evaluator defaults #21

Open
IAlibay opened this issue Sep 24, 2024 · 8 comments
Open
Labels
Milestone

Comments

@IAlibay
Copy link
Member

IAlibay commented Sep 24, 2024

I'm trying to replicate evaluator defaults (from the sage paper), through:

        topology = pack_box(
            molecules=[solvent_offmol],
            number_of_copies=[2000],
            solute=topology,
            tolerance=2.0 * angstrom,
            box_shape=UNIT_CUBE,
            center_solute=True,
            mass_density=0.95 * offunit.grams / offunit.milliliters,
        )

Here I'm packing benzene as the solute and then various solvent from mnsol.

~ 8 solvent types just don't work with these settings. The sage / evaluator papers seem to indicate that those systems were not a problem though. Am I missing something?

@IAlibay
Copy link
Member Author

IAlibay commented Sep 24, 2024

FAILED test_interchange_packmol.py::test_nonwater_solvent[CCc1ccccc1] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CC(C)c1ccccc1] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CCCCC] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CCCCCC] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CCCCCCC] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CCCCOCCCC] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CCCCOP(=O)(OCCCC)OCCCC] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CCCCCC(C)C] - openff.interchange.exceptions.PACKMOLRuntimeError
FAILED test_interchange_packmol.py::test_nonwater_solvent[CCCCCCCC] - openff.interchange.exceptions.PACKMOLRuntimeError

@IAlibay
Copy link
Member Author

IAlibay commented Sep 24, 2024

@mattwthompson Sorry to ping you here, but I'm trying to decide if this is an upstream (interchange) issue. Would you be able to briefly weigh in?

@mattwthompson
Copy link

On its face I can't narrow it down much more than to say I can't rule out it being something with how Interchange communicated with Packmol. The error case itself it pretty generic and not much debug info is provided. (The complaints are not properly routed through STDERR/STDOUT, it seems.) Better debug information here would be really helpful - maybe Interchange could simply copy the contents of the temporary directory into some new path in the user's space so they can dig into it themselves?

https://github.com/openforcefield/openff-interchange/blob/57dd53aca23c0a038b09c6d2a26911388a4e64d8/openff/interchange/components/_packmol.py#L716-L733

@IAlibay
Copy link
Member Author

IAlibay commented Sep 24, 2024

thing with how Interchange communicated with Packmol.

Are there significant differences between Interchange and Evaluator? From what I could see, the code was very similar, so I was hoping we could replicate the behaviour exactly (or at least the claimed behaviour from the paper).

@mattwthompson
Copy link

I agree with your assessment and am also surprised that you're seeing these failures. IIRC it the "what" should be conceptually identical but @Yoshanuikabundi made some fairly significant changes to the "how" - they made be able to chime in with more value.

I probably won't get to it until next week, but I'm drawn to improving the debugging output since ... well I hope the errors are pretty straightforward and buried in the logs that are currently trashed.

@IAlibay IAlibay added this to the v0.1.0 milestone Sep 24, 2024
@IAlibay
Copy link
Member Author

IAlibay commented Sep 25, 2024

I'll run some more tests, but I'm starting to wonder if the benzene solute is the issue (i.e. at least for a few cases using the actual solute from the mnsol set seems to do the trick).

@IAlibay
Copy link
Member Author

IAlibay commented Sep 25, 2024

Opened something upstream now that I have a "pure Interchange" test and some results: openforcefield/openff-interchange#1062

@mattwthompson
Copy link

A heads-up, and a bit of an apology: mass_density is going away in 0.4 and replaced with target_density. The 0.3.x API uses a mix of the two and this is a rare opportunity to fix that. (Evaluator uses mass_density but I think target_density is more appropriate since IIUC it might not always exactly be the resulting density and the goal is to get something close to a value, anyway.) The usage should be identical.

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

No branches or pull requests

2 participants