megmcca / FitSNAP

Software for generating SNAP machine-learning interatomic potentials
GNU General Public License v2.0
0 stars 0 forks source link

EXTRAS group settings update not *fully working in library mode #2

Open megmcca opened 1 year ago

megmcca commented 1 year ago

The EXTRAS section in the input file:

[EXTRAS] dump_dataframe = 0

Following code only dumps the dataframe:

input_snap = "fs_snap_ti-w_ego.in"
input_file = input_snap
if not os.path.exists("FitSNAP.df"):
 # Create a FitSnap instance using the communicator and settings:
  fitsnap = FitSnap(input_snap, comm=comm, arglist=["--overwrite"])

  conf = fitsnap.config.sections
  conf["EXTRAS"].dump_dataframe = 1
  conf["EXTRAS"].dump_descriptors = 1
  conf["EXTRAS"].dump_weights = 1
  conf["EXTRAS"].dump_truth = 1

Descriptors.npy, Weights.npy, and Truths.npy are not being output.

I have confirmed that changing the input file settings manually successfully outputs these files.

testing code at: ... /ego1_snap/fit2_hps_no-smartweights/fixed_weights_1E-10F/run.1/ Maybe this is because dump_dataframe is the only variable already instantiated? Next test: try dump_descriptors = 0. If that works, then the fix will be in the init for the configuration file Extras are only for linear fits I think so watch for that.

megmcca commented 12 months ago

Drew warned us in his FitSNAP + MPI chat not to change the conf. object Sounds like maybe an MPI or mutable vs immutable datatype issue WE might want to implement some kind of in-place configurable config file object... maybe with some kind of "update" function embedded in it