Skip to content

Add bounds to sample_candidates in Constraints classes. #1315

Open
chrisjonesBSU wants to merge 6 commits into
mosdef-hub:developfrom
chrisjonesBSU:volume-sample-regions
Open

Add bounds to sample_candidates in Constraints classes. #1315
chrisjonesBSU wants to merge 6 commits into
mosdef-hub:developfrom
chrisjonesBSU:volume-sample-regions

Conversation

@chrisjonesBSU

Copy link
Copy Markdown
Contributor

PR Summary:

This adds bounds parameters to volume constraints sample_candidates method. This lets you choose random starting points within a certain region, which adds more flexibility for different initialization.

This also changes volume.py to constraints.py to be more consistent, and it moves the file from mbuild/utils to path

PR Checklist


  • Includes appropriate unit test(s)
  • Appropriate docstring(s) are added/updated
  • Code is (approximately) PEP8 compliant
  • Issue(s) raised/addressed?
    …e file to match class names

@chrisjonesBSU chrisjonesBSU added the 2.0 Additions for mBuild 2.0 label Mar 20, 2026
@codecov

codecov Bot commented Mar 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.85%. Comparing base (a84903f) to head (3f70e77).
⚠️ Report is 86 commits behind head on develop.

Files with missing lines Patch % Lines
mbuild/path/path.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1315   +/-   ##
========================================
  Coverage    78.85%   78.85%           
========================================
  Files           59       59           
  Lines         6284     6286    +2     
========================================
+ Hits          4955     4957    +2     
  Misses        1329     1329           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@chrisjonesBSU

Copy link
Copy Markdown
Contributor Author

Leaving this open for now as the region_minx and region_maxs behavior wasn't added in #1314 but we can do that in a separate PR, or merge it here.

@chrisjonesBSU

Copy link
Copy Markdown
Contributor Author

I'm going to work on adding this in a separate PR rather than resolving the conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.0 Additions for mBuild 2.0 do not merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant