GPUMD分子动力学模拟-学习与实践

GPUMD分子动力学模拟-学习与实践

【20220813-樊哲勇 |基于GPUMD程序包的机器学习势和分子动力学模拟】 https://www.bilibili.com/video/BV1cd4y1Z7zi?share_source=copy_web

纯GPU下的MD分子模型系统软件

https://github.com/brucefan1983/GPUMD

跟GPUMD对接的一些python程序

https://github.com/AlexGabourie/gpyumd gpyumd是一个用于GPUMD的 Python3 接口。它帮助用户根据GPUMD 文档提供的详细信息生成输入和处理输出文件。

https://github.com/bigd4/PyNEP
PyNEP是GPUMD中使用的机器学习势NEP的 Python 接口。

特征:

  • ase NEP 计算器
  • 原子的描述符和潜在描述符计算
  • GPUMD 数据集的加载和转储
  • NEP的phonopy计算(需要phonopy和spglib)
  • 结构选择
  • 最远点采样

《CUDA编程》书配套代码

https://github.com/brucefan1983/CUDA-Programming

用 pyCUDA 实现《CUDA编程》书中的范例

由琪同学正在用 pyCUDA 实现《CUDA编程》书中的范例,见如下仓库:
https://github.com/YouQixiaowu/CUDA-Programming-with-Python

软件包下载以及库安装

下载如下四个软件包

