Skip to content

Commit 89e295b

Browse files
line ending fixes to all files
1 parent 83bc9a2 commit 89e295b

19 files changed

Lines changed: 50839 additions & 50839 deletions

File tree

benchmarks/benchmarks/topology.py

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
import MDAnalysis
2-
import numpy as np
3-
from MDAnalysis.guesser import DefaultGuesser
4-
5-
try:
6-
from MDAnalysis.exceptions import NoDataError
7-
from MDAnalysisTests.datafiles import GRO
8-
except:
9-
pass
10-
11-
12-
class TopologyGuessBench(object):
13-
"""Benchmarks for individual
14-
topology functions
15-
"""
16-
17-
params = (10, 100, 1000, 10000)
18-
param_names = ["num_atoms"]
19-
20-
def setup(self, num_atoms):
21-
self.u = MDAnalysis.Universe(GRO)
22-
self.ag = self.u.atoms[:num_atoms]
23-
self.vdwradii = {"H": 1.0, "C": 1.0, "N": 1.0, "O": 1.0, "DUMMY": 1.0}
24-
25-
def time_guessbonds(self, num_atoms):
26-
"""Benchmark for guessing bonds"""
27-
DefaultGuesser(None).guess_bonds(
28-
self.ag, self.ag.positions, box=self.ag.dimensions, vdwradii=self.vdwradii
29-
)
30-
31-
32-
class BondsBench(object):
33-
"""
34-
Benchmarks for getting bonds
35-
"""
36-
37-
params = (1000, 10000, 100000, 1000000)
38-
param_names = ["num_bonds"]
39-
40-
def setup(self, num_bonds):
41-
self.u = MDAnalysis.Universe.empty(2 * num_bonds)
42-
bonds = np.arange(2 * num_bonds).reshape(num_bonds, 2)
43-
self.u.add_bonds(bonds)
44-
45-
def time_bonds(self, num_bonds):
46-
"""Benchmark for calculating bonds"""
47-
self.u.bonds
1+
import MDAnalysis
2+
import numpy as np
3+
from MDAnalysis.guesser import DefaultGuesser
4+
5+
try:
6+
from MDAnalysis.exceptions import NoDataError
7+
from MDAnalysisTests.datafiles import GRO
8+
except:
9+
pass
10+
11+
12+
class TopologyGuessBench(object):
13+
"""Benchmarks for individual
14+
topology functions
15+
"""
16+
17+
params = (10, 100, 1000, 10000)
18+
param_names = ["num_atoms"]
19+
20+
def setup(self, num_atoms):
21+
self.u = MDAnalysis.Universe(GRO)
22+
self.ag = self.u.atoms[:num_atoms]
23+
self.vdwradii = {"H": 1.0, "C": 1.0, "N": 1.0, "O": 1.0, "DUMMY": 1.0}
24+
25+
def time_guessbonds(self, num_atoms):
26+
"""Benchmark for guessing bonds"""
27+
DefaultGuesser(None).guess_bonds(
28+
self.ag, self.ag.positions, box=self.ag.dimensions, vdwradii=self.vdwradii
29+
)
30+
31+
32+
class BondsBench(object):
33+
"""
34+
Benchmarks for getting bonds
35+
"""
36+
37+
params = (1000, 10000, 100000, 1000000)
38+
param_names = ["num_bonds"]
39+
40+
def setup(self, num_bonds):
41+
self.u = MDAnalysis.Universe.empty(2 * num_bonds)
42+
bonds = np.arange(2 * num_bonds).reshape(num_bonds, 2)
43+
self.u.add_bonds(bonds)
44+
45+
def time_bonds(self, num_bonds):
46+
"""Benchmark for calculating bonds"""
47+
self.u.bonds

mypy.ini

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
[mypy]
2-
ignore_missing_imports = True
3-
exclude = doc/sphinx/source/
4-
5-
6-
[mypy-MDAnalysis.analysis.*]
7-
ignore_errors = True
8-
9-
[mypy-MDAnalysis.auxiliary.*]
10-
ignore_errors = True
11-
12-
[mypy-MDAnalysis.converters.*]
13-
ignore_errors = True
14-
15-
[mypy-MDAnalysis.coordinates.*]
16-
ignore_errors = True
17-
18-
[mypy-MDAnalysis.core.*]
19-
ignore_errors = True
20-
21-
[mypy-MDAnalysis.selections.*]
22-
ignore_errors = True
23-
24-
[mypy-MDAnalysis.tests.*]
25-
ignore_errors = True
26-
27-
[mypy-MDAnalysis.topology.*]
28-
ignore_errors = True
29-
30-
[mypy-MDAnalysis.transformations.*]
31-
ignore_errors = True
32-
33-
[mypy-MDAnalysis.visualization.*]
34-
ignore_errors = True
35-
36-
[mypy-MDAnalysis.due]
37-
ignore_errors = True
38-
39-
[mypy-MDAnalysis.exceptions]
40-
ignore_errors = True
41-
42-
[mypy-MDAnalysis.units]
43-
ignore_errors = True
44-
45-
[mypy-MDAnalysis.version]
46-
ignore_errors = True
1+
[mypy]
2+
ignore_missing_imports = True
3+
exclude = doc/sphinx/source/
4+
5+
6+
[mypy-MDAnalysis.analysis.*]
7+
ignore_errors = True
8+
9+
[mypy-MDAnalysis.auxiliary.*]
10+
ignore_errors = True
11+
12+
[mypy-MDAnalysis.converters.*]
13+
ignore_errors = True
14+
15+
[mypy-MDAnalysis.coordinates.*]
16+
ignore_errors = True
17+
18+
[mypy-MDAnalysis.core.*]
19+
ignore_errors = True
20+
21+
[mypy-MDAnalysis.selections.*]
22+
ignore_errors = True
23+
24+
[mypy-MDAnalysis.tests.*]
25+
ignore_errors = True
26+
27+
[mypy-MDAnalysis.topology.*]
28+
ignore_errors = True
29+
30+
[mypy-MDAnalysis.transformations.*]
31+
ignore_errors = True
32+
33+
[mypy-MDAnalysis.visualization.*]
34+
ignore_errors = True
35+
36+
[mypy-MDAnalysis.due]
37+
ignore_errors = True
38+
39+
[mypy-MDAnalysis.exceptions]
40+
ignore_errors = True
41+
42+
[mypy-MDAnalysis.units]
43+
ignore_errors = True
44+
45+
[mypy-MDAnalysis.version]
46+
ignore_errors = True

mypy_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
mypy==0.960
1+
mypy==0.960
22
typing_extensions

0 commit comments

Comments
 (0)