Closed TaoTaotheCreator closed 2 months ago
Hi!
If you have calculated the s and pxy scans with PPSTM_simple.py
, you can use the SUM_Orb_contrib.py
to tweak the exact orbital contributions you want.
i.e. here on lines 24 and 25 you should set tip_orb1 = 's'
and tip_orb2 = 'pxy'
and on lines 30-31 you can choose the ratios. Does this help or is there something more specific we can assist with?
Hi,
Two answers makes sense depending on a size of your system:
if the system is small (molecule, up to 30 atoms), go and try the calculations in the GUI that we have developed. You will get a pretty quick idea of what is going on.
if the system is big (you have also substrate, which needs to be huge, since we do not have working k-points version)
I would suggest to copy PPSTM_simple.py script twice to the directory you are working, one with name s
and one with pxy
. Adjust the parameters at the top of the files to what you need (dIdV or V-scan ... ) and set the output to npy
and then follow @LauriKurki 's suggestion about the SUM_Orb_Contrib.py
. Also I suggest to copy it to your working directory. As far as I remember, you can run it many times with different settings, it will name the outputs (just leave it to png) according to the orbitals and ratio used.
OK , I will have a try, thanks!
Also, if you have feeling, that we are missing documentation somewhere, please let us know!
I have installed PPAFM in the same environment of PPSTM, but the error came below:
writing npy binary files Traceback (most recent call last): File "pxy.py", line 374, in <module> io.saveNpy(name_file, didv[vv], lvec)#, head=XSF_HEAD_DEFAULT ) TypeError: saveNpy() missing 1 required positional argument: 'atomic_info'
Hi, this is looks like a bug in the PPSTM code. Could you please upload the pxy.py file and tell us, where is it comming from?
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: TaoTaotheCreator @.> Sent: Tuesday, September 10, 2024 6:21:28 am To: Probe-Particle/PPSTM @.> Cc: Krejci Ondrej @.>; Comment @.> Subject: Re: [Probe-Particle/PPSTM] The way of tuning tip-model orbital in random proportion (Issue #31)
I have installed PPAFM in the same environment of PPSTM, but the error came below:
writing npy binary files Traceback (most recent call last): File "pxy.py", line 374, in
— Reply to this email directly, view it on GitHubhttps://github.com/Probe-Particle/PPSTM/issues/31#issuecomment-2339529553, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADFZAFLV3W4DYNLARYPEBTDZVZQTBAVCNFSM6AAAAABN4A4PKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZZGUZDSNJVGM. You are receiving this because you commented.Message ID: @.***>
I think maybe the error lie in the positional argument are provided not enough, but I donot find the missing parameter.
Hi, you need to change line 374 and 377 accordingly. We will need to adjust the whole PPSTM_simple.py
Anyway, the best would be to git pull the latest PPSTM version, which has it repaired. And to create the pxy.py from the latest version of the PPSTM_simple.py
.
Yes, I got the latest PPSTM_simple.py, and it ran well!! But when I got the .npz files, I ran the SUM_Orb_contrib.py
, the error came as below:
Importing STM data for V: -2.0
Traceback (most recent call last):
File "SUM_Orb_Contrib.py", line 122, in <module>
tmp_stm1, lvec1, nDim1, atomic_info_or_head = io.load_scal_field( files_path+name_file1 ,data_format=data_format)
File "/public4/home/sc53074/software/anaconda3/envs/PPSTM1/lib/python3.7/site-packages/ppafm/io.py", line 933, in load_scal_field
data, lvec, atomic_info_or_head = loadNpy(fname)
File "/public4/home/sc53074/software/anaconda3/envs/PPSTM1/lib/python3.7/site-packages/ppafm/io.py", line 758, in loadNpy
atomic_info = (tmp_input["atoms"], tmp_input["lvec0"])
File "/public4/home/sc53074/software/anaconda3/envs/PPSTM1/lib/python3.7/site-packages/numpy/lib/npyio.py", line 256, in __getitem__
pickle_kwargs=self.pickle_kwargs)
File "/public4/home/sc53074/software/anaconda3/envs/PPSTM1/lib/python3.7/site-packages/numpy/lib/format.py", line 743, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False
Maybe it came from the contradict in the version of Numpy.
I tried to load a didv image from a .npz
file with numpy version 1.24.3 and I couldn't reproduce this. Could you confirm your version with pip freeze
?
My python version is 3.7 (as stated in wiki), maybe I need to update to higher python version to use the higher version Numpy?
Hi, it is not a numpy problem, it is actually bug comming from ppafm changes has not been implemented properly in PPSTM. We are working on it.
Hey @TaoTaotheCreator, there's a fix for this on the updated master branch, could you check if this problem is solved?
Okay:)
Yes, I got the simulated images using random tip orbital proportion. Thank you all!
Hi, I just trying to simulate STM images using different tip-model to compare with my experiments, and the wiki said
better is to calculate s and pxy in two separated runs and save it as npy or xsf. Then you can use SUM_Orb_Contrib.py script to print you any configurations between s and pxy tip-atom orbitals. This is possible, since contributions from different tip-atom orbitals can be simply summed-up.
, so could you please tell me the detailed way to get the random tip-model with any orbital proportions, such as 3%s 97%pxy? Thanks a lot!