Dear,
though I try to use the MLFF from vasp train in lammps MD, I met several questions that confuse me.
I train a liquid system including 210 atoms(C H O S F elements) and the time is 10ps with 10000 steps and 1.0 fs timestep, I check the BEE force around 0.1. the local refer configurations for each element is 1500 and MLFFN is around 500MB size.
In order to increase the accuracy of ML_ff, I do a continuing train about 5ps by copying the ML_ABN to ML_AB in same directory. I find the local refer configurations were increased to 3000 for each element, and the size of MLFFN also was increased to 2.0GB.
After that I refit the ML_AB to produce a new ML_FFN with size 900MB.
I run "head -n 1 MLFF" :
ML_FF 0.2.4 binary { "date" : "2025-04-22T22:35:46.844", "ML_LFAST" : true, "ML_DESC_TYPE" : 0, "types" : [ "C", "H", "N", "S", "O", "F" ], "training_structures" : 937, "local_reference_cfgs" : [ 3000, 3000, 3000, 3000, 3000, 3000 ], "descriptors" : [ 3384, 3384, 3384, 3384, 3384, 3384 ], "ML_IALGO_LINREG" : 4, "ML_RCUT1" : 8.0000E+00, "ML_RCUT2" : 4.0000E+00, "ML_W1" : 1.0000E-01, "ML_SION1" : 5.0000E-01, "ML_SION2" : 5.0000E-01, "ML_LMAX2" : 2, "ML_MRB1" : 12, "ML_MRB2" : 8, "ML_IWEIGHT" : 3, "ML_WTOTEN" : 1.0000E+00, "ML_WTIFOR" : 1.0000E+00, "ML_WTSIF" : 1.0000E+00 }
I try to use the MLFF to run by fast mode ML_MODE=run,
a question is that a C-O bond of a CO2 molecule is elongated and O atom to connect another molecule, which is completely accepted.
I guess the MLFF is not good enough.
I try use the MLFF to run MD in lammps.
I transfer CONTCAR to lammps data. the input of lammps:
units metal
boundary p p p
atom_style atomic
neighbor 1.0 bin
#box tilt large
read_data lammps.data
#read_restart re.0001
#change_box all triclinic
pair_style vasp
pair_coeff * * ML_FF C H N S O F
#minimize 1.0e-8 1.0e-3 100 1000
thermo_style custom step temp pe ke etotal press density vol lx ly lz
thermo ${THERMO_FREQ}
dump 1 all custom ${DUMP_FREQ} traj_1.lammpstrj id element x y z
dump_modify 1 sort id element C H N S O F
# 修改这里,使用新的变量名 "my_restart"
if "${my_restart} == 0" then "velocity all create ${TEMP} 91162"
#fix shakeH all shake 0.0001 20 0 m 1.0
fix 1 all npt temp ${TEMP} ${TEMP} ${TAU_T} iso ${PRES} ${PRES} ${TAU_P}
#fix integ all nve
timestep 0.0005
run 100000
The partial output looks like:
pair_coeff vasp:
VASP ML force field file = ML_FF
Setting up force field ..... done.
VASP ML force field cutoff = 8.00 Angstrom
Please review the following mapping between LAMMPS and VASP types:
LAMMPS pair_coeff VASP | VASP force field
types names subtypes | types names subtypes
----------------------------------------- | -------------------------------------
1 <---> C <---> 0 | 0 <---> C <---> 0
2 <---> H <---> 1 | 1 <---> H <---> 1
3 <---> N <---> 2 | 2 <---> N <---> 2
4 <---> S <---> 3 | 3 <---> S <---> 3
5 <---> O <---> 4 | 4 <---> O <---> 4
6 <---> F <---> 5 | 5 <---> F <---> 5
15700 505.22182 -1224.4487 13.648755 -1210.7999 1674.0163 1.4761487 3111.3804 14.598818 14.598818 14.598818
15800 546.22062 -1225.557 14.756352 -1210.8006 -1028.1944 1.4761483 3111.3813 14.59882 14.59882 14.59882
15900 533.42156 -1225.2112 14.410581 -1210.8006 5479.2844 1.4761479 3111.3822 14.598821 14.598821 14.598821
16000 508.96702 -1224.55 13.749932 -1210.8001 4619.1342 1.4761474 3111.3832 14.598823 14.598823 14.598823
16100 494.2666 -1224.1516 13.352795 -1210.7988 7819.0835 1.476147 3111.3841 14.598824 14.598824 14.598824
16200 550.16959 -1225.6639 14.863035 -1210.8009 10320.977 1.4761465 3111.3851 14.598826 14.598826 14.598826
16300 618.126 -1227.5001 16.698903 -1210.8012 7140.2058 1.476146 3111.3862 14.598827 14.598827 14.598827
16400 599.40899 -1226.994 16.193256 -1210.8008 3606.5566 1.4761455 3111.3873 14.598829 14.598829 14.598829
16500 636.37172 -1227.9949 17.191818 -1210.8031 11478.587 1.4761449 3111.3884 14.598831 14.598831 14.598831
16600 654.13524 -1228.4758 17.671706 -1210.8041 6251.1666 1.4761444 3111.3897 14.598833 14.598833 14.598833
16700 642.05616 -1228.1485 17.345385 -1210.8031 7369.2303 1.4761437 3111.391 14.598835 14.598835 14.598835
16800 675.87658 -1229.0628 18.259056 -1210.8038 9191.8332 1.4761431 3111.3923 14.598837 14.598837 14.598837
16900 638.93611 -1228.0654 17.261096 -1210.8043 15190.561 1.4761424 3111.3938 14.598839 14.598839 14.598839
17000 693.18466 -1229.5321 18.72664 -1210.8054 6501.5941 1.4761417 3111.3953 14.598842 14.598842 14.598842
17100 665.01746 -1228.7716 17.965693 -1210.8059 5504.4758 1.4761409 3111.3969 14.598844 14.598844 14.598844
17200 721.40911 -1230.297 19.489134 -1210.8079 8959.58 1.4761401 3111.3986 14.598847 14.598847 14.598847
17300 732.77257 -1230.6067 19.796122 -1210.8106 3163.0704 1.4761393 3111.4004 14.59885 14.59885 14.59885
17400 799.1223 -1232.3994 21.588585 -1210.8108 9209.9105 1.4761384 3111.4022 14.598852 14.598852 14.598852
17500 725.92087 -1230.4185 19.611021 -1210.8075 8315.4944 1.4761375 3111.4041 14.598855 14.598855 14.598855
17600 750.55251 -1231.0881 20.276454 -1210.8116 12305.828 1.4761366 3111.406 14.598858 14.598858 14.598858
17700 784.66041 -1232.0129 21.197892 -1210.815 12238.272 1.4761356 3111.408 14.598862 14.598862 14.598862
17800 801.67132 -1232.4723 21.657448 -1210.8148 17981.297 1.4761347 3111.4101 14.598865 14.598865 14.598865
17900 856.8346 -1233.9604 23.147704 -1210.8127 20756.042 1.4761336 3111.4123 14.598868 14.598868 14.598868
18000 841.45634 -1233.5462 22.732255 -1210.8139 9916.2832 1.4761325 3111.4146 14.598872 14.598872 14.598872
18100 827.21255 -1233.1609 22.347453 -1210.8134 12458.282 1.4761313 3111.4171 14.598876 14.598876 14.598876
18200 754.05654 -1231.186 20.371117 -1210.8149 18191.639 1.4761301 3111.4196 14.59888 14.59888 14.59888
18300 784.37084 -1232.0069 21.190069 -1210.8168 8311.4562 1.4761289 3111.4223 14.598884 14.598884 14.598884
18400 872.83865 -1234.3955 23.580059 -1210.8155 10550.698 1.4761276 3111.4251 14.598888 14.598888 14.598888
18500 863.59042 -1234.146 23.330215 -1210.8158 6980.5667 1.4761262 3111.4279 14.598893 14.598893 14.598893
18600 937.9205 -1236.1575 25.33827 -1210.8192 10134.476 1.4761248 3111.4309 14.598897 14.598897 14.598897
18700 923.92954 -1235.7826 24.960299 -1210.8223 6652.9793 1.4761234 3111.4339 14.598902 14.598902 14.598902
18800 876.25692 -1234.4938 23.672405 -1210.8214 8949.3853 1.4761219 3111.4369 14.598907 14.598907 14.598907
18900 937.62486 -1236.1512 25.330283 -1210.821 8591.0753 1.4761204 3111.4401 14.598912 14.598912 14.598912
19000 905.45065 -1235.2838 24.461085 -1210.8227 7808.2088 1.4761189 3111.4434 14.598917 14.598917 14.598917
19100 1028.257 -1238.6033 27.778743 -1210.8246 16214.56 1.4761173 3111.4467 14.598922 14.598922 14.598922
19200 1106.3142 -1240.715 29.887487 -1210.8275 11827.452 1.4761157 3111.4502 14.598927 14.598927 14.598927
the temperatures are increased inordinately, the bonds are broken, which is not completely accepted.
may is thermostate problem, thus I change to langevin thermostat, fix thermostat all langevin ${TEMP} ${TEMP} ${TAU_T} 12345
fix barostat all nph iso ${PRES} ${PRES} ${TAU_P}
fix integ all nve
timestep 0.0005
run 100000
but the similar results were obtained.
Moreover, the run speed is very slow.
I strongly doubt the compatibility of these two codes, I wonder if you guys are testing, e.g. water system?