Skip to content

Commit

Permalink
Fixed gradient dimensionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
muammar committed Dec 10, 2019
1 parent 006afb8 commit 5620a66
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions qcengine/programs/orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,11 @@ def parse_output(self, outfiles: Dict[str, str], input_model: "AtomicInput") ->

import uuid

myid = str(uuid.uuid4())
with open("/tmp/orcafiles/{}".format(myid), "wb") as handle:
name = str(uuid.uuid4())
name += ".gbw"
with open("/tmp/orcafiles/{}".format(name), "wb") as handle:
handle.write(outfiles["outfiles"]["dispatch.gbw"])
output_data["extras"]["gbw"] = myid
output_data["extras"]["gbw"] = name

return AtomicResult(**output_data)

Expand All @@ -310,6 +311,6 @@ def get_gradient(self, gradient_file):
except ValueError:
pass

dim = np.sqrt(len(gradient)).astype(int)
dim = int(len(gradient) / 3)

return np.array(gradient).reshape(dim, dim)
return np.array(gradient).reshape(dim, 3)

0 comments on commit 5620a66

Please sign in to comment.