Exemplo n.º 1
0
def load_Qlk(filepath, min_step=0, max_step='all', stride=1, ignore_steps=[]):

    data, cols, timesteps = XYZ.read_xyz_file(filename=filepath,
                                              num_data_cols=1,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps)
    cols = np.array(cols).astype(int)
    return (data, cols), timesteps
Exemplo n.º 2
0
def load_frc(filepath, min_step=0, max_step='all', stride=1, ignore_steps=[]):
    """
    Load diabatic forces
    """
    data, cols, timesteps = XYZ.read_xyz_file(filename=filepath,
                                              num_data_cols=3,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps)
    return data, cols, timesteps
Exemplo n.º 3
0
def load_pos(filepath, min_step=0, max_step='all', stride=1, ignore_steps=[]):
    """
    Load forces
    """
    data, cols, timesteps = XYZ.read_xyz_file(filename=filepath,
                                              num_data_cols=3,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps)
    return data / 0.52917720859, cols, timesteps  #/0.52917720859
Exemplo n.º 4
0
def load_QM_0(filepath, min_step=0, max_step='all', stride=1, ignore_steps=[]):
    """
    Will load a single traj QM_0 (the quantum momentum without the lk indices)
    """
    data, cols, timesteps = XYZ.read_xyz_file(filename=filepath,
                                              num_data_cols=3,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps)
    cols = np.array(cols).astype(int)
    return data, cols, timesteps
Exemplo n.º 5
0
def load_tintf(filepath,
               min_step=0,
               max_step='all',
               stride=1,
               ignore_steps=[]):
    data, cols, timesteps = XYZ.read_xyz_file(filename=filepath,
                                              num_data_cols=3,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps)
    data = Utils.reshape_by_state(data, cols)
    cols = cols[:, :, 0]
    return data, cols, timesteps
Exemplo n.º 6
0
def load_ham(filepath,
             num_basis,
             metadata,
             min_step=0,
             max_step='all',
             stride=1,
             ignore_steps=[]):
    data, cols, timesteps = XYZ.read_xyz_file(filepath,
                                              num_basis,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps,
                                              metadata=metadata)
    return data * 27000, cols, timesteps
Exemplo n.º 7
0
def load_ad_frc(filepath,
                min_step=0,
                max_step='all',
                stride=1,
                ignore_steps=[]):
    """
    Load adiabatic forces
    """
    data, cols, timesteps = XYZ.read_xyz_file(filename=filepath,
                                              num_data_cols=3,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps)
    data = Utils.reshape_by_state(data, cols)
    cols = cols[:, :, 0].shape
    return data, cols, timesteps
Exemplo n.º 8
0
def load_coeff(filepath,
               min_step=0,
               max_step='all',
               stride=1,
               ignore_steps=[],
               metadata=False):

    data, cols, timesteps = XYZ.read_xyz_file(filename=filepath,
                                              num_data_cols=2,
                                              min_step=min_step,
                                              max_step=max_step,
                                              stride=stride,
                                              ignore_steps=ignore_steps,
                                              metadata=metadata)

    pops = np.linalg.norm(data, axis=2)**2
    data = np.array([np.array([complex(*j) for j in i]) for i in data])
    return np.array(data), np.array(cols), np.array(timesteps), np.array(pops)