stfc / janus

collection of scripts to train and generate data for machine learnt interatomic potentials
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Prevent duplicate data in input.nn #5

Closed ElliottKasoar closed 1 year ago

ElliottKasoar commented 2 years ago

Running controller.write_n2p2_nn multiple times appends input.nn with duplicate symmetry function sets if the same (or a similar) set of inputs is passed. Ideally the controller would avoid this e.g. by overwriting the relevant section, which would prevent duplicate functions, as well as allow sets of functions to be updated.

ElliottKasoar commented 2 years ago

To identify whether sets of symmetry functions already exist, there are (at least) two approaches: interpret the current form of input.nn based on the set title and variables listed, or add new, more explicit tags to each set.

The latter adds some duplicate information, but simplifies the identification both in terms of the required code and for users, making it clearer when a set is considered "new" or when a set will be updated.