Skip to content

Commit

Permalink
Bugfixes for Mopac replacing babel with openbabel
Browse files Browse the repository at this point in the history
  • Loading branch information
anoopduk committed Jun 27, 2024
1 parent b4f95ed commit d825a17
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyar/interface/mopac.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def prepare_input(self, keyword=""):
"""
keyword_line = '-xkPM7' if not keyword else '-xk' + keyword
with open('tmp.log', 'w') as fminp:
out = subp.Popen(["obabel", "-ixyz", self.start_xyz_file, "-omop", self.inp_file, keyword_line],
stdout=fminp, stderr=fminp)
with open(self.inp_file, 'w') as fminp:
out = subp.Popen(["obabel", "-ixyz", self.start_xyz_file, "-omop", keyword_line],
stdout=fminp)
output, error = out.communicate()
poll = out.poll()
exit_status = out.returncode
Expand Down Expand Up @@ -130,7 +130,7 @@ def get_coords(self):
for i in coordinates:
c = i.split()
try:
coords.append(np.array([c[1], c[3], c[5]], dtype=str).astype(np.float))
coords.append(np.array([c[1], c[3], c[5]], dtype=str).astype(float))
except ValueError:
return
atoms_list.append(c[0])
Expand Down

0 comments on commit d825a17

Please sign in to comment.