geometric/ic_tools.py
def write_displacements(coords, M, IC, dirname, verbose):
    """
    Write coordinate files containing animations
    of displacements along the internal coordinates.

    Parameters
    ----------
    coords : np.ndarray
        Flat array of Cartesian coordinates in a.u.
    M : Molecule
        Molecule object allowing writing of files
    IC : InternalCoordinates
        The internal coordinate system
    dirname : str
        Directory name for files to be written
    verbose : int
        Print diagnostic messages
    """
    for i in range(len(IC.Internals)):
        x = []
        for j in np.linspace(-0.3, 0.3, 7):
            if j != 0:
                dq = np.zeros(len(IC.Internals))
                dq[i] = j
                x1 = IC.newCartesian(coords, dq, verbose=verbose)
            else:
                x1 = coords.copy()
            rms_displacement, max_displacement = calc_drms_dmax(x1, coords, align=False)
            x.append(x1.reshape(-1,3) * bohr2ang)
            logger.info("%i %.1f Displacement (rms/max) = %.5f / %.5f %s\n" % (i, j, rms_displacement, max_displacement, "(Bork)" if IC.bork else "(Good)"))
        M.xyzs = x
        M.write("%s/ic_%03i.xyz" % (dirname, i))

    Write coordinate files containing animations
    of displacements along the internal coordinates.

    Parameters
    ----------
    coords : np.ndarray
        Flat array of Cartesian coordinates in a.u.
    M : Molecule
        Molecule object allowing writing of files
    IC : InternalCoordinates
        The internal coordinate system
    dirname : str
        Directory name for files to be written
    verbose : int
        Print diagnostic messages
    
Write coordinate files containing animations
of displacements along the internal coordinates.

Parameters

coords : np.ndarray
Flat array of Cartesian coordinates in a.u.
M : Molecule
Molecule object allowing writing of files
IC : InternalCoordinates
The internal coordinate system
dirname : str
Directory name for files to be written
verbose : int
Print diagnostic messages
Write coordinate files containing animations of displacements along the internal coordinates . Parameters coords : np . ndarray Flat array of Cartesian coordinates in a . u . M : Molecule Molecule object allowing writing of files IC : InternalCoordinates The internal coordinate system dirname : str Directory name for files to be written verbose : int Print diagnostic messages
def write_displacements(coords, M, IC, dirname, verbose):
    for i in range(len(IC.Internals)):
        x = []
        for j in np.linspace(-0.3, 0.3, 7):
            if j != 0:
                dq = np.zeros(len(IC.Internals))
                dq[i] = j
                x1 = IC.newCartesian(coords, dq, verbose=verbose)
            else:
                x1 = coords.copy()
            rms_displacement, max_displacement = calc_drms_dmax(x1, coords, align=False)
            x.append(x1.reshape(-1,3) * bohr2ang)
            logger.info("%i %.1f Displacement (rms/max) = %.5f / %.5f %s\n" % (i, j, rms_displacement, max_displacement, "(Bork)" if IC.bork else "(Good)"))
        M.xyzs = x
        M.write("%s/ic_%03i.xyz" % (dirname, i))
def write_displacements ( coords , M , IC , dirname , verbose ) : for i in range ( len ( IC . Internals ) ) : x = [ ] for j in np . linspace ( - 0.3 , 0.3 , 7 ) : if j != 0 : dq = np . zeros ( len ( IC . Internals ) ) dq [ i ] = j x1 = IC . newCartesian ( coords , dq , verbose = verbose ) else : x1 = coords . copy ( ) rms_displacement , max_displacement = calc_drms_dmax ( x1 , coords , align = False ) x . append ( x1 . reshape ( - 1 , 3 ) * bohr2ang ) logger . info ( "%i %.1f Displacement (rms/max) = %.5f / %.5f %s\n" % ( i , j , rms_displacement , max_displacement , "(Bork)" if IC . bork else "(Good)" ) ) M . xyzs = x M . write ( "%s/ic_%03i.xyz" % ( dirname , i ) )
Write coordinate files containing animations
of displacements along the internal coordinates.
Write coordinate files containing animations of displacements along the internal coordinates .
"""
    Write coordinate files containing animations
    of displacements along the internal coordinates.

    Parameters
    ----------
    coords : np.ndarray
        Flat array of Cartesian coordinates in a.u.
    M : Molecule
        Molecule object allowing writing of files
    IC : InternalCoordinates
        The internal coordinate system
    dirname : str
        Directory name for files to be written
    verbose : int
        Print diagnostic messages
    """
coords
M
IC
dirname
verbose