Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanch authored and stefanch committed May 27, 2020
1 parent 35baa3c commit f40d826
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ import numpy as np
from sgdml.predict import GDMLPredict
from sgdml.utils import io

r,_ = io.read_xyz('examples/geometries/ethanol.xyz') # 9 atoms
print r.shape # (1,27)
r,_ = io.read_xyz('geometries/ethanol.xyz') # 9 atoms
print(r.shape) # (1,27)

model = np.load('models/ethanol.npz')
gdml = GDMLPredict(model)
e,f = gdml.predict(r)
print e.shape # (1,)
print f.shape # (1,27)
print(e.shape) # (1,)
print(f.shape) # (1,27)
```

## Authors
Expand Down
16 changes: 8 additions & 8 deletions sgdml/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1558,14 +1558,14 @@ def _add_argument_dir_with_file_type(parser, type, or_file=False):
)

for subparser in [parser_all, parser_create]: # NEW
group = subparser.add_mutually_exclusive_group()
group.add_argument(
'--cg',
dest='use_cg',
action='store_true',
# help='use iterative solver (conjugate gradient) with Nystroem preconditioner',
help=argparse.SUPPRESS
)
#group = subparser.add_mutually_exclusive_group()
#group.add_argument(
# '--cg',
# dest='use_cg',
# action='store_true',
# # help='use iterative solver (conjugate gradient) with Nystroem preconditioner',
# help=argparse.SUPPRESS
#)
subparser.add_argument(
'-m0',
'--model0',
Expand Down
3 changes: 2 additions & 1 deletion sgdml/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,8 @@ def _predict_wkr(
out = np.empty((dim_i + 1,))
out[0] = E_F[0]

np.dot(F, r_d_desc, out=out[1:])
#np.dot(F, r_d_desc, out=out[1:])
out[1:] = np.dot(F, r_d_desc)

return out

Expand Down

0 comments on commit f40d826

Please sign in to comment.