mindspore/model_zoo/research/hpc/sponge
zhangxinfeng3 83021cd31c 0604 sponge case pme fix r1.2 2021-06-04 11:46:28 +08:00
..
src 0604 sponge case pme fix r1.2 2021-06-04 11:46:28 +08:00
README.md 04154 readme master 2021-04-15 14:27:12 +08:00
main.py 04173 sponge case master 2021-04-17 17:14:13 +08:00
train_mdnn.py 04173 sponge case master 2021-04-17 17:14:13 +08:00

README.md

SPONGE Example

Description

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.

The following example demonstrates how to perform high-performance molecular dynamics simulations with the built-in MindSpore SPONGE module on a GPU.

Dataset

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.

ALA Aqueous System

The topology file and coordinates file can be generated by tleap in AmberTools (link). For more details, please refer to:

Environment Requirements

Quick Start

After installing MindSpore, run the following command:

python main.py --i /path/NVT_290_10ns.in \
               --amber_parm /path/WATER_ALA.parm7 \
               --c /path/WATER_ALA_350_cool_290.rst7 \
               --o /path/ala_NVT_290_10ns.out

path is the path which stores input files.

Script Description

Script and Sample Code

├── sponge
    ├── README.md
    ├── main.py                                  # launch Simulation for SPONGE
    ├── src
        ├── bond.py                              # bond module in SPONGE
        ├── angle.py                             # angle module in SPONGE
        ├── dihedral.py                          # dihedral module in SPONGE
        ├── nb14.py                              # nb14 module in SPONGE
        ├── Langevin_Liujian_md.py               # Langevin_Liujian_md module in SPONGE
        ├── lennard_jones.py                     # lennard_jones module in SPONGE
        ├── md_information.py                    # save md information module in SPONGE
        ├── neighbor_list.py                     # neighbor_list module in SPONGE
        ├── particle_mesh_ewald.py               # particle_mesh_ewald module in SPONGE
        ├── simulation.py                # SPONGE simulation

Training Process

python main.py --i /path/NVT_290_10ns.in \
               --amber_parm /path/WATER_ALA.parm7 \
               --c /path/WATER_ALA_350_cool_290.rst7 \
               --o /path/ala_NVT_290_10ns.out

Training result will be stored in the specified .out file.

Result

After training, the following results are stored in ala_NVT_290_10ns.out:

_steps_ _TEMP_ _TOT_POT_ENE_ _BOND_ENE_ _ANGLE_ENE_ _DIHEDRAL_ENE_ _14LJ_ENE_ _14CF_ENE_ _LJ_ENE_ _CF_PME_ENE_
      1 293.105   -6117.709   1204.406       7.096          4.491      3.456     44.018 1372.488    -8753.664
   ...

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).

Model Description

Evaluation Performance

Parameter GPU
Resource GPU (Tesla V100 SXM2); memory 16 GB
Upload date
MindSpore version 1.2
Training parameter step=1
Output numpy file
Speed 16.7 ms/step
Total time 10.7 s
Script Link

ModelZoo Homepage

Visit ModelZoo.