# !git clone https://github.com/bigd4/PyNEP
# !git clone https://github.com/brucefan1983/GPUMD
# !git clone https://github.com/brucefan1983/CUDA-Programming
# !git clone https://github.com/YouQixiaowu/CUDA-Programming-with-Python
正克隆到 'CUDA-Programming-with-Python'...
remote: Enumerating objects: 291, done.[K
remote: Total 291 (delta 0), reused 0 (delta 0), pack-reused 291[K
接收对象中: 100% (291/291), 1.64 MiB | 981.00 KiB/s, 完成.
处理 delta 中: 100% (126/126), 完成.
检查连接... 完成。

安装相关库

# pycuda安装耗时很长,总计需要145秒
!pip install pybind11 spglib phonopy pycuda
# 用时14秒
!pip install -r PyNEP/requirements.txt -q

安装PyNEP

# !git clone --recursive https://github.com/bigd4/PyNEP.git
# 安装后需要“重启内核”
!cd PyNEP && python setup.py install

PyNEP学习


from ase.build import bulk
atoms = bulk('C', 'diamond', cubic=True)

# calculate energy and forces
from pynep.calculate import NEP
calc = NEP('PyNEP/examples/C_2022_NEP3.txt')
atoms = bulk('C', 'diamond', cubic=True)
atoms.set_calculator(calc)
energy = atoms.get_potential_energy()
forces = atoms.get_forces()
stress = atoms.get_stress()  # stress in ase is different from virial in GPUMD

# calculate descriptors and latent descriptors
des = calc.get_property('descriptor', atoms)
lat = calc.get_property('latent', atoms)

# load and dump GPUMD data
from pynep.io import load_nep, dump_nep
dump_nep('C.in', [atoms])
atoms = load_nep('C.in')[0]

# calculate band strucuture, dos and thermal properties (need spglib and phonopy)
from pynep.phono import PhonoCalc
phono_calc = PhonoCalc(calc)
phono_calc.calculate(atoms)
Calculating force constants...
Calculating band structure...
Calculating total dos...
Calculating partial dos...
Calculating thermal properties...
Calculating ZPE...





Atoms(symbols='C8', pbc=True, cell=[3.57, 3.57, 3.57], calculator=SinglePointCalculator(...))

在这里插入图片描述

GPUMD学习

fcp 电位检测

!cd GPUMD/examples/fcp_potentials/check_force && /home/aistudio/GPUMD/src/gpumd 
***************************************************************
*                 Welcome to use GPUMD                        *
*     (Graphics Processing Units Molecular Dynamics)          *
*                     Version 3.4                             *
*              This is the gpumd executable                   *
***************************************************************


---------------------------------------------------------------
Compiling options:
---------------------------------------------------------------

DEBUG is off: Use different PRNG seeds for different runs.

---------------------------------------------------------------
GPU information:
---------------------------------------------------------------

number of GPUs = 1
Device id:                   0
    Device name:             Tesla V100-SXM2-32GB
    Compute capability:      7.0
    Amount of global memory: 31.7485 GB
    Number of SMs:           80

---------------------------------------------------------------
Started running GPUMD.
---------------------------------------------------------------


---------------------------------------------------------------
Started initializing positions and related parameters.
---------------------------------------------------------------

Number of atoms is 108.
Use triclinic box.
Use periodic boundary conditions along x.
Use periodic boundary conditions along y.
Use periodic boundary conditions along z.
Box matrix h = [a, b, c] is
    1.2150000000e+01    0.0000000000e+00    0.0000000000e+00
    0.0000000000e+00    1.2150000000e+01    0.0000000000e+00
    0.0000000000e+00    0.0000000000e+00    1.2150000000e+01
Inverse box matrix g = inv(h) is
    8.2304526749e-02    0.0000000000e+00    0.0000000000e+00
    0.0000000000e+00    8.2304526749e-02    0.0000000000e+00
    0.0000000000e+00    0.0000000000e+00    8.2304526749e-02
Do not specify initial velocities here.
Have 1 grouping method(s).
There are 108 groups of atoms in grouping method 0.
    1 atoms in group 0.
    1 atoms in group 1.
    1 atoms in group 2.
    1 atoms in group 3.
    1 atoms in group 4.
    1 atoms in group 5.
    1 atoms in group 6.
    1 atoms in group 7.
    1 atoms in group 8.
    1 atoms in group 9.
    1 atoms in group 10.
    1 atoms in group 11.
    1 atoms in group 12.
    1 atoms in group 13.
    1 atoms in group 14.
    1 atoms in group 15.
    1 atoms in group 16.
    1 atoms in group 17.
    1 atoms in group 18.
    1 atoms in group 19.
    1 atoms in group 20.
    1 atoms in group 21.
    1 atoms in group 22.
    1 atoms in group 23.
    1 atoms in group 24.
    1 atoms in group 25.
    1 atoms in group 26.
    1 atoms in group 27.
    1 atoms in group 28.
    1 atoms in group 29.
    1 atoms in group 30.
    1 atoms in group 31.
    1 atoms in group 32.
    1 atoms in group 33.
    1 atoms in group 34.
    1 atoms in group 35.
    1 atoms in group 36.
    1 atoms in group 37.
    1 atoms in group 38.
    1 atoms in group 39.
    1 atoms in group 40.
    1 atoms in group 41.
    1 atoms in group 42.
    1 atoms in group 43.
    1 atoms in group 44.
    1 atoms in group 45.
    1 atoms in group 46.
    1 atoms in group 47.
    1 atoms in group 48.
    1 atoms in group 49.
    1 atoms in group 50.
    1 atoms in group 51.
    1 atoms in group 52.
    1 atoms in group 53.
    1 atoms in group 54.
    1 atoms in group 55.
    1 atoms in group 56.
    1 atoms in group 57.
    1 atoms in group 58.
    1 atoms in group 59.
    1 atoms in group 60.
    1 atoms in group 61.
    1 atoms in group 62.
    1 atoms in group 63.
    1 atoms in group 64.
    1 atoms in group 65.
    1 atoms in group 66.
    1 atoms in group 67.
    1 atoms in group 68.
    1 atoms in group 69.
    1 atoms in group 70.
    1 atoms in group 71.
    1 atoms in group 72.
    1 atoms in group 73.
    1 atoms in group 74.
    1 atoms in group 75.
    1 atoms in group 76.
    1 atoms in group 77.
    1 atoms in group 78.
    1 atoms in group 79.
    1 atoms in group 80.
    1 atoms in group 81.
    1 atoms in group 82.
    1 atoms in group 83.
    1 atoms in group 84.
    1 atoms in group 85.
    1 atoms in group 86.
    1 atoms in group 87.
    1 atoms in group 88.
    1 atoms in group 89.
    1 atoms in group 90.
    1 atoms in group 91.
    1 atoms in group 92.
    1 atoms in group 93.
    1 atoms in group 94.
    1 atoms in group 95.
    1 atoms in group 96.
    1 atoms in group 97.
    1 atoms in group 98.
    1 atoms in group 99.
    1 atoms in group 100.
    1 atoms in group 101.
    1 atoms in group 102.
    1 atoms in group 103.
    1 atoms in group 104.
    1 atoms in group 105.
    1 atoms in group 106.
    1 atoms in group 107.
There is only one atom type.
    108 atoms of type 0.

---------------------------------------------------------------
Finished initializing positions and related parameters.
---------------------------------------------------------------


---------------------------------------------------------------
Started executing the commands in run.in.
---------------------------------------------------------------

Use the force constant potential.
    up to order-6.
    and compute heat current up to order-2.
    Use the force constant data in ../../../potentials/fcp/Al.
    Data in r0.in have been read in.
    Reading data from ../../../potentials/fcp/Al/fcs_order2.in
    Reading data from ../../../potentials/fcp/Al/clusters_order2.in
    Reading data from ../../../potentials/fcp/Al/fcs_order3.in
    Reading data from ../../../potentials/fcp/Al/clusters_order3.in
    Reading data from ../../../potentials/fcp/Al/fcs_order4.in
    Reading data from ../../../potentials/fcp/Al/clusters_order4.in
    Reading data from ../../../potentials/fcp/Al/fcs_order5.in
    Reading data from ../../../potentials/fcp/Al/clusters_order5.in
    Reading data from ../../../potentials/fcp/Al/fcs_order6.in
    Reading data from ../../../potentials/fcp/Al/clusters_order6.in
    applies to atoms [0, 108) from type 0 to type 0.
Initialized velocities with T = 1 K.
Use NVE ensemble for this run.
Time step for this run is 0 fs.
Dump force.
    every 1 steps.
Run 1 steps.
    1 steps completed.

---------------------------------------------------------------
Time used for this run = 0.016468 second.
Speed of this run = 6558.17 atom*step/second.
---------------------------------------------------------------


---------------------------------------------------------------
Finished executing the commands in run.in.
---------------------------------------------------------------


---------------------------------------------------------------
Time used = 0.312379 s.
---------------------------------------------------------------


---------------------------------------------------------------
Finished running GPUMD.
---------------------------------------------------------------

NEP电位检测碲化铅训练

# 训练用时425秒

!cd GPUMD/examples/nep_potentials/PbTe/train && /home/aistudio/GPUMD/src/nep 
***************************************************************
*                 Welcome to use GPUMD                        *
*    (Graphics Processing Units Molecular Dynamics)           *
*                     Version 3.4                             *
*              This is the nep executable                     *
***************************************************************


---------------------------------------------------------------
GPU information:
---------------------------------------------------------------

number of GPUs = 1
Device id:                   0
    Device name:             Tesla V100-SXM2-32GB
    Compute capability:      7.0
    Amount of global memory: 31.7485 GB
    Number of SMs:           80

---------------------------------------------------------------
Started running nep.
---------------------------------------------------------------


---------------------------------------------------------------
Started reading nep.in.
---------------------------------------------------------------

Input or default parameters:
    (input)   use NEP version 3.
    (input)   number of atom types = 2.
        (default) type 0 (Te with Z = 52) has force weight of 1.
        (default) type 1 (Pb with Z = 82) has force weight of 1.
    (default) will not add the ZBL potential.
    (input)   radial cutoff = 8 A.
    (input)   angular cutoff = 4 A.
    (input)   n_max_radial = 4.
    (input)   n_max_angular = 4.
    (default) basis_size_radial = 8.
    (default) basis_size_angular = 8.
    (input)   l_max_3body = 4.
    (input)   l_max_4body = 2.
    (input)   l_max_5body = 0.
    (input)   number of neurons = 30.
    (default) lambda_1 = 0.05.
    (default) lambda_2 = 0.05.
    (default) lambda_e = 1.
    (default) lambda_f = 1.
    (default) lambda_v = 0.1.
    (default) force_delta = 0.
    (input)   batch size = 25.
    (default) population size = 50.
    (input)   maximum number of generations = 10000.
Some calculated parameters:
    number of radial descriptor components = 5.
    number of angualr descriptor components = 25.
    total number of  descriptor components = 30.
    NN architecture = 30-30-1.
    number of NN parameters to be optimized = 961.
    number of descriptor parameters to be optimized = 360.
    total number of parameters to be optimized = 1321.

---------------------------------------------------------------
Finished reading nep.in.
---------------------------------------------------------------


---------------------------------------------------------------
Started reading train.in.
---------------------------------------------------------------

Number of configurations = 325.
Number of devices = 1
Number of batches = 13

Batch 0:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 74.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 9.
---------------------------------------------------------------


Batch 1:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 73.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 4.
    Maximum number of neighbors for one atom = 10.
---------------------------------------------------------------


Batch 2:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 73.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 9.
---------------------------------------------------------------


Batch 3:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 72.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 9.
---------------------------------------------------------------


Batch 4:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 73.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 4.
    Maximum number of neighbors for one atom = 9.
---------------------------------------------------------------


Batch 5:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 72.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 8.
---------------------------------------------------------------


Batch 6:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 73.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 4.
    Maximum number of neighbors for one atom = 8.
---------------------------------------------------------------


Batch 7:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 73.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 8.
---------------------------------------------------------------


Batch 8:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 72.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 8.
---------------------------------------------------------------


Batch 9:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 57.
    Maximum number of neighbors for one atom = 74.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 4.
    Maximum number of neighbors for one atom = 9.
---------------------------------------------------------------


Batch 10:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 72.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 4.
    Maximum number of neighbors for one atom = 9.
---------------------------------------------------------------


Batch 11:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 73.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 8.
---------------------------------------------------------------


Batch 12:
Number of configurations = 25.

---------------------------------------------------------------
Constructing train_set in device  0.
Total number of atoms = 6250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 73.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 5.
    Maximum number of neighbors for one atom = 8.
---------------------------------------------------------------


---------------------------------------------------------------
Started reading test.in.
---------------------------------------------------------------

Number of configurations = 325.

---------------------------------------------------------------
Constructing test_set in device  0.
Total number of atoms = 81250.
Number of atoms in the largest configuration = 250.
Number of configurations having virial = 0.
Radial descriptor with a cutoff of 8 A:
    Minimum number of neighbors for one atom = 56.
    Maximum number of neighbors for one atom = 74.
Angular descriptor with a cutoff of 4 A:
    Minimum number of neighbors for one atom = 4.
    Maximum number of neighbors for one atom = 10.
---------------------------------------------------------------


---------------------------------------------------------------
Time used for initialization = 1.004430 s.
---------------------------------------------------------------


---------------------------------------------------------------
Started training.
---------------------------------------------------------------

Step    Total-Loss L1Reg-Loss L2Reg-Loss RMSE-E-Train RMSE-F-Train RMSE-V-Train RMSE-E-Test  RMSE-F-Test  RMSE-V-Test  
100     0.07901    0.01401    0.02655    0.00055      0.03790      0.00000      0.00043      0.03604      0.00000      
200     0.07733    0.01389    0.02647    0.00043      0.03655      0.00000      0.00041      0.03616      0.00000      
300     0.07729    0.01376    0.02641    0.00047      0.03666      0.00000      0.00040      0.03611      0.00000      
400     0.08023    0.01371    0.02638    0.00037      0.03977      0.00000      0.00040      0.03611      0.00000      
500     0.07376    0.01359    0.02630    0.00032      0.03356      0.00000      0.00040      0.03615      0.00000      
600     0.07731    0.01352    0.02624    0.00046      0.03709      0.00000      0.00042      0.03617      0.00000      
700     0.07953    0.01346    0.02620    0.00039      0.03947      0.00000      0.00039      0.03620      0.00000      
800     0.07668    0.01343    0.02615    0.00033      0.03677      0.00000      0.00040      0.03616      0.00000      
900     0.08001    0.01340    0.02612    0.00029      0.04020      0.00000      0.00039      0.03618      0.00000      
1000    0.07375    0.01334    0.02608    0.00023      0.03410      0.00000      0.00040      0.03619      0.00000      
1100    0.07375    0.01331    0.02603    0.00034      0.03406      0.00000      0.00038      0.03620      0.00000      
1200    0.07236    0.01321    0.02599    0.00031      0.03284      0.00000      0.00042      0.03620      0.00000      
1300    0.06837    0.01315    0.02594    0.00024      0.02904      0.00000      0.00040      0.03622      0.00000      
1400    0.07761    0.01313    0.02590    0.00052      0.03806      0.00000      0.00040      0.03622      0.00000      
1500    0.07606    0.01308    0.02588    0.00042      0.03668      0.00000      0.00041      0.03625      0.00000      
1600    0.07611    0.01304    0.02584    0.00045      0.03678      0.00000      0.00039      0.03622      0.00000      
1700    0.07910    0.01301    0.02580    0.00036      0.03994      0.00000      0.00041      0.03624      0.00000      
1800    0.07272    0.01299    0.02576    0.00029      0.03369      0.00000      0.00040      0.03628      0.00000      
1900    0.07633    0.01295    0.02572    0.00046      0.03720      0.00000      0.00043      0.03625      0.00000      
2000    0.07848    0.01292    0.02568    0.00039      0.03948      0.00000      0.00038      0.03627      0.00000      
2100    0.07572    0.01288    0.02564    0.00032      0.03688      0.00000      0.00039      0.03629      0.00000      
2200    0.07907    0.01282    0.02560    0.00030      0.04035      0.00000      0.00038      0.03631      0.00000      
2300    0.07282    0.01277    0.02556    0.00024      0.03425      0.00000      0.00039      0.03631      0.00000      
2400    0.07282    0.01276    0.02552    0.00033      0.03420      0.00000      0.00039      0.03631      0.00000      
2500    0.07148    0.01271    0.02548    0.00031      0.03297      0.00000      0.00043      0.03633      0.00000      
2600    0.06754    0.01269    0.02544    0.00024      0.02918      0.00000      0.00039      0.03634      0.00000      
2700    0.07674    0.01267    0.02541    0.00053      0.03814      0.00000      0.00040      0.03631      0.00000      
2800    0.07525    0.01262    0.02537    0.00043      0.03682      0.00000      0.00041      0.03639      0.00000      
2900    0.07530    0.01259    0.02535    0.00045      0.03691      0.00000      0.00039      0.03634      0.00000      
3000    0.07828    0.01257    0.02530    0.00034      0.04007      0.00000      0.00038      0.03635      0.00000      
3100    0.07186    0.01252    0.02528    0.00029      0.03377      0.00000      0.00041      0.03638      0.00000      
3200    0.07551    0.01249    0.02524    0.00045      0.03733      0.00000      0.00041      0.03639      0.00000      
3300    0.07772    0.01247    0.02521    0.00040      0.03964      0.00000      0.00038      0.03638      0.00000      
3400    0.07491    0.01244    0.02517    0.00033      0.03697      0.00000      0.00039      0.03638      0.00000      
3500    0.07828    0.01241    0.02512    0.00031      0.04044      0.00000      0.00038      0.03641      0.00000      
3600    0.07206    0.01240    0.02509    0.00024      0.03434      0.00000      0.00039      0.03640      0.00000      
3700    0.07204    0.01236    0.02506    0.00033      0.03430      0.00000      0.00039      0.03644      0.00000      
3800    0.07064    0.01233    0.02502    0.00030      0.03299      0.00000      0.00041      0.03640      0.00000      
3900    0.06677    0.01230    0.02500    0.00024      0.02923      0.00000      0.00039      0.03638      0.00000      
4000    0.07600    0.01228    0.02496    0.00053      0.03824      0.00000      0.00040      0.03641      0.00000      
4100    0.07451    0.01225    0.02493    0.00043      0.03690      0.00000      0.00040      0.03643      0.00000      
4200    0.07457    0.01224    0.02490    0.00046      0.03697      0.00000      0.00039      0.03641      0.00000      
4300    0.07756    0.01222    0.02489    0.00034      0.04012      0.00000      0.00039      0.03641      0.00000      
4400    0.07113    0.01218    0.02485    0.00029      0.03381      0.00000      0.00040      0.03645      0.00000      
4500    0.07481    0.01215    0.02481    0.00045      0.03740      0.00000      0.00041      0.03644      0.00000      
4600    0.07702    0.01212    0.02479    0.00040      0.03972      0.00000      0.00039      0.03643      0.00000      
4700    0.07421    0.01208    0.02475    0.00034      0.03704      0.00000      0.00039      0.03645      0.00000      
4800    0.07757    0.01205    0.02471    0.00032      0.04050      0.00000      0.00038      0.03646      0.00000      
4900    0.07139    0.01205    0.02470    0.00025      0.03440      0.00000      0.00039      0.03646      0.00000      
5000    0.07136    0.01202    0.02467    0.00032      0.03434      0.00000      0.00039      0.03647      0.00000      
5100    0.07002    0.01202    0.02464    0.00030      0.03307      0.00000      0.00041      0.03646      0.00000      
5200    0.06611    0.01199    0.02461    0.00023      0.02928      0.00000      0.00039      0.03647      0.00000      
5300    0.07537    0.01197    0.02458    0.00053      0.03829      0.00000      0.00040      0.03647      0.00000      
5400    0.07388    0.01194    0.02454    0.00044      0.03696      0.00000      0.00041      0.03650      0.00000      
5500    0.07394    0.01192    0.02452    0.00045      0.03704      0.00000      0.00039      0.03647      0.00000      
5600    0.07695    0.01193    0.02450    0.00034      0.04019      0.00000      0.00038      0.03647      0.00000      
5700    0.07054    0.01191    0.02447    0.00030      0.03386      0.00000      0.00040      0.03648      0.00000      
5800    0.07422    0.01188    0.02442    0.00046      0.03746      0.00000      0.00042      0.03648      0.00000      
5900    0.07641    0.01186    0.02440    0.00039      0.03975      0.00000      0.00038      0.03649      0.00000      
6000    0.07364    0.01184    0.02437    0.00035      0.03709      0.00000      0.00038      0.03648      0.00000      
6100    0.07700    0.01180    0.02434    0.00033      0.04054      0.00000      0.00039      0.03650      0.00000      
6200    0.07076    0.01178    0.02432    0.00024      0.03443      0.00000      0.00039      0.03650      0.00000      
6300    0.07076    0.01176    0.02429    0.00033      0.03438      0.00000      0.00039      0.03651      0.00000      
6400    0.06938    0.01173    0.02425    0.00030      0.03310      0.00000      0.00041      0.03651      0.00000      
6500    0.06549    0.01171    0.02424    0.00023      0.02931      0.00000      0.00038      0.03650      0.00000      
6600    0.07476    0.01170    0.02420    0.00053      0.03833      0.00000      0.00039      0.03650      0.00000      
6700    0.07326    0.01167    0.02417    0.00045      0.03697      0.00000      0.00040      0.03651      0.00000      
6800    0.07332    0.01166    0.02414    0.00045      0.03707      0.00000      0.00039      0.03651      0.00000      
6900    0.07637    0.01166    0.02411    0.00034      0.04026      0.00000      0.00039      0.03651      0.00000      
7000    0.06991    0.01165    0.02408    0.00028      0.03389      0.00000      0.00041      0.03655      0.00000      
7100    0.07368    0.01162    0.02407    0.00045      0.03754      0.00000      0.00043      0.03653      0.00000      
7200    0.07581    0.01160    0.02404    0.00041      0.03976      0.00000      0.00042      0.03653      0.00000      
7300    0.07307    0.01157    0.02400    0.00033      0.03717      0.00000      0.00039      0.03655      0.00000      
7400    0.07646    0.01155    0.02397    0.00034      0.04060      0.00000      0.00039      0.03653      0.00000      
7500    0.07021    0.01154    0.02394    0.00023      0.03449      0.00000      0.00039      0.03656      0.00000      
7600    0.07024    0.01153    0.02392    0.00033      0.03446      0.00000      0.00039      0.03655      0.00000      
7700    0.06881    0.01151    0.02389    0.00030      0.03310      0.00000      0.00041      0.03655      0.00000      
7800    0.06494    0.01150    0.02387    0.00024      0.02933      0.00000      0.00039      0.03654      0.00000      
7900    0.07421    0.01148    0.02384    0.00052      0.03837      0.00000      0.00039      0.03656      0.00000      
8000    0.07275    0.01146    0.02382    0.00043      0.03704      0.00000      0.00041      0.03657      0.00000      
8100    0.07279    0.01143    0.02378    0.00046      0.03712      0.00000      0.00040      0.03658      0.00000      
8200    0.07582    0.01142    0.02375    0.00033      0.04031      0.00000      0.00039      0.03657      0.00000      
8300    0.06936    0.01139    0.02374    0.00029      0.03394      0.00000      0.00040      0.03658      0.00000      
8400    0.07312    0.01137    0.02371    0.00045      0.03759      0.00000      0.00043      0.03656      0.00000      
8500    0.07526    0.01136    0.02369    0.00040      0.03981      0.00000      0.00038      0.03659      0.00000      
8600    0.07253    0.01135    0.02366    0.00034      0.03718      0.00000      0.00041      0.03658      0.00000      
8700    0.07591    0.01135    0.02364    0.00032      0.04060      0.00000      0.00039      0.03654      0.00000      
8800    0.06965    0.01132    0.02361    0.00023      0.03448      0.00000      0.00039      0.03657      0.00000      
8900    0.06971    0.01130    0.02358    0.00032      0.03451      0.00000      0.00038      0.03657      0.00000      
9000    0.06829    0.01130    0.02356    0.00030      0.03314      0.00000      0.00040      0.03656      0.00000      
9100    0.06436    0.01128    0.02353    0.00023      0.02933      0.00000      0.00039      0.03656      0.00000      
9200    0.07365    0.01126    0.02350    0.00052      0.03837      0.00000      0.00039      0.03656      0.00000      
9300    0.07220    0.01124    0.02347    0.00044      0.03706      0.00000      0.00041      0.03661      0.00000      
9400    0.07224    0.01122    0.02344    0.00045      0.03713      0.00000      0.00039      0.03656      0.00000      
9500    0.07527    0.01120    0.02341    0.00035      0.04031      0.00000      0.00040      0.03656      0.00000      
9600    0.06881    0.01119    0.02338    0.00030      0.03393      0.00000      0.00040      0.03658      0.00000      
9700    0.07255    0.01117    0.02335    0.00044      0.03759      0.00000      0.00042      0.03661      0.00000      
9800    0.07473    0.01117    0.02333    0.00041      0.03982      0.00000      0.00040      0.03657      0.00000      
9900    0.07196    0.01114    0.02330    0.00035      0.03717      0.00000      0.00038      0.03658      0.00000      
10000   0.07541    0.01114    0.02327    0.00034      0.04066      0.00000      0.00039      0.03658      0.00000      

---------------------------------------------------------------
Time used for training = 425.320282 s.
---------------------------------------------------------------


---------------------------------------------------------------
Finished running nep.
---------------------------------------------------------------

训练输出

9900    0.07196    0.01114    0.02330    0.00035      0.03717      0.00000      0.00038      0.03658      0.00000      
10000   0.07541    0.01114    0.02327    0.00034      0.04066      0.00000      0.00039      0.03658      0.00000      

---------------------------------------------------------------
Time used for training = 425.320282 s.
---------------------------------------------------------------


---------------------------------------------------------------
Finished running nep.
---------------------------------------------------------------

pyCUDA 实现《CUDA编程》

氩(Argon)分子模拟

CUDA-Programming-with-Python/src(CUDA-Programming-with-Python)/13-md/whole-code

# 用时4秒
!cd 'CUDA-Programming-with-Python/src(CUDA-Programming-with-Python)/13-md/whole-code' && python Ar.py
time used for equilibration =  4.015681028366089  s
time used for production =  2.834850788116455  s

Time used for training = 425.320282 s.


Finished running nep.



# pyCUDA 实现《CUDA编程》

## 氩(Argon)分子模拟

CUDA-Programming-with-Python/src(CUDA-Programming-with-Python)/13-md/whole-code


```python
# 用时4秒
!cd 'CUDA-Programming-with-Python/src(CUDA-Programming-with-Python)/13-md/whole-code' && python Ar.py
time used for equilibration =  4.015681028366089  s
time used for production =  2.834850788116455  s

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/317996.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

调试(c语言)

前言: 我们在写程序的时候可能多多少少都会出现一些bug,使我们的程序不能正常运行,所以为了更快更好的找到并修复bug,使这些问题迎刃而解,学习好如何调试代码是每个学习编程的人所必备的技能。 1. 什么是bug&#xf…

Python教程(23)——Python类中常用的特殊成员

在Python中,类特殊成员是指以双下划线开头和结尾的属性和方法,也被称为魔术方法(Magic methods)或特殊方法(Special methods)。这些特殊成员在类的定义中具有特殊的语法和功能,用于实现对象的特…

行为型设计模式——迭代器模式

迭代器模式 迭代器模式也是非常的简单&#xff0c;定义如下&#xff1a; 提供一个对象来顺序访问聚合对象中的一系列数据&#xff0c;而不暴露聚合对象的内部表示。 相信大家都使用过类似下面的迭代器&#xff1a; List<String> list new ArrayList<>(); Iterat…

3d建模软件有哪些?3d云渲染推荐

3D建模软件有很多&#xff0c;有的非常复杂难以上手&#xff0c;那么适合新手的有哪些呢&#xff1f;一起来看看吧。 1、SketchUp SketchUp是一个用户友好且直观的建模软件&#xff0c;能与V-Ray渲染器一起使用&#xff0c;适合初学者。2、Blender Blender是一个功能强大且免费…

图片无损放大神器PhotoZoom8 Pro中文破解版

摘要 BenVista PhotoZoom中文版是一款采用专利技术的图片无损放大软件&#xff0c;被誉为放大神器。该软件以其卓越的效果而著称&#xff0c;特别是在无锯齿、不失真的完美放大图像质量方面表现出色。 软件介绍 BenVista PhotoZoom中文版是一款采用专利技术的图片无损放大软…

视频封面提取工具,批量提取视频封面

你是否曾为从大量的视频中提取封面而感到困扰&#xff1f;传统的做法是逐个打开视频&#xff0c;然后手动截图。这不仅费时费力&#xff0c;还容易出错。现在&#xff0c;有了我们【媒体梦工厂】&#xff0c;这些烦恼全部消失。不论视频数量多少&#xff0c;一键即可批量提取&a…

sentinel熔断与限流

文章目录 一、sentinel简介Sentinel 是什么&#xff1f;Sentinel安装 二、sentinel整合工程新建cloudalibaba-sentinel-service8401微服务引入依赖yml配置主启动类添加EnableDiscoveryClient业务类测试 三、sentinel流控规则基本介绍流控模式直接&#xff08;默认&#xff09;关…

掌握WPF控件:熟练常用属性(一)

WPF布局常用控件&#xff08;一&#xff09; Border Border控件是一个装饰控件&#xff0c;用于围绕其他元素绘制边框和背景。它提供了一种简单的方式来为其他控件添加边框和背景样式&#xff0c;而无需自定义控件的绘制逻辑。 常用属性描述Background用于设置背景颜色或图像…

当浏览器输入url的时候会发生什么?

说在前面 当我们在浏览器中输入URL并按下回车时&#xff0c;背后发生了一系列神秘的操作。本文将带您深入了解&#xff0c;从URL解析到页面渲染&#xff0c;揭秘浏览器输入URL的完整流程。 具体步骤 当浏览器输入URL时&#xff0c;一般经过以下细节步骤&#xff1a; 1、引言 …

通用外设-2.8‘TFT屏的使用

前言 一、验证连接是否正确 二、更改自己想用的图像 1.取模软件 Image2Lcd 2.9 的使用 2.使用 总结 前言 本文在中景园的代码上改写而来&#xff0c;主要记录下使用记录 一、验证连接是否正确 1.按内容说明进行线路连接 2.运行程序&#xff0c;因为内部有图片样本&…

Elasticsearch聚合优化 | 聚合速度提升5倍!

1、聚合为什么慢&#xff1f; 大多数时候对单个字段的聚合查询还是非常快的&#xff0c; 但是当需要同时聚合多个字段时&#xff0c;就可能会产生大量的分组&#xff0c;最终结果就是占用 Elasticsearch大量内存&#xff0c;从而导致 OOM 的情况发生。 实践应用发现&#xff0…

飞鱼CRM接入第三方系统 飞鱼API对接详细教程

场景描述 在白码低代码开发平台中&#xff0c;是支持外部crm系统的线索通过接口流入到白码系统里面&#xff0c;换而言之&#xff0c;只要外部的系统有线索api接口&#xff0c;白码系统可以接收线索并在白码系统上进行后续操作。本文以飞鱼crm系统为例&#xff0c;讲解如何接收…

LeetCode讲解篇之78. 子集

文章目录 题目描述题解思路题解代码 题目描述 题解思路 初始化一个start变量记录当前从哪里开始遍历搜索nums 搜索过程的数字组合加入结果集 然后从start下标开始遍历nums&#xff0c;更新start&#xff0c;递归搜索 直到搜索完毕&#xff0c;返回结果集 题解代码 class …

Open3D 获取点云坐标最值(17)

Open3D 获取点云坐标最值(17) 一、算法介绍二、算法实现1.代码2.结果人生天地间,忽如远行客 一、算法介绍 快速获取点云块,沿着 x y z 各方向的坐标最值,这些在点云处理中的应用范围是如此广泛,这也是点云最常被用到的关键信息,后续的很多算法都会设置到这一处理方法。…

学习selenium+python使用 XPath 表达式来实现找到目标元素时智能封装等待,执行测试代码启动Chrome浏览器后,地址栏只显示data;

背景 学习使用 XPath 表达式来实现找到目标元素时智能封装等待执行测试代码启动Chrome浏览器后&#xff0c;地址栏只显示data&#xff1b; 代码如下 import unittest from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from …

关于Quartz远程调用服务方法失败如何解决,@Inner详细介绍

1.单独在要调用服务的controller写上相关方法&#xff08;Inner(value true)要走aop&#xff0c;会检测是否有内部调用标识&#xff09;具体见下述 2. 编写Feign远程调用的接口&#xff0c;注意加上RequestHeader(SecurityConstants.FROM) String from。因为inner(value true…

OpenCV 基于C++图像读取及存储API函数

OpenCV可以从存储介质中读入图像&#xff0c;也可以将摄像头(Camera)抓取的图像载入内存&#xff0c;然后进行处理。而存储图像就是将内存中的图像数据写入存储介质中&#xff0c;如写入硬盘、优盘等。 OpenCV要读入图像、操作图像。首先要用到Mat类&#xff0c;并且需创建Mat对…

飞桨分子动力学模拟-论文复现第六期:复现TorchMD

飞桨分子动力学模拟-论文复现第六期&#xff1a;复现TorchMD Paddle for MD 飞桨分子动力学模拟科学计算 复现论文-TorchMD: A deep learning framework for molecular simulations 本项目可在AIStudio一键运行&#xff1a;飞桨分子动力学模拟PaddleMD-复现TorchMD 【论文复…

【STM32】HAL库的RCC复位状态判断及NVIC系统软件复位

【STM32】HAL库的RCC复位状态判断及NVIC系统软件复位 在实际开发中 有时候会遇到复位状态不同 导致结果不同的情况 比如在上电复位时 电压不稳定 可能导致一些外部芯片无法正常工作 从而导致进行了错误的操作流程 所以 可以在程序运行后 加一个复位状态判断 用来检测是否正常复…

linux 如何创建文件

我们在写一些教程的时候&#xff0c;经常会需要创建一些用于演示的文档&#xff0c;这些文档往往需要填充一些不特定的内容。那么如何快速的创建演示用的文档呢&#xff1f; docfaker.py docfaker.py是一个py脚本&#xff0c;用于创建一个简单的txt文档&#xff0c;docfaker.…
最新文章