-
Notifications
You must be signed in to change notification settings - Fork 858
ENH: Change DSSP get_hbond_map to use capped_distance and PBC-aware distance calculations
#5182
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 12 commits
8f25085
a3f9ac4
617e7de
234ad87
93906df
f578aa9
d831ba2
86a045d
26c4ca8
2105bd6
e81d2e2
bdaadab
f0b2e23
4faa47c
4ccfeb6
dcf7f89
ebf118f
bfd812d
31db5cb
217575b
bb4f60a
fe63869
1694c1d
e3eb6ec
f00c5ef
c1fc511
8ed75ff
45b177d
ac40a3c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -399,7 +399,11 @@ def _get_coords(self) -> np.ndarray: | |
|
|
||
| def _single_frame(self): | ||
| coords = self._get_coords() | ||
| dssp = assign(coords, donor_mask=self._donor_mask) | ||
| dssp = assign( | ||
| coords, | ||
| donor_mask=self._donor_mask, | ||
| box=self._trajectory.ts.dimensions, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if dimensions are
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This shouldn't be done here, but rather when loading the PDB - there is an a bad edge case where you might actually just have that unit box.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed we do this already: https://github.com/MDAnalysis/mdanalysis/blob/develop/package/MDAnalysis/coordinates/PDB.py#L228-L231
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On further thought, I wouldn't be completely against this check - maybe a warning would be ok too if we don't want to be too strict
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On further thought, I wouldn't be completely against this check - maybe a warning would be ok too if we don't want to be too strict
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not 100% with how this should be handled. If I am raising a warning in _single_frame won't that warning be raised a bunch of times for every frame?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. def _single_frame(self):
coords = self._get_coords()
DEFAULT_BOX_DIMENSIONS = (1, 1, 1, 90, 90, 90)
box = self._trajectory.ts.dimensions
if box == DEFAULT_BOX_DIMENSIONS:
box = None
warnings.warn(
f"Default box dimensions {DEFAULT_BOX_DIMENSIONS} are treated as no box"
)
dssp = assign(
coords,
donor_mask=self._donor_mask,
box=self._trajectory.ts.dimensions,
)
self.results.dssp_ndarray.append(dssp)
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @BradyAJohnston - how about making that warning happen in init? The atomgroups are set there, so it would be best to do it when the class is created. |
||
| ) | ||
| self.results.dssp_ndarray.append(dssp) | ||
|
|
||
| def _conclude(self): | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.