Add a method to create Compounds from coxeter shape objects - #1353
Open
chrisjonesBSU wants to merge 16 commits into
Open
Add a method to create Compounds from coxeter shape objects#1353chrisjonesBSU wants to merge 16 commits into
chrisjonesBSU wants to merge 16 commits into
Conversation
updates: - [github.com/astral-sh/ruff-pre-commit: v0.15.21 → v0.15.22](astral-sh/ruff-pre-commit@v0.15.21...v0.15.22)
…te-config [pre-commit.ci] pre-commit autoupdate
np.object was removed in NumPy 1.24, but the project requires numpy>=2.0 (environment.yml). Calling PeriodicKDTree.query_ball_point() with an array of multiple points therefore raises AttributeError. Use the builtin object dtype, which is NumPy's documented replacement.
Popen was called with shell=True and an f-string interpolating a temp-file
path (f"{PACKMOL} < {packmol_inp.name}"). This is a shell-injection
anti-pattern and breaks whenever the temp path contains spaces or shell
metacharacters (e.g. a TMPDIR with spaces).
Pass the executable as an argument list and feed the input file directly as
stdin instead of relying on a shell redirection. Behavior is unchanged (the
shell was only used for the '<' redirection), and PACKMOL is a resolved path
from shutil.which().
…-removed-numpy Fix np.object AttributeError in PeriodicKDTree.query_ball_point
* Update readthedocs build os to supported version * update python to mambaforge-latest * docs build os to 24.04
…hell-injection Avoid shell=True when invoking PACKMOL
Re-add FattyAcid recipe for main branch
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1353 +/- ##
===========================================
- Coverage 82.37% 82.14% -0.24%
===========================================
Files 64 64
Lines 6977 6999 +22
===========================================
+ Hits 5747 5749 +2
- Misses 1230 1250 +20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
|
We might think about adding a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new loader method to
conversion.pythat generates an mBuild compound from a Coxeter shape object. Coxeter comes from the Glotzer lab, and is a great tool that generates vertices and edges of tons of different kinds of geometries ranging in complexity, which are converted to particles and bonds to create an mBuild Compound. Coxeter shapes provide relative coordinates, so the loader provides a scaling option to shift everything close enough to a target coordinate unit (which for mBuild is always nanometers). It also lets you set an element for the particles if desired, but this can be left blank so the particles are treated as generic beads.Note: We might have to wait for a new release before we can use the coxeter conda-package as a dependency. I opened an issue asking about a new release timeline.
I still need to add unit tests
PR Checklist