Skip to content

Commit

Permalink
fixed benchmark for fragment timing
Browse files Browse the repository at this point in the history
(useful for MDAnalysis#2376)
  • Loading branch information
orbeckst committed Nov 14, 2019
1 parent e110108 commit 4b82988
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions benchmarks/benchmarks/ag_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import numpy as np

try:
from MDAnalysisTests.datafiles import (GRO, TPR, XTC,
PSF, DCD,
from MDAnalysisTests.datafiles import (GRO, TPR, XTC,
PSF, DCD,
TRZ_psf, TRZ)
from MDAnalysis.exceptions import NoDataError
except:
Expand Down Expand Up @@ -190,7 +190,7 @@ def time_translate(self, num_atoms):
coordinates.
"""
self.ag.translate([0,0.5,1])

def time_union(self, num_atoms):
"""Benchmark union operation
on atomgroups.
Expand All @@ -202,7 +202,7 @@ def time_wrap(self, num_atoms):
atomgroup with default params.
"""
self.ag.wrap()



class AtomGroupAttrsBench(object):
Expand Down Expand Up @@ -232,7 +232,7 @@ def time_atoms(self, num_atoms):

def time_dihedral(self, num_atoms):
"""Benchmark Dihedral object
creation time. Requires ag of
creation time. Requires ag of
size 4.
"""
self.ag[:4].dihedral
Expand Down Expand Up @@ -336,5 +336,5 @@ class FragmentFinding(object):
def setup(self, universe):
self.u = MDAnalysis.Universe(*universe)

def test_find_fragments(self, universe):
def time_find_fragments(self, universe):
frags = self.u.atoms.fragments

0 comments on commit 4b82988

Please sign in to comment.