Skip to content

Commit

Permalink
extended benchmarks to cover range of atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushsuhane committed Aug 14, 2018
1 parent fb38bde commit 4af0b30
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions benchmarks/benchmarks/analysis/rdf.py
Expand Up @@ -17,21 +17,23 @@ class SimpleRdfBench(object):
"""

params = ([20,75,200],
[[0,5], [0,15], [0,20]])
[[0,5], [0,15], [0,20]],
[1, 100, 1000, 10000])

param_names = ['nbins',
'range_val']
'range_val',
'natoms']

def setup(self, nbins, range_val):
def setup(self, nbins, range_val, natoms):

self.sel_str = 'name OW'

self.u = MDAnalysis.Universe(TPR, XTC)

try:
self.sel = self.u.select_atoms(self.sel_str)[:200]
self.sel = self.u.select_atoms(self.sel_str)[:natoms]
except AttributeError:
self.sel = self.u.selectAtoms(self.sel_str)[:200]
self.sel = self.u.selectAtoms(self.sel_str)[:natoms]

# do not include initialization of the
# InterRDF object in the benchmark itself
Expand Down

0 comments on commit 4af0b30

Please sign in to comment.