Skip to content

Crosslinking and Energy Minimize improvements#1324

Open
CalCraven wants to merge 6 commits into
mosdef-hub:developfrom
CalCraven:crosslink-improve
Open

Crosslinking and Energy Minimize improvements#1324
CalCraven wants to merge 6 commits into
mosdef-hub:developfrom
CalCraven:crosslink-improve

Conversation

@CalCraven
Copy link
Copy Markdown
Contributor

PR Summary:

Update crosslinking path functions
Added Uutilities for:

  • crosslink across pbc
  • analyze bond and angle distributions
  • energy minimize with harmonic bonds and angles over pbc
  • plot rdf

PR Checklist


  • Includes appropriate unit test(s)
  • Appropriate docstring(s) are added/updated
  • Code is (approximately) PEP8 compliant
  • Issue(s) raised/addressed?

CalCraven added 2 commits May 6, 2026 17:53
…unctions such as angle and bond distributions, as well as freud rdf
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

❌ Patch coverage is 76.22951% with 232 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.16%. Comparing base (c4f194c) to head (3a0d3a4).
⚠️ Report is 12 commits behind head on develop.

Files with missing lines Patch % Lines
mbuild/path/crosslink.py 89.17% 85 Missing ⚠️
mbuild/path/build.py 24.24% 75 Missing ⚠️
mbuild/simulation.py 20.22% 71 Missing ⚠️
mbuild/path/points.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1324      +/-   ##
===========================================
+ Coverage    77.03%   77.16%   +0.12%     
===========================================
  Files           62       64       +2     
  Lines         6736     7816    +1080     
===========================================
+ Hits          5189     6031     +842     
- Misses        1547     1785     +238     

☔ View full report in Codecov by Sentry.
📢 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.

CalCraven added 2 commits May 15, 2026 11:28
…rate multi-site crosslinks. Adjust some of the args in relax_path, add utility functions that helps to optimally place new sites into current path
Comment thread mbuild/path/build.py
Comment on lines +600 to +615
return crosslink2(
self,
crosslinker=crosslinker,
bead_name=bead_name,
backbone_name=backbone_name,
radius=radius,
excluded_bond_depth=excluded_bond_depth,
n_connection_sites=n_connection_sites,
volume_constraint=volume_constraint,
initial_point=initial_point,
seed=seed,
chunk_size=chunk_size,
run_on_gpu=run_on_gpu,
n_rotation_samples=n_rotation_samples,
overlap_radius=overlap_radius,
)
Comment thread mbuild/path/crosslink.py
from mbuild.path.path_utils import calculate_sq_distances


class CrosslinkerGeometry(Path):
Comment thread mbuild/path/crosslink.py
# Center positions at origin
if len(self.coordinates) > 0:
centroid = np.mean(self.coordinates, axis=0)
self.coordinates = (self.coordinates - centroid).astype(np.float32)
Comment thread mbuild/path/build.py
Path
self (modified in place).
"""
from mbuild.path.crosslink import replace_sites
Comment thread mbuild/path/build.py
overlap_radius=None,
):
"""Add a crosslink to this path. See module-level crosslink() for details."""
from mbuild.path.crosslink import crosslink as crosslink2
Comment thread mbuild/path/crosslink.py
import numpy as np

from mbuild.exceptions import PathConvergenceError
from mbuild.path.build import Path
Comment thread mbuild/path/crosslink.py
if n <= 1:
return True, [0] if n == 1 else []

abs_tol = bond_length * tolerance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants