예제 #1
0
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
예제 #2
0
def test__MolecOrient_size():
    """ test pyx2z.MolecOrient.size()
    """
    asymbs = ['O', 'H', 'H']
    coords = [(-1.2516025626, 2.3683550357, 0.0000000000),
              (-0.2816025626, 2.3683550357, 0.0000000000),
              (-1.5749323743, 3.2380324089, -0.2828764736)]
    m = _molec_geom_obj(asymbs, coords)
    o = pyx2z.MolecOrient(m)
    assert o.size() == 3
예제 #3
0
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