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

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

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_coordinates.py   MDAnalysisTests(Download)
        u.trajectory[50]
        W.write(u.selectAtoms('all'))
        W.close()
        u2 = mda.Universe(self.outfile)
        assert_equal(u2.trajectory.numframes, 1, err_msg="The number of frames should be 1.")
        for ts in u.trajectory[-6:]:
            pdb.write(group)
        pdb.close()
        u2 = mda.Universe(self.outfile)
        assert_equal(len(u2.atoms), desired_group, err_msg="MultiPDBWriter trajectory written for an AtomGroup contains %d atoms, it should contain %d" % (len(u2.atoms), desired_group))
        for ts in u.trajectory[-2:]:
            W.write(u.atoms)
        W.close()
        u0 = mda.Universe(self.outfile)
        assert_equal(u0.trajectory.numframes, 2, err_msg="The number of frames should be 3.")
    def test_single_frame(self):
        u = MDAnalysis.Universe(PSF, CRD)
        W = MDAnalysis.Writer(self.outfile, u.atoms.numberOfAtoms())
        W.write(u.atoms)
        W.close()
        for ts in self.u.trajectory:
            wXTC.write(ts);
        wXTC.close()
 
    def tearDown(self):

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_atomgroup.py   MDAnalysisTests(Download)
    def test_write_Universe(self):
        U = self.universe
        W = MDAnalysis.Writer(self.outfile)
        W.write(U)
        W.close()