def to_oriented_geometry(geo): """ obtain an oriented x2z molecule object from a geometry """ _mg = pyx2z.MolecGeom() for sym, xyz in geo: _atm = pyx2z.Atom(sym) _atm[0], _atm[1], _atm[2] = xyz _mg.push_back(_atm) orient_mg = pyx2z.MolecOrient(_mg) return orient_mg
def from_geometry(geo): """ x2z molecule object from a geometry """ _mg = pyx2z.MolecGeom() for sym, xyz in geo: _atm = pyx2z.Atom(sym) _atm[0], _atm[1], _atm[2] = xyz _mg.push_back(_atm) _ps = pyx2z.PrimStruct(_mg) x2m = pyx2z.MolecStruct(_ps) return x2m
def from_geometry(geo, ts_bnds=()): """ x2z molecule object from a geometry """ _mg = pyx2z.MolecGeom() for sym, xyz in geo: _atm = pyx2z.Atom(sym) _atm[0], _atm[1], _atm[2] = xyz _mg.push_back(_atm) ts_bnds = list(map(list, ts_bnds)) x2m = pyx2z.MolecStruct(_mg, ts_bnds) return x2m
def to_oriented_geometry(geo): """ Generate an oriented x2z molecule object from a geometry. :param geo: molecular geometry :type geo: automol geometry data structure :rtype: x2z molecule object """ _mg = pyx2z.MolecGeom() for sym, xyz in geo: _atm = pyx2z.Atom(sym) _atm[0], _atm[1], _atm[2] = xyz _mg.push_back(_atm) orient_mg = pyx2z.MolecOrient(_mg) return orient_mg
def from_geometry(geo, ts_bnds=()): """ Generate an x2z molecule object from a geometry. :param geo: molecular geometry :type geo: automol geometry data structure :param ts_bnds: keys for the breaking/forming bonds in a TS :type ts_bnds: tuple(frozenset(int)) :rtype: x2z molecule object """ _mg = pyx2z.MolecGeom() for sym, xyz in geo: _atm = pyx2z.Atom(sym) _atm[0], _atm[1], _atm[2] = xyz _mg.push_back(_atm) ts_bnds = list(map(list, ts_bnds)) x2m = pyx2z.MolecStruct(_mg, ts_bnds) return x2m
def _pyx2z_molec_geom(mgeo): x2zmg = pyx2z.MolecGeom() for asymb, xyz in mgeo: x2zatm = _pyx2z_atom(asymb, xyz) x2zmg.push_back(x2zatm) return x2zmg
def test__MolecGeom_push_back(): """ test pyx2z.MolecGeom.push_back() """ m = pyx2z.MolecGeom() m.push_back(pyx2z.Atom('C')) assert m.size() == 1
def _molec_geom_obj(asymbs, coords): _mg = pyx2z.MolecGeom() for asymb, xyz in zip(asymbs, coords): _a = _atom_obj(asymb, xyz) _mg.push_back(_a) return _mg
def test__MolecGeom_size(): """ test pyx2z.MolecGeom.size() """ m = pyx2z.MolecGeom() assert m.size() == 0