From eede5d7fb2207614cc0395418656a8da468c3eb7 Mon Sep 17 00:00:00 2001 From: Stefan Doerr Date: Tue, 20 Feb 2024 09:13:23 +0200 Subject: [PATCH 1/2] revert removal of prior_model: null in ANI-2x config file as it causes too many test failures --- examples/TensorNet-ANI2X.yaml | 1 + tests/test_examples.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/TensorNet-ANI2X.yaml b/examples/TensorNet-ANI2X.yaml index a3c753042..c49bd63be 100644 --- a/examples/TensorNet-ANI2X.yaml +++ b/examples/TensorNet-ANI2X.yaml @@ -39,6 +39,7 @@ num_rbf: 32 num_workers: 4 output_model: Scalar precision: 32 +prior_model: null remove_ref_energy: true rbf_type: expnorm redirect: false diff --git a/tests/test_examples.py b/tests/test_examples.py index 82243a55b..8cd5155e6 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -19,7 +19,7 @@ def test_example_yamls(fname): args = yaml.load(f, Loader=yaml.FullLoader) prior = None - if "prior_model" in args and args["prior_model"] is not None: + if args["prior_model"] is not None: dataset = DummyDataset(has_atomref=True) prior = getattr(priors, args["prior_model"])(dataset=dataset) From 5a4fca740d105b9bff046cf8dcc727b51fa10a4b Mon Sep 17 00:00:00 2001 From: RaulPPealez Date: Tue, 20 Feb 2024 10:53:52 +0100 Subject: [PATCH 2/2] Update openmm example to use atom masses from the pdb --- examples/openmm-integration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/openmm-integration.py b/examples/openmm-integration.py index 8bfdfa450..47953e9b5 100644 --- a/examples/openmm-integration.py +++ b/examples/openmm-integration.py @@ -51,8 +51,8 @@ def forward(self, positions): system = System() # Create an OpenMM system and add the TorchForce -for i in range(pdb.topology.getNumAtoms()): - system.addParticle(1.0) +for atom in pdb.topology.atoms(): + system.addParticle(atom.element.mass) system.addForce(torch_force) integrator = LangevinMiddleIntegrator(298.15*kelvin, 1/picosecond, 2*femtosecond) platform = Platform.getPlatformByName('CPU')