Probe-Particle / ppafm

Classical force field model for simulating atomic force microscopy images.
MIT License
49 stars 18 forks source link

Implement `PpafmParameters` class based on `pydantic.BaseModel` #275

Closed yakutovicha closed 2 weeks ago

yakutovicha commented 5 months ago

fixes #232

ondrejkrejci commented 3 weeks ago

@yakutovicha - after the implementation - the note on the default/params.ini on this wiki should be removed.

yakutovicha commented 3 weeks ago

@NikoOinonen, I guess I can't avoid modifying AFMulator as it depends on the functions that were migrated already. Should I proceed?

NikoOinonen commented 3 weeks ago

@yakutovicha Sure, go ahead if it is necessary. Once you are done, I will take a look and maybe make a follow up PR if something should be changed.

yakutovicha commented 3 weeks ago

I believe this is done. Since the change is quite intrusive, I would like several people to take a look at this PR. Please try to break it and share an example of a simulation that was working before and doesn't work now.

mondracek commented 2 weeks ago

ppafm-plot-results fails with the --atoms option inside common.parseAtoms, which it calls in https://github.com/Probe-Particle/ppafm/blob/1f1e6f8f92e40edaf76fe3d3bd278f1dfaf393d3/ppafm/cli/plot_results.py#L120 Seems that passing the parameters by i_zs, r_s, _ = common.parseAtoms(atoms, elem_dict, autogeom=False, PBC=parameters.PBC, parameters=parameters) (adding the last argument parameters=parameters) would help.

yakutovicha commented 2 weeks ago

Seems that passing the parameters by i_zs, r_s, _ = common.parseAtoms(atoms, elem_dict, autogeom=False, PBC=parameters.PBC, parameters=parameters) (adding the last argument parameters=parameters) would help.

Thanks, done in https://github.com/Probe-Particle/ppafm/pull/275/commits/224231291dd2c9b1cd4f887ef515fadcd103532e

yakutovicha commented 2 weeks ago

I did all I was planning to do, so from my side the PR is ready.