File tree Expand file tree Collapse file tree 3 files changed +794
-1
lines changed Expand file tree Collapse file tree 3 files changed +794
-1
lines changed Original file line number Diff line number Diff line change @@ -25,15 +25,18 @@ def parse_sqm_out(fname):
25
25
for line in f :
26
26
if line .startswith (" Total SCF energy" ):
27
27
energy = float (line .strip ().split ()[- 2 ])
28
- energies . append ( energy )
28
+ energies = [ energy ]
29
29
elif line .startswith (" Atom Element Mulliken Charge" ):
30
30
flag = READ_CHARGE
31
+ charges = []
31
32
elif line .startswith (" Total Mulliken Charge" ):
32
33
flag = START
33
34
elif line .startswith (" Final Structure" ):
34
35
flag = READ_COORDS_START
36
+ coords = []
35
37
elif line .startswith ("QMMM: Forces on QM atoms" ):
36
38
flag = READ_FORCES
39
+ forces = []
37
40
elif flag == READ_CHARGE :
38
41
ls = line .strip ().split ()
39
42
atom_symbols .append (ls [- 2 ])
@@ -46,6 +49,9 @@ def parse_sqm_out(fname):
46
49
flag = START
47
50
elif flag == READ_FORCES :
48
51
ll = line .strip ()
52
+ if not ll .startswith ("QMMM: Atm " ):
53
+ flag = START
54
+ continue
49
55
forces .append ([float (ll [- 60 :- 40 ]), float (ll [- 40 :- 20 ]), float (ll [- 20 :])])
50
56
if len (forces ) == len (charges ):
51
57
flag = START
You can’t perform that action at this time.
0 commit comments