Skip to content

Commit

Permalink
BPA docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
FNTwin committed Aug 30, 2024
1 parent 737b81e commit 3aa2796
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions openqdc/datasets/potential/bpa.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,21 @@ def read_bpa_record(subset: str, atoms: Atoms) -> Dict[str, Any]:
forces=atoms.get_forces().reshape(-1, 3, 1).astype(np.float32),
atomic_inputs=np.column_stack((atoms.numbers, atoms.get_initial_charges(), atoms.positions)).astype(np.float32),
n_atoms=np.array([len(atoms)], dtype=np.int32),
split = np.array([subset.item().split("_")[0]])
split=np.array([subset.item().split("_")[0]]),
)


class BPA(BaseDataset):
"""
_summary_
BPA (or 3BPA) dataset is a dataset consisting of a flexible druglike
molecule 3-(benzyloxy)pyridin-2-amine. This dataset features
complex dihedral potential energy surface with many local minima,
which can be challenging to approximate using classical or ML force fields.
The configuration were sampled from short (0.5 ps) MD simulations using the ANI-1x force field to
perturb the toward lower potential energies. Furthermore, long 25 ps MD simulation were performed at
three different temperatures (300, 600, and 1200 K) using the Langevin thermostat and a 1 fs time step.
The final configurations were re-evaluated using ORCA at the DFT level of
theory using the ωB97X exchange correlation functional and the 6-31G(d) basis set.
Usage:
```python
Expand All @@ -40,7 +47,7 @@ class BPA(BaseDataset):
__forces_unit__ = "ev/ang"
__distance_unit__ = "ang"
__force_mask__ = [True]
__energy_methods__ = (PotentialMethod.WB97X_6_31G_D,)
__energy_methods__ = [PotentialMethod.WB97X_6_31G_D]
__links__ = {"BPA.zip": "https://figshare.com/ndownloader/files/31325990"}

def read_raw_entries(self) -> List[Dict]:
Expand All @@ -60,7 +67,7 @@ def read_raw_entries(self) -> List[Dict]:
all_records.append(read_bpa_record(subset, atoms))

return all_records

def __getitem__(self, idx):
data = super().__getitem__(idx)
data.__setattr__("split", self._convert_array(self.data["split"][idx]))
Expand Down

0 comments on commit 3aa2796

Please sign in to comment.