Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_atomgroup.py   MDAnalysisTests(Download)
 
import MDAnalysis
from MDAnalysis.tests.datafiles import PSF, DCD, PDB_small, GRO, TRR, \
                                      merge_protein, merge_water, merge_ligand, \
                                      TRZ, TRZ_psf
    def setUp(self):
        self.universe = MDAnalysis.Universe(GRO, TRR)
        self.ag = self.universe.selectAtoms("bynum 12:42")
 
    @dec.slow

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_libxdrfile2.py   MDAnalysisTests(Download)
import numpy as np
from numpy.testing import *
from MDAnalysis.tests.datafiles import XTC, XTC_offsets, TRR, TRR_offsets
 
import MDAnalysis.coordinates.xdrfile.libxdrfile2 as xdr
    def test_numatoms(self):
        natoms = xdr.read_trr_natoms(TRR)
        assert_equal(natoms, 47681, "Number of atoms in TRR frame")
 
    def test_numframes_offsets(self): 
        numframes, offsets = xdr.read_trr_numframes(TRR)