##### Using Vibrations module v = Vibrations(atoms, name=f'./vibs/vib_{N}') if not p.isfile(f'./vibs/vib_{N}.all.pckl'): print('Running vibration calculation') v.run() v.combine() # Combine pickle files # Get frequencies and DOS - i.e # of states per frequency all_freq = v.get_frequencies() # if N==38: # print(v.summary()) # print(all_freq) (freq, counts) = np.unique(all_freq, return_counts=True) fold_freq = v.fold(np.real(freq), np.real(counts), start=0, end=np.real(freq.max()), width=12, normalize=False) f_freq = np.array(fold_freq[0]) f_dos = np.array(fold_freq[1]) freq = np.array(freq) dos = np.array(counts) # Get number of modes # e = False # i=0 # modes = 0 # while not e: # try: # v.get_mode(i) # modes += 1