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

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

src/m/d/MDAnalysis-0.8.1/examples/rmsfit_qcp.py   MDAnalysis(Download)
    remarks='RMS fitted trajectory to ref')
 
ref_atoms = ref.selectAtoms(selections['reference'])
traj_atoms = traj.selectAtoms(selections['target'])
natoms = traj_atoms.numberOfAtoms()

src/m/d/MDAnalysis-0.8.1/examples/make_MthK_tetramer.py   MDAnalysis(Download)
# need permissive to read HETATM (apparently...)
P = MDAnalysis.Universe('./data/3ldd.pdb', permissive=True)
filterK = P.selectAtoms('resname K and resid 1:4')
monomer = P.selectAtoms('protein')
axis = (filterK[0], filterK[-1])  # first to last filter ion

src/m/d/MDAnalysis-0.8.1/examples/backbone_dihedral.py   MDAnalysis(Download)
 
universe = Universe(PSF, DCD)
protein = universe.selectAtoms("protein")
 
numresidues = protein.numberOfResidues()

src/m/d/MDAnalysis-0.8.1/MDAnalysis/analysis/contacts.py   MDAnalysis(Download)
        r2 = MDAnalysis.Universe(topology, self.ref2)
 
        self.ca = self.u.selectAtoms('name CA')
        ca1 = r1.selectAtoms('name CA')
        ca2 = r2.selectAtoms('name CA')

src/m/d/MDAnalysis-0.8.1/MDAnalysis/visualization/streamlines_3D.py   MDAnalysis(Download)
def determine_container_limits(coordinate_file_path,trajectory_file_path,buffer_value):
    '''A function for the parent process which should take the input trajectory and calculate the limits of the container for the system and return these limits.'''
    universe_object = MDAnalysis.Universe(coordinate_file_path,trajectory_file_path)
    all_atom_selection = universe_object.selectAtoms('all') #select all particles
    all_atom_coordinate_array = all_atom_selection.coordinates()
def produce_coordinate_arrays_single_process(coordinate_file_path,trajectory_file_path,MDA_selection,start_frame,end_frame):
    '''To reduce memory footprint produce only a single MDA selection and get desired coordinate arrays; can later send these coordinate arrays to all child processes rather than having each child process open a trajectoryand waste memory.'''
    universe_object = MDAnalysis.Universe(coordinate_file_path,trajectory_file_path)
    relevant_particles = universe_object.selectAtoms(MDA_selection)
    #pull out coordinate arrays from desired frames:

src/m/d/MDAnalysis-0.8.1/MDAnalysis/analysis/helanal.py   MDAnalysis(Download)
                        end =  universe.atoms[-1].resid
                selection += " and resid %(start)d:%(end)d" % vars()
        ca = universe.selectAtoms(selection)
        print "Analysing %d/%d residues" % (ca.numberOfAtoms(), universe.atoms.numberOfResidues())
 

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_velocities_forces.py   MDAnalysisTests(Download)
    def testParse_velocities(self):
        #read the velocities from the GRO_velocity file and compare the AtomGroup and individual Atom velocities parsed with the reference values:
        u = MDAnalysis.Universe(GRO_velocity)
        all_atoms = u.selectAtoms('all')
        #check for read-in and unit conversion for .gro file velocities for the entire AtomGroup:

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_distances.py   MDAnalysisTests(Download)
    def setUp(self):
        self.universe = MDAnalysis.Universe(PSF, DCD)
        self.trajectory = self.universe.trajectory
        self.ca = self.universe.selectAtoms('name CA')
        # reasonable precision so that tests succeed on 32 and 64 bit machines
    def setUp(self):
        self.universe = MDAnalysis.Universe(PSF, DCD)
        self.trajectory = self.universe.trajectory
        self.ca = self.universe.selectAtoms('name CA')
        # see comments above on precision

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_coordinates.py   MDAnalysisTests(Download)
    def test_long_resSeq(self):
        #it checks that it can read a 5-digit resid
        self.universe = mda.Universe(XPDB_small, topology_format="XPDB")
        u = self.universe.selectAtoms('resid 1 or resid 10 or resid 100 or resid 1000 or resid 10000')
        assert_equal(u[4].resid, 10000, "can't read a five digit resid")
        """
        usol = mda.Universe(PDB_sub_sol, TRR_sub_sol)
        atoms = usol.selectAtoms("not resname SOL")
        self.pos = atoms.positions
        self.vel = atoms.velocities
    def setUp(self):
        self.universe = mda.Universe(TRZ_psf, TRZ)
        self.ag = self.universe.selectAtoms('name N')
        self.prec = 3
        fd, self.outfile = tempfile.mkstemp(suffix='.pdb')

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_atomgroup.py   MDAnalysisTests(Download)
    def setUp(self):
        self.universe = MDAnalysis.Universe(GRO, TRR)
        self.ag = self.universe.selectAtoms("bynum 12:42")
 
    @dec.slow