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

All Samples(170)  |  Call(111)  |  Derive(18)  |  Import(41)

src/m/a/matter-0.8-r960-20110308/matter/obsolete/UnitCell.py   matter(Download)
import numpy as np
import numpy.linalg as la
from Atom import Atom
from matter.crystalUtils.MonkhorstPack import MonkhorstPack
 
        for siteId in self._siteIds.keys():
            newsite = Site(self._siteIds[siteId].getPosition(),
                           Atom(Z=self._siteIds[siteId].getAtom().Z))
            new.addSite(newsite, siteId = siteId)
        return new
def uc_test1():
    print "\n*** test1 ***"
    uc = UnitCell( )
    at1=Atom(symbol='Fe', mass=57) ; pos1=(0.0,0.0,0.0)
    at2=Atom(symbol='Al') ; pos2=(0.5,0.5,0.5)
def uc_test2():
    print "\n*** test2 ***"
    cellvectors = [ (1,0,0), (0,1,0), (0,0,1) ]
    uc = create_unitcell( cellvectors, [Atom(symbol='Fe'), Atom(symbol='Al')], [ (0,0,0), (0.5,0.5,0.5) ] )
    print uc

src/b/i/bioEuler-HEAD/src/OLD/PDBReader.py   bioEuler(Download)
from lxml import etree
 
from Atom import Atom
from AtomList import AtomList
from Protein import Protein
    def _create_Atom(self, pdb_atom, res_number):
        label = pdb_atom.get_name()
        symbol = label[0]
        coords = array([float(coord) for coord in pdb_atom.get_coord()])
        atom = Atom(symbol, label, coords, res_number)
        coords = [float(elem.xpath("./PDBx:Cartn_x/text()")[0]), float(elem.xpath("./PDBx:Cartn_y/text()")[0]), float(elem.xpath("./PDBx:Cartn_z/text()")[0])]
        #print "x = " + elem.xpath("./PDBx:Cartn_x/text()")[0] + " y = " + elem.xpath("./PDBx:Cartn_y/text()")[0] + " z = " + elem.xpath("./PDBx:Cartn_z/text()")[0]
        return Atom(symbol, label, coords)
 
    def get_protein_from_XML(self):

src/m/a/matter-0.8-r960-20110308/matter/Molecule.py   matter(Download)
 
import numpy
from Atom import Atom
from Lattice import Lattice
 
        """
        kwargs['lattice'] = self.lattice
        a = Atom(*args, **kwargs)
        list.append(self, a)
        self._uncache('labels')
        """
        self._uncache('labels')
        adup = copy and Atom(a) or a
        adup.lattice = self.lattice
        list.append(self, adup)
        """
        self._uncache('labels')
        adup = copy and Atom(a) or a
        adup.lattice = self.lattice
        list.insert(self, idx, adup)
        """
        self._uncache('labels')
        if copy:    adups = [Atom(a) for a in atoms]
        else:       adups = atoms
        for a in adups: a.lattice = self.lattice

src/m/a/matter-0.8-r960-20110308/matter/ChemicalEntity.py   matter(Download)
 
import numpy
from Atom import Atom
from Lattice import Lattice
 
        """
        kwargs['lattice'] = self.lattice
        a = Atom(*args, **kwargs)
        list.append(self, a)
        self._uncache('labels')
        """
        self._uncache('labels')
        adup = copy and Atom(a) or a
        adup.lattice = self.lattice
        list.append(self, adup)
        """
        self._uncache('labels')
        adup = copy and Atom(a) or a
        adup.lattice = self.lattice
        list.insert(self, idx, adup)
        """
        self._uncache('labels')
        if copy:    adups = [Atom(a) for a in atoms]
        else:       adups = atoms
        for a in adups: a.lattice = self.lattice

src/m/a/matter-0.8-r960-20110308/matter/UnitCell.py   matter(Download)
import numpy as np
import numpy.linalg as la
from Atom import Atom
 
 
    def addAtom(self, atom):
        xyz = self.calcFractionalCoordsInCell(atom.xyz_cartn)
        symbol = atom.symbol
        atom = Atom(symbol, xyz)
        self.atoms.append(atom)
    def test2(self):
        uc = UnitCell()
 
        uc.addAtom(Atom('H', (0,0,0.1)))
 

src/m/a/matter-0.8-r960-20110308/matter/Structure.py   matter(Download)
 
import numpy
from Atom import Atom
from Lattice import Lattice
 
        """
        kwargs['lattice'] = self.lattice
        a = Atom(*args, **kwargs)
        list.append(self, a)
        self._uncache('labels')
        """
        self._uncache('labels')
        adup = copy and Atom(a) or a
        adup.lattice = self.lattice
        list.append(self, adup)
        """
        self._uncache('labels')
        adup = copy and Atom(a) or a
        adup.lattice = self.lattice
        list.insert(self, idx, adup)
        """
        self._uncache('labels')
        if copy:    adups = [Atom(a) for a in atoms]
        else:       adups = atoms
        for a in adups: a.lattice = self.lattice

src/m/a/matter-0.8-r960-20110308/matter/orm/UnitCell.py   matter(Download)
 
# dsaw.model inventory
from Atom import Atom
class Inventory(InvBase):
 

src/m/a/matter-0.8-r960-20110308/matter/orm/Structure.py   matter(Download)
 
# data object
from Atom import Atom
from Lattice import Lattice
from UnitCell import UnitCell

src/m/a/matter-0.8-r960-20110308/matter/crystalIO/testCif.py   matter(Download)
__doc__ = """Test conversion of CIF file into a UnitCell instance."""
 
from Translator import Translator
from UnitCell import UnitCell
from Atom import Atom
    X = item[0]
    pos = [float(x) for x in item[1:4]]
    uc.addAtom(Atom(symbol=X), pos, "")
    # Note: this only works if elements' symbols in CIF are "Ab" format