You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 5.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. # SPONGE Example
  2. - [Description](#Description)
  3. - [Dataset](#Dataset)
  4. - [Environment Requirements](#Environment-Requirements)
  5. - [Quick Start](#Quick-Start)
  6. - [Script Description](#Script-Description)
  7. - [Script and Sample Code](#Script-and-Sample-Code)
  8. - [Training Process](#Training-Process)
  9. - [Model Description](#Model-Description)
  10. - [Evaluation Performance](#Evaluation-Performance)
  11. - [Result](#Result)
  12. - [ModelZoo Homepage](#ModelZoo-Homepage)
  13. ## Description
  14. SPONGE in MindSpore is a molecular dynamics simulation library, featuring high performance and modularization. It is developed by the `Yiqin Gao` group (`Peking University` and `Shenzhen Bay Laboratory`) and `Huawei MindSpore` team. It can efficiently simulate traditional molecular dynamics tasks based on the "graph-kernel-fusion" and "automatic parallelization" features of MindSpore. In addition, it utilizes the automatic differentiation feature of MindSpore, and introduces machine learning methods, such as neural network, into traditional molecular simulation, achieving methodological inventions.
  15. The following example demonstrates how to perform high-performance molecular dynamics simulations with the built-in MindSpore SPONGE module on a `GPU`.
  16. ## Dataset
  17. There are three inputs in the example, the property file `NVT_290_10ns.in`, the topology file `WATER_ALA.parm7` and the coordinates file `WATER_ALA_350_cool_290.rst7`, respectivelly.
  18. ![ALA Aqueous System](https://images.gitee.com/uploads/images/2021/0323/184453_4bd9b1a6_8142020.png "图片1.png")
  19. The topology file and coordinates file can be generated by `tleap` in `AmberTools` ([link](<http://ambermd.org/GetAmber.php>)). For more details, please refer to:
  20. - [SPONGE Tutorial](https://gitee.com/mindspore/docs/blob/master/tutorials/training/source_zh_cn/advanced_use/hpc_sponge.md)
  21. ## Environment Requirements
  22. - Hardware: `GPU`
  23. - Prepare a hardware environment with `GPU`.
  24. - Framework
  25. - [MindSpore](https://www.mindspore.cn/install/en)
  26. - For more information, visit the resources below:
  27. - [MindSpore Tutorials](https://www.mindspore.cn/tutorial/training/en/master/index.html)
  28. - [MindSpore Python API](https://www.mindspore.cn/doc/api_python/en/master/index.html)
  29. ## Quick Start
  30. After installing MindSpore, run the following command:
  31. ```shell
  32. python main.py --i /path/NVT_290_10ns.in \
  33. --amber_parm /path/WATER_ALA.parm7 \
  34. --c /path/WATER_ALA_350_cool_290.rst7 \
  35. --o /path/ala_NVT_290_10ns.out
  36. ```
  37. `path` is the path which stores input files.
  38. ## Script Description
  39. ### Script and Sample Code
  40. ```shell
  41. ├── sponge
  42. ├── README.md
  43. ├── main.py # launch Simulation for SPONGE
  44. ├── src
  45. ├── bond.py # bond module in SPONGE
  46. ├── angle.py # angle module in SPONGE
  47. ├── dihedral.py # dihedral module in SPONGE
  48. ├── nb14.py # nb14 module in SPONGE
  49. ├── Langevin_Liujian_md.py # Langevin_Liujian_md module in SPONGE
  50. ├── lennard_jones.py # lennard_jones module in SPONGE
  51. ├── md_information.py # save md information module in SPONGE
  52. ├── neighbor_list.py # neighbor_list module in SPONGE
  53. ├── particle_mesh_ewald.py # particle_mesh_ewald module in SPONGE
  54. ├── simulation.py # SPONGE simulation
  55. ```
  56. ### Training Process
  57. ```shell
  58. python main.py --i /path/NVT_290_10ns.in \
  59. --amber_parm /path/WATER_ALA.parm7 \
  60. --c /path/WATER_ALA_350_cool_290.rst7 \
  61. --o /path/ala_NVT_290_10ns.out
  62. ```
  63. Training result will be stored in the specified .out file.
  64. ## Result
  65. After training, the following results are stored in `ala_NVT_290_10ns.out`:
  66. ```text
  67. _steps_ _TEMP_ _TOT_POT_ENE_ _BOND_ENE_ _ANGLE_ENE_ _DIHEDRAL_ENE_ _14LJ_ENE_ _14CF_ENE_ _LJ_ENE_ _CF_PME_ENE_
  68. 1 293.105 -6117.709 1204.406 7.096 4.491 3.456 44.018 1372.488 -8753.664
  69. ...
  70. ```
  71. There are sorts of energy in the output, steps (_steps_), temperature (_TEMP_), total energy (_TOT_POT_E_), bond energy (_BOND_ENE_), angle energy (_ANGLE_ENE_), dihedral energy (_DIHEDRAL_ENE_), non-bond energy, includes Coulomb force (_14CF_ENE_) and Lennard-Jones energy (_14LJ_ENE_), Van der Waals energy (_LJ_ENE_) and Coulomb force in PME (_CF_PME_ENE_).
  72. ## Model Description
  73. ### Evaluation Performance
  74. | Parameter | GPU |
  75. | -------------------------- |---------------------------------- |
  76. | Resource | GPU (Tesla V100 SXM2); memory 16 GB
  77. | Upload date |
  78. | MindSpore version | 1.2
  79. | Training parameter | step=1
  80. | Output | numpy file
  81. | Speed | 16.7 ms/step
  82. | Total time | 10.7 s
  83. | Script | [Link](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/research/hpc/sponge)
  84. ## ModelZoo Homepage
  85. Visit [ModelZoo](https://gitee.com/mindspore/mindspore/tree/master/model_zoo).