-
Notifications
You must be signed in to change notification settings - Fork 81
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
Remove deprecated formats, update reader and writer backends #1191
Conversation
The failing tests are in Also, if I change Here is a gist showing what I'm trying to say here. |
To organize my thoughts, the four use cases are:
As @chrisjonesBSU has in his gist, 1-3 gives a layered compound with 1 child, which then itself has 8 children particles. Method 4 gives a flat compound with 8 children. We should agree on preferred behavior. I actually think the current output from Method 4 is what I would expect for all compounds made from xyz files. Do you agree or disagree @chrisjonesBSU? My reasoning is since there is no hierarchy present in an xyz file, I would expect a consistent flat compound. Infer_hierarchy therefore should not make a difference either way, as what happens in the current mBuild methods. In order to obtain this behavior, I think we could either tweak the An optional workaround is to just set the molecule/residue information when reading in xyz files such that the to_mbuild can be kept the same, but gives us the preferred outcome. Since that info is not really part of the xyz file, I think manually setting it in the xyz reader in a generalized manner is a way we get consistent results. It would need to be set such that we get the flat compound when |
Still need to remove |
…ms tests, that is being tested for in GMSO test_xyz.py
There seems to be something funny going on with pytest and how it is caching things.
Another way to test this is to disable cacheing
Then all 182 tests in |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1191 +/- ##
==========================================
- Coverage 87.35% 85.93% -1.43%
==========================================
Files 62 53 -9
Lines 6588 4898 -1690
==========================================
- Hits 5755 4209 -1546
+ Misses 833 689 -144 ☔ View full report in Codecov by Sentry. |
…e formats that require typed systems
…r loading xys into test_compound
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@CalCraven we previously discussed about still having support for saving |
The windows 3.12 test should pass once conda-forge/gmso-feedstock#27 is merged and available. The windows 3.12 run is sort of unique, it has to use the latest version of GMSO because of a PR fixed related to importing hoomd, but the latest GMSO doesn't support python 3.12. Some of the older versions must not have pinned a maximum python version, which is why the other 3.12 tests are passing. |
@CalCraven This should be ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more minor comments actually, mostly about some doc strings.
mbuild/compound.py
Outdated
**kwargs | ||
Depending on the file extension these will be passed to either | ||
`write_gsd`, `write_hoomdxml`, `write_lammpsdata`, `write_mcf`, or | ||
`write_gsd`, `write_lammpsdata`, `write_mcf`, or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to pass the following conversion mapping in the documentation. Then we just link to
Line 936 in e42cd01
def save( |
`{GMSO: {".gro", ".gsd". ".data", ".xyz", ".mcf", ".top"},
ParmEd: {".mol2", ".pdb", ".prmtop", ".cif", ".crd"},
PyBel:{".sdf"}}`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. This should be done, along with the other suggestions.
PR Summary:
This PR gets things started to remove the deprecated items talked about in #1187
Also, this will update the reader/writer backends to use GMSO where ever possible.
PR Checklist