LonxunQuantum / PWMLFF

GNU General Public License v3.0
16 stars 7 forks source link

python 与forturn代码读取MOVEMENT文件时只能读取nvt系综的MOVMENT,对于npt系综则会报错建议改进? #2

Closed gengxingze closed 10 months ago

gengxingze commented 2 years ago

如下nvt格式如下: 150 atoms,Iteration (fs) = 0.1000000000E+01, Etot,Ep,Ek (eV) = -0.2327785925E+06 -0.2328846490E+06 0.1060565200E+03, SCF = 35 MD_INFO: METHOD(1-VV,2-NH,3-LV,4-LVPR,5-NHRP) TIME(fs) TEMP(K) DESIRED_TEMP(K) AVE_TEMP(K) TIME_INTERVAL(fs) TOT_TEMP(K) 3 0.1000000000E+01 0.54699E+04 0.28000E+04 0.54699E+04 0.10000E+03 0.54699E+04
TOTAL MOMENTUM 0.78676E+01 0.69920E+01 0.73299E+01
MD_LV_INFO: Langevin Dynamics (NVT) Lattice vector (Angstrom) 0.1672190094E+02 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.1672190094E+02 0.0000000000E+00 0.0000000000E+00 0.0000000000E+00 0.1700000000E+02

pwmat的npt格式如下: 127 atoms,Iteration (fs) = 0.5000000000E+01, Etot,Ep,Ek (eV) = -0.1971945915E+06 -0.1972576343E+06 0.6304274262E+02, SCF = 19 MD_INFO: METHOD(1-VV,2-NH,3-LV,4-LVPR,5-NHRP) TIME(fs) TEMP(K) DESIRED_TEMP(K) AVE_TEMP(K) TIME_INTERVAL(fs) TOT_TEMP(K) 5 0.5000000000E+01 0.38403E+04 0.20000E+04 0.38403E+04 0.50000E+03 0.38403E+04
TOTAL MOMENTUM 0.33471E+01 0.33471E+01 0.33471E+01
MD_NH_INFO: Nose-Hoover Dynamics (NVT), IONS' THERMOSTAT VELOCITY(1/fs) 0.2368902175E-02
MD_NPT_INFO: Nose-Hoover + PR Dynamics (NPT), CELL'S THERMOSTAT VELOCITY(1/fs) PRESSURE(Hartree/bohr^3) AVE_PRESSURE(Hartree/bohr^3) TOT_PRESSURE(Hartree/bohr^3) LATTICE_VELOCITY -0.12499E-05 -0.38900E-04 -0.38900E-04 -0.38900E-04
-0.30925E+01 0.11254E-01 0.47449E-01 0.11254E-01 -0.31267E+01 0.19174E-01 0.47449E-01 0.19174E-01 -0.30502E+01
Lattice vector (Angstrom) 0.1327996758E+02 0.3037943490E-06 0.3052707706E-06 stress (eV): 0.167581E+02 0.389905E-01 -0.354184E+00 0.3037943490E-06 0.1327996758E+02 0.3045727593E-06 stress (eV): 0.389902E-01 0.171322E+02 -0.467912E-01 0.3052707706E-06 0.3045727593E-06 0.1327996758E+02 stress (eV): -0.354185E+00 -0.467948E-01 0.162993E+02 Pressure Internal(Hartree/bohr^3) -0.3896599214E-04 -0.9066074268E-07 0.8235515174E-06 -0.9066074268E-07 -0.3983601863E-04 0.1088035295E-06 0.8235515174E-06 0.1088035295E-06 -0.3789922486E-04 有可能npt系综在晶格项后多了压力项 stress (eV):而报错

以下是报错信息 warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}" forrtl: severe (59): list-directed I/O syntax error, unit 1101, file /data/home/gengxingze/work/mlff/Nb/KF/PWdata/data2/MOVEMENT Image PC Routine Line Source
gen_2b_feature.x 000000000041BBE9 Unknown Unknown Unknown gen_2b_feature.x 000000000044270D Unknown Unknown Unknown gen_2b_feature.x 000000000044076E Unknown Unknown Unknown gen_2b_feature.x 000000000041143E Unknown Unknown Unknown gen_2b_feature.x 000000000040378E Unknown Unknown Unknown libc.so.6 00002AFB4221C505 Unknown Unknown Unknown gen_2b_feature.x 00000000004036A9 Unknown Unknown Unknown forrtl: severe (59): list-directed I/O syntax error, unit 1101, file /data/home/gengxingze/work/mlff/Nb/KF/PWdata/data2/MOVEMENT Image PC Routine Line Source
gen_3b_feature.x 0000000000421A69 Unknown Unknown Unknown gen_3b_feature.x 000000000044858D Unknown Unknown Unknown gen_3b_feature.x 00000000004465EE Unknown Unknown Unknown gen_3b_feature.x 0000000000416C02 Unknown Unknown Unknown gen_3b_feature.x 000000000040378E Unknown Unknown Unknown libc.so.6 00002B5581640505 Unknown Unknown Unknown gen_3b_feature.x 00000000004036A9 Unknown Unknown Unknown forrtl: severe (59): list-directed I/O syntax error, unit 1101, file /data/home/gengxingze/work/mlff/Nb/KF/PWdata/data2/MOVEMENT Image PC Routine Line Source
write_egroup.x 0000000000410FA9 Unknown Unknown Unknown write_egroup.x 0000000000437ACD Unknown Unknown Unknown write_egroup.x 0000000000435B2E Unknown Unknown Unknown write_egroup.x 00000000004048DB Unknown Unknown Unknown write_egroup.x 000000000040274E Unknown Unknown Unknown libc.so.6 00002B5AE4E59505 Unknown Unknown Unknown write_egroup.x 0000000000402669 Unknown Unknown Unknown Traceback (most recent call last): File "main_nn.py", line 31, in kfnn_trainer.generate_data() File "/data/home/gengxingze/Program/PWmatMLFF-master/src/PWmatMLFF/nn_network.py", line 328, in generate_data seper.main() File "/data/home/gengxingze/Program/PWmatMLFF-master/src/PWmatMLFF/../pre_data/seper.py", line 211, in main write_natoms_dfeat() File "/data/home/gengxingze/Program/PWmatMLFF-master/src/PWmatMLFF/../pre_data/seper.py", line 31, in write_natoms_dfeat max_natom = int(np.loadtxt(os.path.join(pm.OutputPath, 'max_natom'))) File "/data/home/gengxingze/Program/anaconda3/envs/mlff/lib/python3.8/site-packages/numpy/lib/npyio.py", line 1313, in loadtxt arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter, File "/data/home/gengxingze/Program/anaconda3/envs/mlff/lib/python3.8/site-packages/numpy/lib/npyio.py", line 955, in _read fh = np.lib._datasource.open(fname, 'rt', encoding=encoding) File "/data/home/gengxingze/Program/anaconda3/envs/mlff/lib/python3.8/site-packages/numpy/lib/_datasource.py", line 193, in open return ds.open(path, mode, encoding=encoding, newline=newline) File "/data/home/gengxingze/Program/anaconda3/envs/mlff/lib/python3.8/site-packages/numpy/lib/_datasource.py", line 533, in open raise FileNotFoundError(f"{path} not found.") FileNotFoundError: /data/home/gengxingze/work/mlff/Nb/KF/output/max_natom not foun

LonxunQuantum commented 1 year ago

正在调试