Skip to content

Commit

Permalink
fixed 2 bugs in code
Browse files Browse the repository at this point in the history
  • Loading branch information
shenoynikhil committed Oct 8, 2023
1 parent aff4de1 commit 3fae2e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/openqdc/datasets/spice.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def read_record(r):
positions = r["conformations"][:] * BOHR2ANG

res = dict(
smiles=np.array([smiles] * n_confs),
name=np.array([smiles] * n_confs),
subset=np.array([Spice.subset_mapping[subset]] * n_confs),
energies=r[Spice.energy_target_names[0]][:][:, None].astype(np.float32),
forces=r[Spice.force_target_names[0]][:].reshape(-1, 3, 1) / BOHR2ANG,
forces=r[Spice.force_target_names[0]][:].reshape(-1, 3, 1) / BOHR2ANG * (-1.0), # forces -ve of energy gradient
atomic_inputs=np.concatenate(
(x[None, ...].repeat(n_confs, axis=0), positions), axis=-1, dtype=np.float32
).reshape(-1, 5),
Expand Down

0 comments on commit 3fae2e3

Please sign in to comment.