Ejemplo n.º 1
0
def formula(gra):
    """ graph  => formula
    """
    gra = automol.graph.explicit(gra)
    syms = automol.graph.atom_symbols(gra).values()
    fml = _util.formula(syms)
    return fml
Ejemplo n.º 2
0
def to_formula(rdm):
    """ formula from an rdkit molecule object
    """
    rdm = _rd_chem.AddHs(rdm)
    atms = rdm.GetAtoms()
    syms = [rda.GetSymbol() for rda in atms]
    fml = _util.formula(syms)
    return fml
Ejemplo n.º 3
0
def formula(zma):
    """ Generate a stoichiometric formula dictionary from a Z-Matrix.

        :param zma: Z-Matrix
        :type zma: automol Z-Matrix data structure
        :type: dict[str: int]
    """

    syms = symbols(zma)
    fml = _util.formula(syms)

    return fml
Ejemplo n.º 4
0
def formula(geo):
    """ Generate a stoichiometric formula dictionary from a molecular geometry.

        :param geo: molecular geometry
        :type geo: automol geometry data structure
        :type: dict[str: int]
    """

    symbs = symbols(geo)
    fml = _util.formula(symbs)

    return fml
Ejemplo n.º 5
0
def formula(gra):
    """ Generate a stoichiometric formula dictionary from a molecular graph.

        :param gra: molecular graph
        :type gra: automol graph data structure
        :type: dict[str: int]
    """

    gra = explicit(gra)
    syms = atom_symbols(gra).values()
    fml = _util.formula(syms)

    return fml
Ejemplo n.º 6
0
def to_formula(rdm):
    """ Generate a molecular formula dictionary from an RDKit molecule object.

        :param rdm: molecule object
        :type rdm: RDKit molecule object
        :rtype: dict[str:int]
    """

    rdm = _rd_chem.AddHs(rdm)
    atms = rdm.GetAtoms()
    syms = [rda.GetSymbol() for rda in atms]
    fml = _util.formula(syms)

    return fml
Ejemplo n.º 7
0
def formula(geo):
    """ geometry => formula
    """
    syms = automol.geom.symbols(geo)
    fml = _util.formula(syms)
    return fml
Ejemplo n.º 8
0
def formula(zma):
    """ z-matrix => formula
    """
    syms = automol.zmatrix.symbols(zma)
    fml = _util.formula(syms)
    return fml