-
Notifications
You must be signed in to change notification settings - Fork 826
Use Results class for WaterBridge analysis #3287
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
Merged
Merged
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
7af3352
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 51624f3
Merge remote-tracking branch 'upstream/develop' into develop
RMeli fa7777e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 94ac6cc
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 80370af
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 36fa2ea
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 5111103
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ad0c149
Merge remote-tracking branch 'upstream/develop' into develop
RMeli def7c14
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2d693e3
Merge remote-tracking branch 'upstream/develop' into develop
RMeli f7d5bc6
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 64bcae5
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2e2561e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2184e2b
Merge remote-tracking branch 'upstream/develop' into develop
RMeli de7afcc
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ff4ed8d
Merge remote-tracking branch 'upstream/develop' into develop
RMeli c515e89
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 7d27138
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 3c35af0
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 22def6a
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 93413dc
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 8c5dc00
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ad1766e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 65e4d66
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 549c1a2
Merge remote-tracking branch 'upstream/develop' into develop
RMeli f527e62
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 4d5f7de
Merge remote-tracking branch 'upstream/develop' into develop
RMeli d7eda78
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ccd77e9
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 7546c3e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli af65b17
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 5944b83
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 640ce81
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 4d639f9
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 30effbd
Merge remote-tracking branch 'upstream/develop' into develop
RMeli a2951ee
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 51d1347
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 8023811
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 591bf39
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2e248fb
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 9009c82
Merge remote-tracking branch 'upstream/develop' into develop
RMeli a0b2a79
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 833aff3
Merge remote-tracking branch 'upstream/develop' into develop
RMeli d263d1f
Merge remote-tracking branch 'upstream/develop' into develop
RMeli a6a1976
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 888b1f9
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 13d6c5e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 9581ee4
Merge remote-tracking branch 'upstream/develop' into develop
RMeli d1ff4c4
Merge remote-tracking branch 'upstream/develop' into develop
RMeli dbe7750
Merge remote-tracking branch 'upstream/develop' into develop
RMeli c454e4f
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 2002570
Merge remote-tracking branch 'upstream/develop' into develop
RMeli b11c517
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 264b564
Merge remote-tracking branch 'upstream/develop' into develop
RMeli a5d7d68
Merge remote-tracking branch 'upstream/develop' into develop
RMeli d7902cf
Merge remote-tracking branch 'upstream/develop' into develop
RMeli fe8420e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 7330ca3
Merge remote-tracking branch 'upstream/develop' into develop
RMeli da33ac6
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 698b2b1
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 9192604
Merge remote-tracking branch 'upstream/develop' into develop
RMeli ca745a3
Merge branch 'develop' into upstream/develop
RMeli 206b547
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 58e79d2
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 54c2af9
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 488484c
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 0359fec
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 751d441
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 1ec8b20
Merge remote-tracking branch 'upstream/develop' into develop
RMeli 3f8c5a6
Adds basic GH Actions CI workflow (#3040)
IAlibay c57697e
Merge remote-tracking branch 'upstream/develop' into develop
RMeli d7bbd32
Merge branch 'MDAnalysis:develop' into develop
RMeli 27cfb8a
switch self._network to self.results.network
RMeli 17cd125
add back deprecated attribute as property
RMeli c381c18
update changelog
RMeli 04f53e3
deprecate network property
RMeli 7c31880
store table as result
RMeli 2229b58
cleanup
RMeli c944427
test results.table
RMeli 5e699ff
more documentation
RMeli 0ca8171
improve docs
RMeli b6bcd3c
Merge remote-tracking branch 'upstream/develop' into develop
RMeli b4c4c06
Merge branch 'develop' into waterbridge-results
RMeli 3ebb186
fix pep8
RMeli 3aacd79
fix pep8
RMeli 390c3a6
fix comments related to table
RMeli 5e8f3d5
fix comments related to _network
RMeli 6ac9528
fix comments on timeseries
RMeli 5ad1ab1
Update package/MDAnalysis/analysis/hydrogenbonds/wbridge_analysis.py
RMeli f88ea29
Merge branch 'develop' into waterbridge-results
RMeli 8ef725e
fix pep8
RMeli e650953
merge
RMeli a7ac42d
more pep8 fixes
RMeli fff2155
fix typo in documentation
RMeli b15ec83
Apply suggestions from code review: CHANGELOG
orbeckst 963f171
Merge branch 'develop' into waterbridge-results
orbeckst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,10 +87,10 @@ | |
| Since the waters connecting the two ends of the selections are by nature a | ||
| network. We provide a network representation of the water network. Water bridge | ||
| data are returned per frame, which is stored in | ||
| :attr:`WaterBridgeAnalysis.network`. Each frame is represented as a dictionary, | ||
| where the keys are the hydrogen bonds originating from selection 1 and the | ||
| values are new dictionaries representing the hydrogen bonds coming out of the | ||
| corresponding molecules making hydrogen bonds with selection 1. | ||
| :attr:`WaterBridgeAnalysis.results.network`. Each frame is represented as a | ||
| dictionary, where the keys are the hydrogen bonds originating from selection | ||
| 1 and the values are new dictionaries representing the hydrogen bonds coming | ||
| out of the corresponding molecules making hydrogen bonds with selection 1. | ||
|
|
||
| As for the hydrogen bonds which reach the selection 2, the values of the | ||
| corresponding keys are None. One example where selection 1 and selection 2 are | ||
|
|
@@ -122,14 +122,14 @@ | |
| -------------------- | ||
|
|
||
| For lower order water bridges, it might be desirable to represent the | ||
| connections as :attr:`WaterBridgeAnalysis.timeseries`. The results are returned | ||
| per frame and are a list of hydrogen bonds between the selection 1 or selection | ||
| 2 and the bridging waters. Due to the complexity of the higher order water | ||
| bridge and the fact that one hydrogen bond between two waters can appear in | ||
| both third and fourth order water bridge, the hydrogen bonds in the | ||
| :attr:`WaterBridgeAnalysis.timeseries` attribute are generated in a depth-first | ||
| search manner to avoid duplication. Example code of how | ||
| :attr:`WaterBridgeAnalysis.timeseries` is generated:: | ||
| connections as :attr:`WaterBridgeAnalysis.results.timeseries`. The results | ||
| are returned per frame and are a list of hydrogen bonds between the selection | ||
| 1 or selection 2 and the bridging waters. Due to the complexity of the higher | ||
| order water bridge and the fact that one hydrogen bond between two waters can | ||
| appear in both third and fourth order water bridge, the hydrogen bonds in the | ||
| :attr:`WaterBridgeAnalysis.results.timeseries` attribute are generated in a | ||
| depth-first search manner to avoid duplication. Example code of how | ||
| :attr:`WaterBridgeAnalysis.results.timeseries` is generated:: | ||
|
|
||
| def network2timeseries(network, timeseries): | ||
| '''Traverse the network in a depth-first fashion. | ||
|
|
@@ -307,7 +307,7 @@ class WaterBridgeAnalysis_OtherFF(WaterBridgeAnalysis): | |
| # 3 2 SOL HW2 | ||
| # 4 3 ASP OD1 | ||
| # 5 3 ASP OD2 | ||
| print(w.timeseries) | ||
| print(w.results.timeseries) | ||
|
|
||
| prints out :: | ||
|
|
||
|
|
@@ -675,9 +675,43 @@ def analysis(current, output, u, **kwargs): | |
| .. attribute:: timesteps | ||
|
|
||
| List of the times of each timestep. This can be used together with | ||
| :attr:`~WaterBridgeAnalysis.timeseries` to find the specific time point | ||
| of a water bridge existence. | ||
| :attr:`~WaterBridgeAnalysis.results.timeseries` to find the specific | ||
| time point of a water bridge existence. | ||
RMeli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. attribute:: results.network | ||
|
|
||
| Network representation of the water network. | ||
|
|
||
| .. versionadded:: 2.0.0 | ||
|
|
||
| .. attribute:: network | ||
|
|
||
| Alias to the :attr:`results.network` attribute. | ||
|
|
||
| .. deprecated:: 2.0.0 | ||
| Will be removed in MDAnalysis 3.0.0. Please use | ||
| :attr:`results.network` instead. | ||
|
|
||
| .. attribute:: table | ||
|
|
||
| .. deprecated:: 2.0.0 | ||
| Will be removed in MDAnalysis 3.0.0. Please generate | ||
| the table with :meth:`generate_table` instead. | ||
|
|
||
| .. attribute:: results.timeseries | ||
|
|
||
| List of hydrogen bonds between the selection 1 or selection 2 | ||
| and the bridging waters, for each frame. | ||
|
|
||
| .. versionadded:: 2.0.0 | ||
|
|
||
| .. attribute:: timeseries | ||
|
|
||
| Alias to the :attr:`results.timeseries` attribute. | ||
|
|
||
| .. deprecated:: 2.0.0 | ||
| Will be removed in MDAnalysis 3.0.0. Please use | ||
| :attr:`results.timeseries` instead. | ||
| """ | ||
| from collections import defaultdict | ||
| import logging | ||
|
|
@@ -698,10 +732,9 @@ class WaterBridgeAnalysis(AnalysisBase): | |
|
|
||
| The analysis of the trajectory is performed with the | ||
| :meth:`WaterBridgeAnalysis.run` method. The result is stored in | ||
| :attr:`WaterBridgeAnalysis.timeseries`. See | ||
| :attr:`WaterBridgeAnalysis.results.timeseries`. See | ||
| :meth:`~WaterBridgeAnalysis.run` for the format. | ||
|
|
||
|
|
||
| .. versionadded:: 0.17.0 | ||
|
|
||
| """ | ||
|
|
@@ -750,7 +783,7 @@ def __init__(self, universe, selection1='protein', | |
| universe. | ||
|
|
||
| The timeseries is accessible as the attribute | ||
| :attr:`WaterBridgeAnalysis.timeseries`. | ||
| :attr:`WaterBridgeAnalysis.results.timeseries`. | ||
|
|
||
| If no hydrogen bonds are detected or if the initial check fails, look | ||
| at the log output (enable with :func:`MDAnalysis.start_logging` and set | ||
|
|
@@ -921,7 +954,9 @@ def __init__(self, universe, selection1='protein', | |
| 'Invalid selection type {0!s}'.format( | ||
| self.selection1_type)) | ||
|
|
||
| self._network = [] # final result accessed as self.network | ||
| # final result accessed as self.results.network | ||
| self.results.network = [] | ||
| self.results.timeseries = None | ||
| self.timesteps = None # time for each frame | ||
|
|
||
| self._log_parameters() | ||
|
|
@@ -1216,7 +1251,7 @@ def _single_frame(self): | |
| if self.update_water_selection: | ||
| self._update_water_selection() | ||
| else: | ||
| self._network.append(defaultdict(dict)) | ||
| self.results.network.append(defaultdict(dict)) | ||
| return | ||
|
|
||
| selection_1 = [] | ||
|
|
@@ -1366,18 +1401,19 @@ def traverse_water_network(graph, node, end, route, maxdepth, result): | |
| traverse_water_network(water_pool, next_mol, selection_2, route[:], | ||
| self.order, result) | ||
|
|
||
| self._network.append(result['start']) | ||
| self.results.network.append(result['start']) | ||
|
|
||
| def _traverse_water_network(self, graph, current, analysis_func=None, | ||
| output=None, link_func=None, **kwargs): | ||
| ''' | ||
| This function recursively traverses the water network self._network and | ||
| finds the hydrogen bonds which connect the current atom to the next | ||
| atom. The newly found hydrogen bond will be appended to the hydrogen | ||
| bonds connecting the selection 1 to the current atom via link_func. | ||
| When selection 2 is reached, the full list of hydrogen bonds | ||
| connecting the selection 1 to selection 2 will be fed into | ||
| analysis_func, which will then modify the output in place. | ||
| This function recursively traverses the water network | ||
| self.results.network and finds the hydrogen bonds which connect the | ||
| current atom to the next atom. The newly found hydrogen bond will be | ||
| appended to the hydrogen bonds connecting the selection 1 to the | ||
| current atom via link_func. When selection 2 is reached, the full list | ||
| of hydrogen bonds connecting the selection 1 to selection 2 will be | ||
| fed into analysis_func, which will then modify the output in place. | ||
|
|
||
| :param graph: The connection network describes the connection between | ||
| the atoms in the water network. | ||
| :param current: The hydrogen bonds from selection 1 until now. | ||
|
|
@@ -1484,16 +1520,6 @@ def _generate_timeseries(self, output_format=None): | |
| To find an acceptor atom in :attr:`Universe.atoms` by | ||
| *index* one would use ``u.atoms[acceptor_index]``. | ||
|
|
||
| The :attr:`timeseries` is a managed attribute and it is generated | ||
| from the underlying data in :attr:`_network` every time the | ||
| attribute is accessed. It is therefore costly to call and if | ||
| :attr:`timeseries` is needed repeatedly it is recommended that you | ||
| assign to a variable:: | ||
|
|
||
| w = WaterBridgeAnalysis(u) | ||
| w.run() | ||
| timeseries = w.timeseries | ||
|
|
||
| .. versionchanged 0.20.0 | ||
| The :attr:`WaterBridgeAnalysis.timeseries` has been updated where | ||
| the donor and acceptor string has been changed to tuple | ||
|
|
@@ -1507,7 +1533,7 @@ def analysis(current, output, *args, **kwargs): | |
| output = current | ||
|
|
||
| timeseries = [] | ||
| for frame in self._network: | ||
| for frame in self.results.network: | ||
| new_frame = [] | ||
| self._traverse_water_network(frame, new_frame, | ||
| analysis_func=analysis, | ||
|
|
@@ -1518,37 +1544,13 @@ def analysis(current, output, *args, **kwargs): | |
| for entry in new_frame]) | ||
| return timeseries | ||
|
|
||
| timeseries = property(_generate_timeseries) | ||
|
|
||
| def _get_network(self): | ||
| r'''Network representation of the water network. | ||
|
|
||
| The output is generated per frame as is explained in | ||
| :ref:`wb_Analysis_Network`. Each hydrogen bond has a compact | ||
| representation of :: | ||
|
|
||
| [sele1_acceptor_idx, None, sele2_donor_idx, donor_heavy_idx, | ||
| distance, angle] | ||
|
|
||
| or :: | ||
|
|
||
| [sele1_donor_idx, donor_heavy_idx, sele1_acceptor_idx, None, | ||
| distance, angle] | ||
|
|
||
| The donor_heavy_idx is the heavy atom bonding to the proton and atoms | ||
| can be retrived from the universe:: | ||
|
|
||
| atom = u.atoms[idx] | ||
|
|
||
| .. versionadded:: 0.20.0 | ||
|
|
||
| ''' | ||
| return self._network | ||
|
|
||
| def set_network(self, network): | ||
| self._network = network | ||
|
|
||
| network = property(_get_network, set_network) | ||
| wmsg = ("The `set_network` method was deprecated in MDAnalysis 2.0.0 " | ||
| "and will be removed in MDAnalysis 3.0.0. Please use " | ||
| "`results.network` instead") | ||
| warnings.warn(wmsg, DeprecationWarning) | ||
| self.results.network = network | ||
|
|
||
| @classmethod | ||
| def _full_link(self, output, node): | ||
|
|
@@ -1622,10 +1624,10 @@ def count_by_type(self, analysis_func=None, **kwargs): | |
| analysis_func = self._count_by_type_analysis | ||
| output = 'combined' | ||
|
|
||
| if self._network: | ||
| length = len(self._network) | ||
| if self.results.network: | ||
| length = len(self.results.network) | ||
| result_dict = defaultdict(int) | ||
| for frame in self._network: | ||
| for frame in self.results.network: | ||
| frame_dict = defaultdict(int) | ||
| self._traverse_water_network(frame, [], | ||
| analysis_func=analysis_func, | ||
|
|
@@ -1672,9 +1674,9 @@ def count_by_time(self, analysis_func=None, **kwargs): | |
| """ | ||
| if analysis_func is None: | ||
| analysis_func = self._count_by_time_analysis | ||
| if self._network: | ||
| if self.results.network: | ||
| result = [] | ||
| for time, frame in zip(self.timesteps, self._network): | ||
| for time, frame in zip(self.timesteps, self.results.network): | ||
| result_dict = defaultdict(int) | ||
| self._traverse_water_network(frame, [], | ||
| analysis_func=analysis_func, | ||
|
|
@@ -1702,7 +1704,7 @@ def timesteps_by_type(self, analysis_func=None, **kwargs): | |
| """Frames during which each water bridges existed, sorted by each water | ||
| bridges. | ||
|
|
||
| Processes :attr:`WaterBridgeAnalysis._network` and returns a | ||
| Processes :attr:`WaterBridgeAnalysis.results.network` and returns a | ||
| :class:`list` containing atom indices, residue names, residue | ||
| numbers (from selection 1 and selection 2) and each timestep at which | ||
| the water bridge was detected. | ||
|
|
@@ -1721,13 +1723,13 @@ def timesteps_by_type(self, analysis_func=None, **kwargs): | |
| analysis_func = self._timesteps_by_type_analysis | ||
| output = 'combined' | ||
|
|
||
| if self._network: | ||
| if self.results.network: | ||
| result = defaultdict(list) | ||
| if self.timesteps is None: | ||
| timesteps = range(len(self._network)) | ||
| timesteps = range(len(self.results.network)) | ||
| else: | ||
| timesteps = self.timesteps | ||
| for time, frame in zip(timesteps, self._network): | ||
| for time, frame in zip(timesteps, self.results.network): | ||
| self._traverse_water_network(frame, [], | ||
| analysis_func=analysis_func, | ||
| output=result, | ||
|
|
@@ -1750,20 +1752,40 @@ def timesteps_by_type(self, analysis_func=None, **kwargs): | |
| def generate_table(self, output_format=None): | ||
| """Generate a normalised table of the results. | ||
|
|
||
|
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. add explanations Parameters
----------
output_format : {'sele1_sele2', 'donor_acceptor'}
The output format of the `table` can be changed a fashion similar to
:attr:`WaterBridgeAnalysis.results.timeseries` by changing the labels
of the columns of the participating atoms.
Returns
-------
table : numpy.recarray
A "tidy" table with one hydrogen bond per row, labeled according to
`output_format` and containing information of atom_1, atom_2, distance,
and angle.
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. If there's an explanation of the format of table then it could go here, at least in a short version. |
||
| The table is stored as a :class:`numpy.recarray` in the | ||
| attribute :attr:`~WaterBridgeAnalysis.table`. | ||
| Parameters | ||
| ---------- | ||
| output_format : {'sele1_sele2', 'donor_acceptor'} | ||
| The output format of the `table` can be changed a fashion similar | ||
| to :attr:`WaterBridgeAnalysis.results.timeseries` by changing the | ||
| labels of the columns of the participating atoms. | ||
|
|
||
| Returns | ||
| ------- | ||
| table : numpy.recarray | ||
| A "tidy" table with one hydrogen bond per row, labeled according to | ||
| `output_format` and containing information of atom_1, atom_2, | ||
| distance, and angle. | ||
|
|
||
| The output format of :attr:`~WaterBridgeAnalysis.table` can also be | ||
| changed using output_format in a fashion similar to | ||
| :attr:`WaterBridgeAnalysis.timeseries` | ||
| .. versionchanged:: 2.0.0 | ||
| Return the generated table (as well as storing it as :attr:`table`). | ||
|
|
||
| .. deprecated:: 2.0.0 | ||
| In release 3.0.0, :meth:`generate_table()` will _only_ return the | ||
| table and no longer store it in :attr:`table`. | ||
| """ | ||
| output_format = output_format or self.output_format | ||
| if self._network == []: | ||
| if self.results.network == []: | ||
| msg = "No data computed, do run() first." | ||
| warnings.warn(msg, category=MissingDataWarning) | ||
| logger.warning(msg) | ||
| return None | ||
| timeseries = self._generate_timeseries(output_format) | ||
|
|
||
| if self.results.timeseries is not None \ | ||
| and output_format == self.output_format: | ||
| timeseries = self.results.timeseries | ||
| else: | ||
| # Recompute timeseries with correct output format | ||
| timeseries = self._generate_timeseries(output_format) | ||
|
|
||
| num_records = np.sum([len(hframe) for hframe in timeseries]) | ||
| # build empty output table | ||
|
|
@@ -1805,3 +1827,24 @@ def generate_table(self, output_format=None): | |
| "WBridge: Stored results as table with %(num_records)d entries.", | ||
| vars()) | ||
| self.table = table | ||
|
|
||
| return table | ||
|
|
||
| def _conclude(self): | ||
| self.results.timeseries = self._generate_timeseries() | ||
|
|
||
| @property | ||
| def network(self): | ||
| wmsg = ("The `network` attribute was deprecated in MDAnalysis 2.0.0 " | ||
| "and will be removed in MDAnalysis 3.0.0. Please use " | ||
| "`results.network` instead") | ||
| warnings.warn(wmsg, DeprecationWarning) | ||
| return self.results.network | ||
|
|
||
| @property | ||
| def timeseries(self): | ||
| wmsg = ("The `timeseries` attribute was deprecated in MDAnalysis " | ||
| "2.0.0 and will be removed in MDAnalysis 3.0.0. Please use " | ||
| "`results.timeseries` instead") | ||
| warnings.warn(wmsg, DeprecationWarning) | ||
| return self.results.timeseries | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.