mhoffman / kmos

kMC on steroids: A vigorous attempt to make lattice kinetic Monte Carlo modelling easier

Home Page:http://mhoffman.github.com/kmos/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Monitoring the diffusion path of an adatom

DMahlberg opened this issue · comments

Hello Max,

I have problems in extracting the information I need from a kmos simulation. I am running a diffusion only model with one atom adsorbed on a surface and want to monitor the path of this adatom or write the coordinations of the adatom of each step.
When I got it right the command "model.get_atoms()" contains the critical information when I run the model the API way, but until now I was not able to get it.
Is this somehow the right way to get the coordinates or is there a simple command which I did not find yet.

Thanks,
David

Hi David,
As far as I know, there is no method for keeping track of positions of adsorbates. For the different processes you specify, kmos only stores the total number of executions of each process, not the order in which they were executed (this would require way too much memory for typical simulations of e.g. 1e10 steps). This means that you will only be able to extract averaged information, e.g. if the molecule on average diffused more in one direction than another direction during your simulation.
I am not sure why you would need such detailed information as the exact coordinates of the atoms? Perhaps you could explain a bit more about what physical insight you hope to get from the simulation?
Best,
Mie

Methods to efficiently monitor and store a system's trajectory are indeed not released, but currently under development.
However, there are ways of monitoring a system's trajectory in not so efficient ways. A straightforward way is to look at the output of model.get_atoms() in each kmc step. This is going to be very inefficient.
An alternative (not ideal, but better) way of doing this, would be to monitor procstat (the number of times each process has been executed) after each kmc step. The function you want is model.base.get_procstat. This function takes the index of the process. You can get this from variables under model.proclist named after the processes you defined (i..e. if you have a process that is called Diff_left, you will find the index of this process under model.proclist.diff_left). So, to get how many times your particle has taken a step to the left, you can call model.base.get_procstat(model.proclist.diff_left). Doing this for each kmc_step will be slow in general, but could be good enough for a simple model like the one you mentioned.
I hope this is clear enough, if you need more clarifications please ask again (I could write a short snippet).
Of course, as Mie said, knowing more about your intended application could help us give more hints on how this could be more efficiently tackled.

Best
Juan

NOTE: This issue is related to #24

Hi,
thanks a lot for your quick responds. My idea was to plot the path of the adsorbate like a random walk as introduction of my system and how KMC works. That is why I chose the adsorption of one atom on a surface as a simple model. After that I am interested in vacancy diffusion of RuPt/Ru(0001) surface alloys, but this topic I did not tackle, yet.
You are right its a bit cumbersome, but I managed to do a simple plot.

Best,
David