))生成,更多细节,请查看案例完整教程:
-
-- [MindSPONGE 教程](https://gitee.com/mindspore/mindscience/blob/master/MindSPONGE/examples/polypeptide/README_CN.md)
-
-
-
-## 环境要求
-
-- 硬件设备: `GPU`
- - MindSPONGE现有案例目前只支持 `GPU`设备.
-- 框架
- - [MindSpore](https://www.mindspore.cn/install/en)
-- 更多信息,请查看详细介绍:
- - [MindSPONGE 教程](https://gitee.com/mindspore/mindscience/blob/master/MindSPONGE/examples/)
- - [MindSpore Python API](https://www.mindspore.cn/docs/api/en/master/index.html)
-
-## 快速入门
-
-安装完成MindSpore后, 进入目录../examples/polypeptide/src/运行如下命令:
-
-```shell
-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` 是存储输入文件的具体路径,在本案例中,该路径为`data/polypeptide`。
-
-## 脚本介绍
-
-### 脚本和示例代码
-
-```shell
-|-- README.md
-|-- README_CN.md
-|-- mindsponge_numpy.md
-|-- claisen_rearrangement
-| |-- data
-| |-- src
-| |-- main.py
-| |-- simulation_cybertron.py
-|-- covid
-| |-- data
-| | |-- deltaace2.parm7
-| | |-- deltaace2.rst7
-| | |-- s1ace2.parm7
-| | |-- s1ace2.rst7
-| |-- scripts
-| | |-- run_covid.sh
-| |-- src
-| |-- main.py
-| |-- run_npt.py
-|-- polypeptide
- |-- README_CN.md
- |-- data
- | |-- NVT_290_10ns.in
- | |-- WATER_ALA.parm7
- | |-- WATER_ALA_350_cool_290.rst7
- |-- scripts
- | |-- run.sh
- |-- src
- |-- main.py
-```
-
-## 结果
-
-模拟结束后,模拟结果会存储在指定的`.out`文件中,在这里为`ala_NVT_290_10ns.out`。其存储的内容为:
-
-```text
-_steps_ _TEMP_ _TOT_POT_ENE_ _BOND_ENE_ _ANGLE_ENE_ _DIHEDRAL_ENE_ _14LJ_ENE_ _14CF_ENE_ _LJ_ENE_ _CF_PME_ENE_
- 1 0.788 -5836.521 48.745 0.891 14.904 9.041 194.479 763.169 -6867.750
- ...
-```
-
-存储结果记录了模拟过程中输出的各类信息,包含步骤(_steps_),温度(_TEMP_),总能量(_TOT_POT_E_),键长(_BOND_ENE_),键角(_ANGLE_ENE_),二面角相互作用(_DIHEDRAL_ENE_),非键相互作用,其包含静电力及Leonard-Jones相互作用。
diff --git a/MindSPONGE/examples/mindsponge_numpy.md b/MindSPONGE/examples/mindsponge_numpy.md
deleted file mode 100644
index fa5d73eea141a31a2d21ef2606200e8804d048b5..0000000000000000000000000000000000000000
--- a/MindSPONGE/examples/mindsponge_numpy.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# MindSPONGE with numpy support
-
-`Linux` `GPU`
-
-
-
-- [Run MindSPONGE with MindSpore.Numpy](#Run-MindSPONGE-with-MindSpore.Numpy)
-- [Under the hood of the Numpy demo](#Under-the-hood-of-the-Numpy-demo)
-- [Performance](#Performance)
-
-
-
-## Run MindSPONGE with MindSpore.Numpy
-
-MindSPONGE has been fully supported by MindSpore.Numpy, which runs at similar speed
-compared with the Cuda version, which means energy, force and coordinate calculations
-are fully supported with Numpy-like syntax, which runs on top of MindSpore primitive
-operators.
-
-For numpy version, run the following command instead:
-
-```shell
-python main_np.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
-```
-
-Detailed implementations:
-
-```shell
-├── scripts
- ├── main_np.py # launch Simulation for SPONGE-Numpy
- ├── src
- ├── simulation_np.py # SPONGE-numpy simulation
- ├── functions # SPONGE-numpy modules
- ├── angle_energy.py
- ├── angle_force_with_atom_energy.py
- ├── bond_energy.py
- ├── bond_force_with_atom_energy.py
- ├── common.py
- ├── crd_to_uint_crd.py
- ├── dihedral_14_cf_energy.py
- ├── dihedral_14_ljcf_force_with_atom_energy.py
- ├── dihedral_14_lj_energy.py
- ├── dihedral_energy.py
- ├── dihedral_force_with_atom_energy.py
- ├── __init__.py
- ├── lj_energy.py
- ├── lj_force_pme_direct_force.py
- ├── md_iteration_leap_frog_liujian.py
- ├── md_temperature.py
- ├── neighbor_list_update.py
- ├── pme_common.py
- ├── pme_energy.py
- ├── pme_excluded_force.py
- └── pme_reciprocal_force.py
-```
-
-For other details, please refer to the [tutorial on case tutorial](https://gitee.com/mindspore/mindscience/blob/master/MindSPONGE/mindsponge/examples/case_polypeptide.md)
-
-## Under the hood of the numpy demo
-
-For the Cuda version, every kernel lies inside MindSpore as Cuda kernels. To allow
-better transparency for how molecular dynamics algorithm works, Cuda kernels were
-refactored as numpy scripts and displayed in src/functions.
-
-MindSpore Numpy package contains a set of Numpy-like interfaces, which allows developers
-to build models on MindSpore with similar syntax of Numpy. MindSpore.Numpy is a layer
-of wrapper on MindSpore Primitives (mindspore.ops) which runs on MindSproe Tensors,
-therefore it is compatible with other MindSpore features. See
-[here](https://www.mindspore.cn/docs/programming_guide/en/master/numpy.html) for
-more details.
-
-By default, the numpy demo runs on top of [Graph Kernel Fusion]
-(https://www.mindspore.cn/docs/programming_guide/en/master/enable_graph_kernel_fusion.html)
-and [Auto Kernel Generation] (https://gitee.com/mindspore/akg). These features
-lead to 50% (or more) performance improvement, compared with no kernel fusion,
-and brings the numpy version to comparable performance with the Cuda version.
-
-To setup for Graph Kernel Fusion, simply add two lines in the launch script
-(mindsponge/scripts/main_np.py):
-
-```python
-# Enable Graph Mode, with GPU as backend, and allow Graph Kernel Fusion
-context.set_context(mode=context.GRAPH_MODE, device_target="GPU", device_id=args_opt.device_id, enable_graph_kernel=True)
-# Make fusion rules for specific operators
-context.set_context(graph_kernel_flags="--enable_expand_ops=Gather --enable_cluster_ops=TensorScatterAdd --enable_recompute_fusion=false")
-```
-
-## Performance
-
-| Parameter | GPU |
-| -------------------------- |---------------------------------- |
-| Resource | GPU (Tesla V100 SXM2); memory 16 GB
-| Upload date |
-| MindSpore version | 1.4
-| Training parameter | step=1000
-| Output | numpy file
-| Speed | 5.2 ms/step
-| Script | [Link](https://gitee.com/mindspore/mindscience/tree/master/MindSPONGE/mindsponge/scripts)
diff --git a/MindSPONGE/mindsponge/md/npt.py b/MindSPONGE/mindsponge/md/npt.py
index ee6c8b68b408a7a463ff6ce8db2a0cf0ba51ac86..d0354f2f36c1f1760259cd41884f5d5f345723f5 100644
--- a/MindSPONGE/mindsponge/md/npt.py
+++ b/MindSPONGE/mindsponge/md/npt.py
@@ -640,15 +640,7 @@ class NPT(nn.Cell):
else:
dihedral_force = self.zero_main_force
- if self.restrain_is_initialized:
- _, atom_virial, restrain_frc = self.restrain_force_with_atom_energy_and_virial(self.restrain_list,
- self.crd,
- self.crd_ref,
- self.box_length)
- else:
- restrain_frc = self.zero_main_force
-
- force = P.AddN()([lj_force, pme_force, nb14_force, bond_force, angle_force, dihedral_force, restrain_frc])
+ force = P.AddN()([lj_force, pme_force, nb14_force, bond_force, angle_force, dihedral_force])
return force, self.atom_virial, self.virial, self.need_pressure
def simulation_caculate_energy(self, uint_crd, uint_dr_to_dr_cof):
diff --git a/MindSPONGE/mindsponge/md/simulation.py b/MindSPONGE/mindsponge/md/simulation.py
index fcb64b3adb3e4152b70e96923406ba106b688f0e..d590209692c1d7210deccd9547439bea4bd197cf 100644
--- a/MindSPONGE/mindsponge/md/simulation.py
+++ b/MindSPONGE/mindsponge/md/simulation.py
@@ -510,11 +510,6 @@ class Simulation(nn.Cell):
self.pn)
force = force + dihedral_force
- if self.restrain_is_initialized:
- _, _, restrain_frc = self.restrain_force_with_atom_energy_and_virial(self.restrain_list,
- self.crd, self.crd_ref,
- self.box_length)
- force = force + restrain_frc
return force
def simulation_caculate_energy(self, uint_crd, uint_dr_to_dr_cof):
diff --git a/MindSPONGE/protein_msa/README_CN.md b/MindSPONGE/protein_msa/README_CN.md
index 6a87c1727aa9bcc94b4bd2b9f30144f48e41368e..227ac8c6feb655c025d1fc3582e09db02afd3426 100644
--- a/MindSPONGE/protein_msa/README_CN.md
+++ b/MindSPONGE/protein_msa/README_CN.md
@@ -4,7 +4,11 @@
针对蛋白质的[多序列比对](https://en.wikipedia.org/wiki/Multiple_sequence_alignment)(multiple sequence alignment; MSA)是研究蛋白质的结构、功能和进化关系等问题的重要方法。MSA数据中蕴含了构成蛋白质的氨基酸序列中的保守性质(conservation)、协同突变(co-evolution)和功能与物种进化关系(phylogenetics)的相关信息。
-
+
+
+
+
+*图片致谢:Sergey Ovchinnikov*
人类已知的存在于自然界中的蛋白质序列数目已经上亿并在快速增长,但仅凭这些蛋白质单序列的数据很难了解蛋白之间的关系。Protein MSA数据库,就是一个对不同蛋白质序列之间的关系进行了标记的大规模“关系型”数据库,被标记为关联的蛋白质序列之间的相似度、进化关系和突变所在位点的分布等信息对蛋白质结构和功能的预测极为重要。例如在AlphaFold2模型[1]中,目标蛋白序列的MSA信息就是预测结构的必要输入信息之一。