Skip to content

Conversation

@LauriKurki
Copy link
Contributor

This is a rather large PR with a lot of changes

  • add modules pyPPSTM/STMutils.py and pyPPSTM/visualization.py that contain all the functionalities previously in PPSTM_simple.py
  • STM settings are now read from a .toml file
  • add script run_ppstm.py that uses the functions from the above modules
    1. read settings
    2. get tip orbital coefficients
    3. read eigenenergies and coefficients
    4. (optional) read input_plot.xyz
    5. get/calculate tip positions
    6. run scan
    7. output
  • update all the tests by removing duplicate scripts

@LauriKurki
Copy link
Contributor Author

I'm done with the updates now. All the tests have .toml files, and the run_tests.sh scripts for each test case have been updated correspondingly. I checked that all the tests run, but could you @ondrejkrejci also check if there's something that should be checked?

For now, the script is run with a command like this

python $PPSTM_PATH/ppstm_run.py config.toml

and there's a default/example config in configs/default.toml.

TODO:

  • documentation for the script (I will do this after the cli update Code reorganization #34 )
  • at the moment, the code requires all the config options to be defined in the configuration file. This should be changed so that user can only define what they really want, and otherwise use default parameters

@LauriKurki LauriKurki marked this pull request as ready for review September 30, 2024 14:56
@ondrejkrejci
Copy link
Contributor

I had forget about this - is this an active one? Sorry.

Copy link
Contributor

@ondrejkrejci ondrejkrejci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, looks very good, comments in the files themselves. Sorry for my delay!

return eig;

def cut_eigenenergies(eig):
def cut_eigenenergies(eig, cut_min, cut_max):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While, I am definitely for this one, I do not see, that the you would remove the global definitions at line 102 and 103. Would it be possible to remove them? If not, please add a comment so they should be removed in the future.


if __name__=='__main__':
# Get config file from command line
config_file = sys.argv[1]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add here a helper message, if there is no argv, or more than 1, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants