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

All Samples(139)  |  Call(98)  |  Derive(0)  |  Import(41)

src/p/y/python-ase-3.8.1/ase/calculators/dacapo.py   python-ase(Download)
 
        if self.loa is None:
            from ASE import Atom, ListOfAtoms
            numbers = atoms.get_atomic_numbers()
            positions = atoms.get_positions()
            magmoms = atoms.get_initial_magnetic_moments()
            self.loa = ListOfAtoms([Atom(Z=numbers[a],

src/p/y/python-ase-3.8.1/ase/old.py   python-ase(Download)
                self.atoms = None
        else:
            from ASE import Atom, ListOfAtoms
 
            numbers = atoms.get_atomic_numbers()
            positions = atoms.get_positions()
            magmoms = atoms.get_initial_magnetic_moments()
            self.atoms = ListOfAtoms(
                [Atom(Z=numbers[a], position=positions[a], magmom=magmoms[a])

src/m/a/matter-0.8-r960-20110308/matter/crystalIO/converters.py   matter(Download)
def listOfAtom2UnitCell(loa):
    """Utility to convert a ListOfAtom instance to a UnitCell instance."""
    import ASE.ListOfAtoms
    import ASE.Atom
 
def unitCell2ListOfAtom(uc, makeCartesian=False):
    """Utility to convert a UnitCell instance to a ASE ListOfAtom instance."""
    import ASE.ListOfAtoms
    import ASE.Atom
    loa = ASE.ListOfAtoms([],periodic=True) 
    loa.SetUnitCell(uc._cellvectors, fix=True)
    for site in uc:
        if makeCartesian:
            aseatom = ASE.Atom(site.getAtom().symbol, uc.fractionalToCartesian(site.getPosition().tolist()))
            aseatom = ASE.Atom(site.getAtom().symbol, uc.fractionalToCartesian(site.getPosition().tolist()))
        else:
            aseatom = ASE.Atom(site.getAtom().symbol, site.getPosition().tolist())
        loa.append(aseatom)
    return loa

src/m/a/matter-0.8-r960-20110308/graveyard/converters.py   matter(Download)
from Atom import *
import ASE.ListOfAtoms
import ASE.Atom
 
def listOfAtom2UnitCell(loa):
    loa.SetUnitCell(uc._cellvectors, fix=True)
    for site in uc:
        aseatom = ASE.Atom(site.getAtom().symbol, site.getPosition().tolist())
        loa.append(aseatom)