SchNetPack is a deep learning framework designed for atomistic simulations. You can use pre-trained models (like SchNet) to run molecular dynamics (MD) simulations that compute forces and energies on atoms using neural networks.
md_ethanol.model
)md_ethanol.xyz
)project-root/ ├── md_configs/ │ ├── config.yaml │ ├── dynamics/ │ ├── system.yaml │ └── callbacks/ ├── tests/testdata/ │ ├── md_ethanol.model │ └── md_ethanol.xyz ├── src/scripts/spkmd.py
In md_configs/dynamics/base.yaml
, define:
n_steps: 1000000 defaults: - integrator: md
In md_configs/integrator/md.yaml
, define:
_target_: schnetpack.md.integrators.VelocityVerlet time_step: 0.5
Use the following command (on Windows CMD) to start your simulation:
python spkmd.py \ simulation_dir=outputs/ethanol_test \ system.molecule_file=C:/full/path/to/md_ethanol.xyz \ calculator.model_file=C:/full/path/to/md_ethanol.model \ calculator.neighbor_list.cutoff=5.0
n_steps
= 1,000,000outputs/ethanol_test/
To view energy and temperature curves:
tensorboard --logdir outputs/ethanol_test/logs
Open http://localhost:6006
in your browser to explore the results.
This guide showed how to:
The image below shows a successful run of the SchNetPack MD simulation: