Closed shikharnigam8 closed 3 years ago
Could you confirm which version of RMG-Py and the database you're using? Looking at my versions, I can't see how to reproduce that error. For one thing, "RMG-Py/rmgpy/data/thermo.py", line 2450 is something else. And Perhaps your radical database is also different? (containing a NASA polynomial entry?)
@rwest I am using latest version of RMG and RMG-database. However, I have slightly modified the radical.py file to incorporate Si and C atoms with four unpaired electrons. I have also modified the chlorinated_hydrocarbon thermo library with more accurate data. I have attached the input file and other required database to reproduce the same error. database.zip
Essentially what's happening is that a NASA object (that doesn't have the is_all_zeros function) is getting pulled out of the groups for "Si(Q)" instead of a ThermoData object (that has the is_all_zeros function) all of the group data objects have to be ThermoData objects.
@shikharnigam8, following @mjohnson541's insight, if you added thermo for Si(Q), make sure it looks like a ThemoData object rather than a NASA object.
Try adding Si(Q) to a thermo library, and make sure that allowed=['input species','seed mechanisms','reaction libraries']
is specified under the species constraints block of the input file.
In your posted radical.py
you have this
entry(
index = 2093,
label = "Si(Q)",
group =
"""
1 Si u4 p0 c0
""",
thermo = NASA(
polynomials = [
NASAPolynomial(coeffs=[0.25003271E+01, 0.00000000E+00, 0.00000000E+00, 0.00000000E+00 ,0.00000000E+00,0.53382660E+05 ,0.38328969E+01], Tmin = (298,'K'), Tmax=(1500,'K')),
NASAPolynomial(coeffs=[0.25003271E+01, 0.00000000E+00, 0.00000000E+00,0.00000000E+00 ,0.00000000E+00 ,0.53382656E+05, 0.38328967E+01], Tmin = (1500,'K'), Tmax=(3000,'K')),
],
Tmin = (298,'K'),
Tmax = (3000,'K')
),
shortDesc = u"""""",
longDesc =
u"""
H298: ATcT version 1.110
level of theory energy: CCSD(T)F12A/cc-pVQZ-F12//CCSD(T)/cc-pVQZ
level of theory frequency: B3LYP/6-311++g(d,p)//B3LYP/6-311++g(d,p)
""",
)
You could convert it as Alon suggests, like this:
In [1]: from rmgpy.thermo import *
In [2]: thermo = NASA(
...: polynomials = [
...: NASAPolynomial(coeffs=[0.25003271E+01, 0.00000000E+00, 0.00000000E+00, 0.00000000E+00 ,0.0000
...: 0000E+00,0.53382660E+05 ,0.38328969E+01], Tmin = (298,'K'), Tmax=(1500,'K')),
...: ^I^I^INASAPolynomial(coeffs=[0.25003271E+01, 0.00000000E+00, 0.00000000E+00,0.00000000E+00 ,0.00000000E+0
...: 0 ,0.53382656E+05, 0.38328967E+01], Tmin = (1500,'K'), Tmax=(3000,'K')),
...: ],
...: Tmin = (298,'K'),
...: Tmax = (3000,'K')
...: )
In [3]: thermo.to_thermo_data()
Out[3]: ThermoData(Tdata=([300,400,500,600,800,1000,1500],'K'),
Cpdata=([20.7889,20.7889,20.7889,20.7889,20.7889,20.7889,20.7889],'J/(mol*K)'),
H298=(450.044,'kJ/mol'),
S298=(150.305,'J/(mol*K)'))
In doing this conversion I notice that you end up with H298=(450.044,'kJ/mol'), S298=(150.305,'J/(mol*K)')
which is close to the NASA webbook values making me think the data is for an Si atom itself.
The radical.py
file contains radical corrections that are applied using the Hydrogen Bond Increment approach.
If you want to just include the thermochemistry of atomic Si directly, put it in a thermo library, not this radical.py file.
To see what I mean, once you've got this to load correctly, evaluate the thermochemistry of an Si atom. It will probably come out strange. Putting something here would be helpful, to stop RMG crashing if it comes across Si not in a library, but you'll need to derive the necessary correction.
Also, I strongly encourage you to update the metadata such as the longDesc
to keep track of where this came from, even if you think nobody but your future self will ever see it. It seems you copied and pasted this from another entry without changing it. (I guess this because it says "H298: ATcT version 1.110" and I think Si isn't in the ATcT)
Thank you @rwest. It is working fine.
Bug Description
I am trying to simulate the mechanism for chlorinated carbon compounds. However, I encountered the following error during RMG simulation "
AttributeError: 'rmgpy.thermo.nasa.NASA' object has no attribute 'is_all_zeros'
"How To Reproduce
The error message is attached.
Expected Behavior
No error in the simulation. All thermo data is correct.
Installation Information
Describe your installation method and system information.
Additional Context