Skip to content

Commit b6966bc

Browse files
committed
merge conflicts
2 parents 44f3340 + b05a84b commit b6966bc

27 files changed

Lines changed: 806 additions & 141 deletions

File tree

.github/workflows/gh-ci.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ jobs:
5555
full-deps: false
5656
codecov: true
5757
cython: "cython<3.1"
58+
- name: ubuntu_arm
59+
os: ubuntu-24.04-arm
60+
python-version: "3.13"
61+
full-deps: false
62+
codecov: false
63+
cython: "cython>3.1"
5864
- name: numpy_min
5965
os: ubuntu-latest
6066
python-version: "3.11"

.github/workflows/greetings.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/rtd.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

benchmarks/benchmarks/ag_methods.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,17 @@ def time_wrap_compound(self, num_atoms):
195195
"""
196196
self.ag.wrap(compound="residues")
197197

198+
def time_asunique_no_sorted(self, num_atoms):
199+
"""Benchmark asunique() operation on
200+
atomgroup without sorting"""
201+
self.ag.asunique(sorted=False)
202+
203+
def time_asunique_sorted(self, num_atoms):
204+
"""Benchmark asunique() operation on
205+
atomgroup with sorting"""
206+
self.ag.asunique(sorted=True)
207+
208+
198209
class AtomGroupAttrsBench(object):
199210
"""Benchmarks for the various MDAnalysis
200211
atomgroup attributes.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import MDAnalysis as mda
2+
from MDAnalysis.analysis import contacts
3+
from MDAnalysisTests.datafiles import PSF, DCD
4+
5+
6+
class ContactsBench(object):
7+
"""
8+
Benchmarks for MDAnalysis.analysis.contacts.Contacts
9+
"""
10+
11+
# Parameter combinations tested in the benchmark.
12+
# radius : cutoff distance used to define a contact
13+
# method : algorithm used to compute contacts
14+
# pbc : whether periodic boundary conditions are applied
15+
params = [
16+
[4.5, 6.0],
17+
["hard_cut", "soft_cut", "radius_cut"],
18+
[True, False],
19+
]
20+
21+
# Names corresponding to the parameters above
22+
param_names = ["radius", "method", "pbc"]
23+
24+
def setup(self, radius, method, pbc):
25+
"""
26+
Prepare the Universe and contact analysis object
27+
for benchmarking.
28+
"""
29+
30+
# Load test trajectory
31+
self.u = mda.Universe(PSF, DCD)
32+
33+
# Define atom selections
34+
self.sel1 = "protein"
35+
self.sel2 = "name CA"
36+
37+
# Create atom groups from the selections
38+
g1 = self.u.select_atoms(self.sel1)
39+
g2 = self.u.select_atoms(self.sel2)
40+
41+
# Initialize the Contacts analysis
42+
# select : atom selection strings
43+
# refgroup : reference atom groups used for contacts
44+
# radius : contact cutoff distance
45+
# method : contact calculation method
46+
# pbc : periodic boundary conditions flag
47+
self.analysis = contacts.Contacts(
48+
self.u,
49+
select=(self.sel1, self.sel2),
50+
refgroup=(g1, g2),
51+
radius=radius,
52+
method=method,
53+
pbc=pbc,
54+
)
55+
56+
def time_contacts_run(self, radius, method, pbc):
57+
"""
58+
Benchmark execution of Contacts.run()
59+
over the full trajectory.
60+
"""
61+
62+
self.analysis.run()
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import MDAnalysis as mda
2+
3+
try:
4+
from MDAnalysisTests.datafiles import TPR, XTC, PDB_janin
5+
except:
6+
pass
7+
8+
try:
9+
from MDAnalysis.analysis.dssp import DSSP
10+
from MDAnalysis.analysis.dssp.pydssp_numpy import assign
11+
except:
12+
pass
13+
14+
15+
class DsspBench(object):
16+
"""Benchmarks for MDAnalysis.analysis.dssp.DSSP over a trajectory."""
17+
18+
params = ([1, 5, 10], [True, False])
19+
param_names = ["n_frames", "guess_hydrogens"]
20+
21+
def setup(self, n_frames, guess_hydrogens):
22+
self.u = mda.Universe(TPR, XTC)
23+
self.dssp = DSSP(self.u, guess_hydrogens=guess_hydrogens)
24+
self.n_frames = n_frames
25+
26+
def time_dssp_run(self, n_frames, guess_hydrogens):
27+
"""Benchmark DSSP.run() over n_frames of a trajectory."""
28+
self.dssp.run(stop=self.n_frames)
29+
30+
31+
class DsspAssignBench(object):
32+
"""Benchmarks for the core DSSP assign() function on a single frame.
33+
34+
Uses PDB_janin as a large test system for number of residues
35+
"""
36+
37+
params = [50, 100, 214, 500]
38+
param_names = ["n_residues"]
39+
40+
def setup(self, n_residues):
41+
self.u = mda.Universe(PDB_janin)
42+
dssp = DSSP(self.u)
43+
coords = dssp._get_coords()
44+
self.coords = coords[:n_residues]
45+
46+
def time_assign(self, n_residues):
47+
"""Benchmark single-frame assign() call."""
48+
assign(self.coords)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
Benchmark for HydrogenBondAnalysis
3+
"""
4+
5+
try:
6+
from MDAnalysis.analysis.hydrogenbonds.hbond_analysis import HydrogenBondAnalysis as HBA
7+
from MDAnalysisTests.datafiles import waterPSF , waterDCD
8+
except ImportError:
9+
pass
10+
11+
import MDAnalysis
12+
13+
class HydrogenBondAnalysisBenchmark:
14+
"""
15+
It tests performance of hbond.run() across different
16+
number of frames using waterPSF/waterDCD test files.
17+
"""
18+
19+
unit = "ms"
20+
timeout = 60.0
21+
params = [2, 5, 10]
22+
param_names = ["n_frames"]
23+
24+
25+
def setup(self, n_frames):
26+
u = MDAnalysis.Universe(waterPSF, waterDCD)
27+
self.hbonds = HBA(universe= u)
28+
29+
def time_run(self, n_frames):
30+
self.hbonds.run(stop = n_frames)
31+

package/AUTHORS

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ Chronological list of authors
192192
- Mingyi Xue
193193
- Meghan Osato
194194
- Anirvinya G
195-
- Rishabh Shukla
195+
- Rishabh Shukla
196196
- Manish Kumar
197197
- Aditi Tripathi
198198
- Sukeerti T
@@ -247,22 +247,22 @@ Chronological list of authors
247247
- Jia-Xin Zhu
248248
- Tanish Yelgoe
249249
2025
250-
- Joshua Raphael Uy
250+
- Joshua Raphael Uy
251251
- Namir Oues
252-
- Pavel Buslaev
252+
- Pavel Buslaev
253253
- Lexi Xu
254-
- BHM-Bob G
254+
- BHM-Bob G
255255
- Yu-Yuan (Stuart) Yang
256256
- James Rowe
257-
- Debasish Mohanty
257+
- Debasish Mohanty
258258
- Abdulrahman Elbanna
259259
- Tulga-Erdene Sodjargal
260260
- Gareth Elliott
261261
- Marc Schuh
262262
- Sirsha Ganguly
263263
- Amruthesh Thirumalaiswamy
264264
- Ch Zhang
265-
- Raúl Lois-Cuns
265+
- Raúl Lois-Cuns
266266
- Pranay Pelapkar
267267
- Shreejan Dolai
268268
- Tanisha Dubey
@@ -277,6 +277,9 @@ Chronological list of authors
277277
- Ayush Agarwal
278278
- Parth Uppal
279279
- Olivier Languin--Cattoën
280+
- Amarendra Mohan
281+
- Shubham Mittal
282+
- Charity Grey
280283
- Jonathan Berg
281284

282285
External code
@@ -325,4 +328,4 @@ Logo
325328

326329
The MDAnalysis 'Atom' logo was designed by Christian Beckstein; it is
327330
Copyright (c) 2011 Christian Beckstein and made available under a
328-
Creative Commons Attribution-NoDerivs 3.0 Unported License.
331+
Creative Commons Attribution-NoDerivs 3.0 Unported License.

package/CHANGELOG

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,26 @@ The rules for this file:
1717
??/??/?? IAlibay, orbeckst, marinegor, tylerjereddy, ljwoods2, marinegor,
1818
spyke7, talagayev, tanii1125, BradyAJohnston, hejamu, jeremyleung521,
1919
harshitgajjela-droid, kunjsinha, aygarwal, jauy123, Dreamstick9,
20-
ollyfutur, jberg
20+
ollyfutur, Amarendra22, charity-g, ParthUppal523, jberg5
2121

2222
* 2.11.0
2323

2424
Fixes
25+
* `MDAnalysis.analysis.nucleicacids.WatsonCrickDist`, `MinorPairDist`,
26+
and `MajorPairDist` now match residue names against the full resname
27+
instead of only the first character, fixing incorrect behaviour with
28+
multi-character names such as CHARMM ``DG``/``DA`` or ``GUA``/``ADE``
29+
(Issue #5360). Note: users relying on the previous truncation
30+
behaviour must now pass explicit residue names via the ``g_name``,
31+
``a_name``, etc. keyword arguments.
32+
* `MDAnalysis.analysis.atomicdistances.AtomicDistances` results are now
33+
consistent with expected `analysis` documentation data type = Results
34+
(Issue #4819, PR #5347)
35+
Note: This fix is backwards-incompatible.
36+
* DSSP now correctly handles periodic boundary conditions in hydrogen bond
37+
detection; previously, hydrogen bonds across periodic boundaries were
38+
missed (PR #5182)
39+
* Fix mixed-case atom types in guess_bonds (Issue #5342, PR #5343)
2540
* Fixes msd for non-linear frames, when non_linear is not explicitly
2641
provided (Issue #5100, PR #5254)
2742
* Fixes TypeError with np.int64 indexing in GSD Reader (Issue #5224)
@@ -45,13 +60,25 @@ Fixes
4560
DSSP by porting upstream PyDSSP 0.9.1 fix (Issue #4913)
4661

4762
Enhancements
63+
* Enables parallelization for analysis.atomicdistances.AtomicDistances
64+
(Issue #4662, PR #4822)
65+
* DSSP uses ``capped_distance`` and ``calc_bonds`` for faster distance
66+
calculations and supports ``backend`` selection (e.g. ``"distopia"``)
67+
(PR #5182)
68+
* Added ASV benchmark for `MDAnalysis.analysis.contacts` (PR #5291)
69+
* Improved performance of inverse index mapping in AtomGroup using an optimized
70+
Cython implementation in lib._cutils.inverse_int_index()
71+
(Issue #3387, PR #5252)
72+
* Added documentation for all keyword in select_atoms() and
73+
selections.rst (Issue #5317, PR #5325)
74+
* Added HydrogenBondAnalysis benchmark for performance tracking (PR #5309)
4875
* Added `select=None` in `analysis.rms.RMSD` to perform no selection on
4976
the input `atomgroup` and `reference` (Issue #5300, PR #5296)
5077
* MOL2Parser now reads unit cell dimensions from @<TRIPOS>CRYSIN records (Issue #3341)
5178
* Reduces duplication of code in _apply() function (Issue #5247, PR #5294)
5279
* Added new top-level `MDAnalysis.fetch` module (PR #4943)
5380
* Added new function `MDAnalysis.fetch.from_PDB` to download structure files from wwPDB
54-
using `pooch` as optional dependency (Issue #4907, PR #4943)
81+
using `pooch` as optional dependency (Issue #4907, PR #4943)
5582
* Added benchmarks for package.MDAnalysis.analysis.msd.EinsteinMSD (PR #5277)
5683
* Improved PCA performance by computing covariance matrix via batched BLAS matrix
5784
multiply instead of per-frame outer product accumulation, and using

0 commit comments

Comments
 (0)