brucefan1983 / NEP_CPU

CPU version of NEP
GNU General Public License v3.0
49 stars 15 forks source link

move coeff setting and type map from init to coeff #38

Closed BBBuZHIDAO closed 2 months ago

BBBuZHIDAO commented 2 months ago

FIX:write_data command throws an error

Reason:write_data and run will initialize lmp instance. But map_type will update local. When initialize the map_type once, the items in this map were already mapping to elements in potential file. image

Solution: Sure we could set a flag to make the map_type just update once or non-local. But check the code in other potentials, the coeff setting and type mapping are in coeff function. So I think the better solution is move it. init function should only initialize the neighbor list.

more GDB debug details here: input file: in.lammps.txt error: NEP_CPU.log fixed: NEP_CPU.fix.log

BBBuZHIDAO commented 2 months ago

init form write_data image init from run image