diff --git a/bin/cmmdepost.py b/bin/cmmdepost.py index 4696308..6498860 100755 --- a/bin/cmmdepost.py +++ b/bin/cmmdepost.py @@ -788,6 +788,44 @@ if opt.job == 'ts' and opt.software == 'orca': print('Delta_S_forward* = {:.2f} J/(mol K)'.format(delta_S_forward)) print('Delta_S_backward* = {:.2f} J/(mol K)'.format(delta_S_backward)) +if opt.job == 'force' and opt.software == 'orca': + with open('cmmd.xyz') as f: + x = int(f.readlines()[0]) + x = round(x*3/4) + with open('cmmd.opt') as f: + lines = f.readlines() + for i, line in enumerate(lines): + if "$gradients" in line: + data = lines[i+2:i+x+2] + data = [x.strip("\n").strip(" ") for x in data] + data_clean = [] + for i in data: + x = i.split(" ") + for i in x: + data_clean.append(i.strip("")) + # data_clean = [float(x) for x in data_clean] + data = [] + for i in data_clean: + if i != '': + data.append(float(i)) + + j = 0 + for j in range(int(len(data)/3)): + if j < (len(data) - 2): + print(data[j],data[j+1],data[j+2]) + j += 3 + + + + + + # data = [x.strip(" ") for x in data] + # data = [x.strip(",") for x in data] + + + + + if opt.job == 'opt' and opt.software == 'dcdftb': Energy = [] Gradient = []