coordfile='snf_h2o/coord') res.read() # use the normal modes in the following (no localization) modes = res.modes # Define the grid ngrid = 16 amp = 14 grid = vib.Grid(res.mol, modes) grid.generate_grids(ngrid, amp) # Read in anharmonic 1-mode potentials v1 = vib.Potential(grid, order=1) v1.read_np(os.path.join('potentials', 'V1_g16.npy')) # Read in anharmonic 1-mode dipole moments dm1 = vib.Dipole(grid) dm1.read_np(os.path.join('potentials', 'Dm1_g16.npy')) # Read in anharmonic 2-mode potentials v2 = vib.Potential(grid, order=2) v2.read_np(os.path.join('potentials', 'V2_g16.npy')) # Read in anharmonic 2-mode dipole moments dm2 = vib.Dipole(grid, order=2)
def __init__(self, dirname): f = open(dirname + '/grid_params') lines = f.readlines() f.close() whichmodes = None localized = None if os.path.isfile(dirname + '/whichmodes'): whichmodes = [] f = open(dirname + '/whichmodes') lines2 = f.readlines() f.close for l in lines2: for el in l.split(): whichmodes.append(int(el)) grid_params = lines[0].split() self.ngrid = int(grid_params[0]) self.amp = int(grid_params[1]) res = VibTools.SNFResults(outname=dirname + '/snf.out', restartname=dirname + '/restart', coordfile=dirname + '/coord') res.read() self.freqs = res.modes.freqs self.ints = res.get_ir_intensity() modes = res.modes if whichmodes is not None: self.freqs = res.modes.freqs[whichmodes] self.ints = res.get_ir_intensity( modes=res.modes.get_subset(whichmodes)) modes = res.modes.get_subset(whichmodes) self.grid = vib.Grid(res.mol, modes) self.grid.generate_grids(self.ngrid, self.amp) self.v1 = vib.Potential(self.grid, 1) self.v1.read_np(dirname + '/v1.npy') self.v1_harm = vib.Potential(self.grid, 1) self.v1_harm.generate_harmonic() self.dm1_harm = vib.Dipole(self.grid, 1) self.dm1_harm.generate_harmonic(res) self.v2 = vib.Potential(self.grid, 2) self.v2.read_np(dirname + '/v2.npy') self.dm1 = vib.Dipole(self.grid, 1) self.dm1.read_np(dirname + '/dm1.npy') self.dm2 = vib.Dipole(self.grid, 2) self.dm2.read_np(dirname + '/dm2.npy') self.diagonal_eigv = np.load(dirname + '/diagonal_eigv.npy') self.vscf_singles_energies = np.load(dirname + '/vscf_singles.npy') self.vci1 = np.load(dirname + '/vci1.npy') self.vci2 = np.load(dirname + '/vci2.npy') self.vci3 = np.load(dirname + '/vci3.npy') self.vci4 = np.load(dirname + '/vci4.npy') self.vci1_int = np.load(dirname + '/vci1_int.npy')