[ADF-LIST] ADF GUI帮助:Reaxff分子分数

Laurens Groot. Groot在SCM.com上

Dear Gayani,

This is not possible yet with the GUI. A script would be required to 
parse the .rxmolfra file.
A quick python implementation is as follows:


import sys

if (len(sys.argv) < 4):
     print("Incorrect number of arguments.")
     print("Usage: file.rxmolfra nstartmolecules mol1 [mol2 ...]")

filename = sys.argv[1]
nstartmolecules = sys.argv[2]
molecules = sys.argv[3:]
with open(filename) as f:
     for line in f:
         if "Iteration" in line:
             count = ['0'] * len(molecules)
             iteration = '0'
         if "Total number of molecules" in line:
         for imol, mol in enumerate(molecules):
             if " "+mol+" " in line:
                 words = line.split()
                 iteration = words[0]
                 count[imol] = str(float(words[1])/float(nstartmolecules))

To run it on the example from the tutorial:
python script.py Methane.rxmolfra 350 CH4 H2O CO2 > result.csv
You can import this in your favourite plotting program. We will probably 
have a way to plot this directly in our GUI with the next release...
I hope this answers your question.

Kind regards,

Op 9-10-2017 om 11:19 schreef Gayani Nadeera Pallewela (Dr):
> Dear All,
> As shown in the ADF tutorial I was able to obtain the molecular 
> fractions of the simulated system.
> I want to plot the ratio of *Number of particular molecular 
> type/Initial number of molecules* with the time.
> As I understood Max option give the absolute number of molecules.
> Is there any way that I can get Number of particular molecular 
> type/Initial number of molecules plot.
> Do I have to use a separate script to do this using  .rxmolfra file as 
> an input?
> Thanks and regards,
> Gayani
> ------------------------------------------------------------------------
> CONFIDENTIALITY: This email is intended solely for the person(s) named 
> and may be confidential and/or privileged. If you are not the intended 
> recipient, please delete it, notify us and do not copy, use, or 
> disclose its contents.
> Towards a sustainable earth: Print only when necessary. Thank you.
> _______________________________________________
> ADFlist mailing list
> ADFlist at scm.com
> //lists.tofoba.com/mailman/listinfo/adflist

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <//lists.tofoba.com/pipermail/adflist/attachments/20171013/0f2fa743/attachment-0001.html>