-
Notifications
You must be signed in to change notification settings - Fork 35
Explicit output of kmc trajectory? #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
2015-04-16 15:31 GMT-07:00 xunhuazhao [email protected]:
Please have a look at the documentation here first : Dr. Max J. Hoffmann |
Hi, I look that chapter (1.6) and feel that the description is not very clear to me (Sorry). It looks that there are two API ways to run a kmos simulation--one is run though a python script, the other one is "interact directly with model" by input commands in a sequence, is this correct? I tried the following script, some warnings came out without any error message, I did not see any output file. I tried also start from "kmos shell" and the command "model = KMC_Model(print_rates=False, banner=False)" leads to an error message:"name 'KMC_Model' is not defined". Furthermore, I input "from kmos.run import KMC_Model" and again "model = KMC_Model(print_rates=False, banner=False)", it gave me another error message"Fortran runtime error: Attempting to allocate already allocated variable 'nr2lattice'". It will be great if you can comment on the problem and describe a bit more about how one can start to run a kmos simulation in API way(s). Thank you. ####################################### from kmos.run import KMC_Model |
As Max is in PST and probably sleep right now, maybe I can take the liberty of commenting in the main points in case it helps: (in reverse order) Alternatively, you can start your shell with 'ipython' and then doing 'from kmos.run import KMC_Model' and 'model=KMC_Model()'
Were you familiar with python before you found kmos? If not, it is really worthwhile to learn the basics somewhere to ease you way into building useful scripts to run kmos. Hope this helps, |
Thanks for your reply. I knew a bit about python. I run the above script by "python run.py" where run.py is its name. In the "kmos shell" way, I tried different commands. As you pointed out, some of them are not needed. The remaining problem is I have not got expected results. Nothing came out from "atoms = model.get_atoms(geometry=False)". What I would like to output are the current TOF and coverages. Thank you a lot! |
Ok. First of all, no output to the command line does not meant that 'nothing came out'. I suspect you actually get the atoms object. Then you need to look into the attributes of such object, doing atoms.occupation to see the results. This is explained in the tutorial, in the "Running the Model the API way" The error about the numerical precision* appears sometimes when you ask for an atoms object twice without doing any kmc_steps in between (or if you do a very small number... or if the rates of the different process in you model differ by several orders of magnitude). I must agree that the tutorial could be a bit more clear. However, all the critical information is there. Please take another look into it. |
Thanks a lot for your patient answers. |
No problem. Glad I could help. @mhoffman Hadn't you fixed the 'numerical precision too low' thing? |
Hi, after a quick reading the documentation and playing with simple models, I am still not clear about a few important things:
Thank you very much!
The text was updated successfully, but these errors were encountered: