Example #1
0
def rename(zma, name_dct):
    """ set coordinate names for the z-matrix
    """
    syms = symbols(zma)
    key_mat = key_matrix(zma)
    val_mat = value_matrix(zma)

    vma = vmat.rename(zma, name_dct)
    name_mat = vmat.name_matrix(vma)

    zma = automol.create.zmat.from_data(syms, key_mat, val_mat, name_mat)
    return zma
Example #2
0
def rename(zma, name_dct):
    """ Rename a subset of the coordinates of a Z-Matrix.

        :param zma: Z-Matrix
        :type zma: automol Z-Matrix data structure
        :param name_dct: mapping from old coordinate names to new ones
        :type name_dct: dict[str: str]
        :rtype: automol Z-Matrix data strucutre
    """

    symbs = symbols(zma)
    key_mat = key_matrix(zma)
    val_mat = value_matrix(zma)

    vma = vmat.rename(zma, name_dct)
    name_mat = vmat.name_matrix(vma)

    zma = from_data(symbs, key_mat, val_mat, name_mat)

    return zma