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

rework handle_trajectories to use replicas #539

Merged
merged 4 commits into from
Aug 29, 2023

Conversation

richardjgowers
Copy link
Contributor

functions now expect a replica id, can trivially convert from state id to replica id

trajectory_from_multistate can now either do constant-state or constant-replica trajectories

Developers certificate of origin

functions now expect a replica id, can trivially convert from state id to replica id

trajectory_from_multistate can now either do constant-state or constant-replica trajectories
@codecov
Copy link

codecov bot commented Aug 29, 2023

Codecov Report

Patch coverage: 90.81% and project coverage change: -1.09% ⚠️

Comparison is base (e797d52) 92.07% compared to head (cf4c929) 90.98%.
Report is 67 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
- Coverage   92.07%   90.98%   -1.09%     
==========================================
  Files         113      114       +1     
  Lines        6938     6876      -62     
==========================================
- Hits         6388     6256     -132     
- Misses        550      620      +70     
Files Changed Coverage Δ
openfe/protocols/openmm_rfe/_rfe_utils/relative.py 81.09% <ø> (-1.87%) ⬇️
openfe/protocols/openmm_rfe/equil_rfe_methods.py 93.53% <ø> (-0.50%) ⬇️
openfe/utils/handle_trajectories.py 0.00% <0.00%> (ø)
openfecli/commands/gather.py 85.25% <90.19%> (-6.79%) ⬇️
openfe/protocols/openmm_rfe/equil_rfe_settings.py 100.00% <100.00%> (ø)
openfe/setup/__init__.py 100.00% <100.00%> (ø)
...ork_planner/relative_alchemical_network_planner.py 97.59% <100.00%> (-0.03%) ⬇️
openfe/setup/atom_mapping/lomap_scorers.py 100.00% <100.00%> (ø)
openfe/setup/ligand_network_planning.py 100.00% <100.00%> (ø)
...tests/protocols/test_openmm_equil_rfe_protocols.py 89.30% <100.00%> (-1.16%) ⬇️
... and 11 more

... and 1 file with indirect coverage changes

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

typing fixes
Copy link
Member

@IAlibay IAlibay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two small things, otherwise lgtm!

@@ -42,7 +42,7 @@ def _state_positions_at_frame(dataset: nc.Dataset, state_num: int,
----------
dataset : netCDF4.Dataset
Dataset containing the MultiState information.
state_num : int
replica_id : int
State index to extract positions for.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shoudl this be changed to replica index?

@@ -33,7 +32,8 @@ def _effective_replica(dataset: nc.Dataset, state_num: int,
return np.where(state_distribution == state_num)[0][0]


def _state_positions_at_frame(dataset: nc.Dataset, state_num: int,
def _state_positions_at_frame(dataset: nc.Dataset,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replica_positions_at_frame?

@richardjgowers richardjgowers merged commit d694d85 into main Aug 29, 2023
5 of 7 checks passed
@richardjgowers richardjgowers deleted the handle_trajectories_replicas branch August 29, 2023 16:41
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.

2 participants