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

All Samples(20)  |  Call(12)  |  Derive(0)  |  Import(8)

src/m/d/MDAnalysis-0.8.1/MDAnalysis/core/AtomGroup.py   MDAnalysis(Download)
 
import MDAnalysis
from MDAnalysis import SelectionError, NoDataError, SelectionWarning
import util
import copy
            return numpy.array(self.universe.trajectory.ts._velocities[self.number],dtype=numpy.float32)
        except AttributeError:
            raise NoDataError("Timestep does not contain velocities")
 
    def centroid(self):
            return numpy.array(ts._velocities[self.indices()], copy=copy, dtype=dtype)
        except AttributeError:
            raise NoDataError("Timestep does not contain velocities")
 
    def set_velocities(self, v, ts=None):
            ts._velocities[self.indices(), :] = v
        except AttributeError:
            raise NoDataError("Timestep does not contain velocities")
 
    velocities = property(get_velocities, set_velocities, doc="""\
            return numpy.array(ts._forces[self.indices()], copy=copy, dtype=dtype)
        except AttributeError:
            raise NoDataError("Timestep does not contain forces")
 
    def set_forces(self, forces, ts=None):

src/m/d/MDAnalysis-0.8.1/MDAnalysis/coordinates/xdrfile/TRR.py   MDAnalysis(Download)
import core
import libxdrfile2
from MDAnalysis import NoDataError
 
class Timestep(core.Timestep):
    def _pos(self):
        if self.has_x:
            return self._tpos
        else:
            raise NoDataError(self._nodataerr % ("coordinates","coordinates","coordinate","coordinates","has_x"))
    def _velocities(self):
        if self.has_v:
            return self._tvelocities
        else:
            raise NoDataError(self._nodataerr % ("velocities","velocities","velocity","velocities","has_v"))
    def _forces(self):
        if self.has_f:
            return self._tforces
        else:
            raise NoDataError(self._nodataerr % ("forces","forces","force","forces","has_f"))

src/m/d/MDAnalysis-0.8.1/MDAnalysis/coordinates/DCD.py   MDAnalysis(Download)
 
import MDAnalysis.core
from MDAnalysis import NoDataError
 
class DCDWriter(base.Writer):
        if ts is None:
            if not hasattr(self, "ts"):
                raise NoDataError("DCDWriter: no coordinate data to write to trajectory file")
            else:
                ts = self.ts
        start, stop, skip = self._check_slice_indices(start, stop, skip)
        if len(asel) == 0:
            raise NoDataError("Timeseries requires at least one atom to analyze")
        if len(format) != 3 and format not in ['afc', 'acf', 'caf', 'cfa', 'fac', 'fca']:
            raise ValueError("Invalid timeseries format")

src/m/d/MDAnalysis-0.8.1/MDAnalysis/analysis/rms.py   MDAnalysis(Download)
import MDAnalysis
import MDAnalysis.core.qcprot as qcp
from MDAnalysis import SelectionError, NoDataError
from MDAnalysis.core.log import ProgressMeter
from MDAnalysis.core.util import asiterable
        if filename is not None:
            if self.rmsd is None:
                raise NoDataError("rmsd has not been calculated yet")
            numpy.savetxt(filename, self.rmsd)
            logger.info("Wrote RMSD timeseries  to file %r", filename)

src/m/d/MDAnalysis-0.8.1/MDAnalysis/coordinates/PDB.py   MDAnalysis(Download)
from MDAnalysis.core.AtomGroup import Universe, AtomGroup
 
from MDAnalysis import NoDataError
 
import warnings
        if ts is None:
            if not hasattr(self, "ts"):
                raise NoDataError("PBDWriter: no coordinate data to write to trajectory file")
            else:
                ts = self.ts

src/m/d/MDAnalysis-0.8.1/MDAnalysis/analysis/density.py   MDAnalysis(Download)
import MDAnalysis
from MDAnalysis.core.util import fixedwidth_bins, iterable, asiterable
from MDAnalysis import NoDataError, MissingDataWarning
 
import logging

src/m/d/MDAnalysis-0.8.1/MDAnalysis/analysis/hbonds.py   MDAnalysis(Download)
import numpy
 
from MDAnalysis import MissingDataWarning, NoDataError
from MDAnalysis.core.AtomGroup import AtomGroup
import MDAnalysis.KDTree.NeighborSearch as NS

src/m/d/MDAnalysisTests-0.8.1/MDAnalysisTests/test_atomgroup.py   MDAnalysisTests(Download)
import MDAnalysis.core.AtomGroup
from MDAnalysis.core.AtomGroup import Atom, AtomGroup
from MDAnalysis import NoDataError
 
import numpy