Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ c08cb797fd1a2cb45bc0b9e4522cabb15d1f36bd
b8fe34b73c9df9330c1608229b2f8cddc6e275b4
#4885
263bbe65047e535fbad981852ad9c7327826f93d
#5446
a6566f8a86eb3a74521ce7fc3658527224a02fd3
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ensure all line endings for text files are LF (UNIX, Python default) and not CRLF (Windows/DOS default)
* text=auto eol=lf

# ignore all data files from testsuite/MDAnalysisTests/data/
testsuite/MDAnalysisTests/data/* -text
testsuite/MDAnalysisTests/data/**/* -text
94 changes: 47 additions & 47 deletions benchmarks/benchmarks/topology.py
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
import MDAnalysis
import numpy as np
from MDAnalysis.guesser import DefaultGuesser
try:
from MDAnalysis.exceptions import NoDataError
from MDAnalysisTests.datafiles import GRO
except:
pass
class TopologyGuessBench(object):
"""Benchmarks for individual
topology functions
"""
params = (10, 100, 1000, 10000)
param_names = ["num_atoms"]
def setup(self, num_atoms):
self.u = MDAnalysis.Universe(GRO)
self.ag = self.u.atoms[:num_atoms]
self.vdwradii = {"H": 1.0, "C": 1.0, "N": 1.0, "O": 1.0, "DUMMY": 1.0}
def time_guessbonds(self, num_atoms):
"""Benchmark for guessing bonds"""
DefaultGuesser(None).guess_bonds(
self.ag, self.ag.positions, box=self.ag.dimensions, vdwradii=self.vdwradii
)
class BondsBench(object):
"""
Benchmarks for getting bonds
"""
params = (1000, 10000, 100000, 1000000)
param_names = ["num_bonds"]
def setup(self, num_bonds):
self.u = MDAnalysis.Universe.empty(2 * num_bonds)
bonds = np.arange(2 * num_bonds).reshape(num_bonds, 2)
self.u.add_bonds(bonds)
def time_bonds(self, num_bonds):
"""Benchmark for calculating bonds"""
self.u.bonds
import MDAnalysis
import numpy as np
from MDAnalysis.guesser import DefaultGuesser

try:
from MDAnalysis.exceptions import NoDataError
from MDAnalysisTests.datafiles import GRO
except:
pass


class TopologyGuessBench(object):
"""Benchmarks for individual
topology functions
"""

params = (10, 100, 1000, 10000)
param_names = ["num_atoms"]

def setup(self, num_atoms):
self.u = MDAnalysis.Universe(GRO)
self.ag = self.u.atoms[:num_atoms]
self.vdwradii = {"H": 1.0, "C": 1.0, "N": 1.0, "O": 1.0, "DUMMY": 1.0}

def time_guessbonds(self, num_atoms):
"""Benchmark for guessing bonds"""
DefaultGuesser(None).guess_bonds(
self.ag, self.ag.positions, box=self.ag.dimensions, vdwradii=self.vdwradii
)


class BondsBench(object):
"""
Benchmarks for getting bonds
"""

params = (1000, 10000, 100000, 1000000)
param_names = ["num_bonds"]

def setup(self, num_bonds):
self.u = MDAnalysis.Universe.empty(2 * num_bonds)
bonds = np.arange(2 * num_bonds).reshape(num_bonds, 2)
self.u.add_bonds(bonds)

def time_bonds(self, num_bonds):
"""Benchmark for calculating bonds"""
self.u.bonds
92 changes: 46 additions & 46 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
[mypy]
ignore_missing_imports = True
exclude = doc/sphinx/source/
[mypy-MDAnalysis.analysis.*]
ignore_errors = True
[mypy-MDAnalysis.auxiliary.*]
ignore_errors = True
[mypy-MDAnalysis.converters.*]
ignore_errors = True
[mypy-MDAnalysis.coordinates.*]
ignore_errors = True
[mypy-MDAnalysis.core.*]
ignore_errors = True
[mypy-MDAnalysis.selections.*]
ignore_errors = True
[mypy-MDAnalysis.tests.*]
ignore_errors = True
[mypy-MDAnalysis.topology.*]
ignore_errors = True
[mypy-MDAnalysis.transformations.*]
ignore_errors = True
[mypy-MDAnalysis.visualization.*]
ignore_errors = True
[mypy-MDAnalysis.due]
ignore_errors = True
[mypy-MDAnalysis.exceptions]
ignore_errors = True
[mypy-MDAnalysis.units]
ignore_errors = True
[mypy-MDAnalysis.version]
ignore_errors = True
[mypy]
ignore_missing_imports = True
exclude = doc/sphinx/source/


[mypy-MDAnalysis.analysis.*]
ignore_errors = True

[mypy-MDAnalysis.auxiliary.*]
ignore_errors = True

[mypy-MDAnalysis.converters.*]
ignore_errors = True

[mypy-MDAnalysis.coordinates.*]
ignore_errors = True

[mypy-MDAnalysis.core.*]
ignore_errors = True

[mypy-MDAnalysis.selections.*]
ignore_errors = True

[mypy-MDAnalysis.tests.*]
ignore_errors = True

[mypy-MDAnalysis.topology.*]
ignore_errors = True

[mypy-MDAnalysis.transformations.*]
ignore_errors = True

[mypy-MDAnalysis.visualization.*]
ignore_errors = True

[mypy-MDAnalysis.due]
ignore_errors = True

[mypy-MDAnalysis.exceptions]
ignore_errors = True

[mypy-MDAnalysis.units]
ignore_errors = True

[mypy-MDAnalysis.version]
ignore_errors = True
2 changes: 1 addition & 1 deletion mypy_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mypy==0.960
mypy==0.960
typing_extensions
2 changes: 2 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ The rules for this file:
* 2.11.0

Fixes
* Added `.gitattributes` to enforce LF (\n) as line endings and renormalized
existing files to conform (Issue #5315, PR #5446)
* Fix FileLock tests for XTC and TRR: lock file is no longer removed (#5382)
* InterRDF now correctly returns bins in parallel (PR #5344)
* `Merge()` no longer raises a TypeError on Universes that have a `cmaps`
Expand Down
Loading
Loading