Skip to content

Problem in make_deltaforces() of Chignolin_Coarse-Grained_Tutorial.ipynb #31

@a96123155

Description

@a96123155

Hi, there is a problem in Chignolin_Coarse-Grained_Tutorial.ipynb:

>>> make_deltaforces(coords_npz, forces_npz, delta_forces_npz, forcefield, psf, exclusions, device, forceterms) Check for broken coords. 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9/9 [00:00<00:00, 985.43it/s] No broken frames /home/ubuntu/.local/lib/python3.9/site-packages/torchmd/systems.py:49: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). self.pos[:] = torch.tensor( /home/ubuntu/.local/lib/python3.9/site-packages/torchmd/systems.py:73: UserWarning: To copy construct from a tensor, it is recommended to use sourceTensor.clone().detach() or sourceTensor.clone().detach().requires_grad_(True), rather than torch.tensor(sourceTensor). self.box[r][torch.eye(3).bool()] = torch.tensor( Producing delta forces 0%| | 0/18689 [00:00<?, ?it/s] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ubuntu/.local/lib/python3.9/site-packages/torchmd_cg/utils/make_deltaforces.py", line 80, in make_deltaforces Epot = forces.compute(co.reshape([1, natoms, 3]), system.box, system.forces) File "/home/ubuntu/.local/lib/python3.9/site-packages/torchmd/forces.py", line 293, in compute E, force_coeff = evaluate_repulsion_CG( File "/home/ubuntu/.local/lib/python3.9/site-packages/torchmd/forces.py", line 429, in evaluate_repulsion_CG coef = B[atomtype_indices[:, 0], atomtype_indices[:, 1]] TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions