Open liqiang4567 opened 3 months ago
@xiaoruiDong have you seen something like this before?
I haven't. The error is raised on this line.
https://github.com/ReactionMechanismGenerator/RMG-Py/blob/036ab3f8ca0f94f567b50b0b83110bab0a14a35f/rmgpy/species.py#L796C9-L796C51
if isinstance(self.molecule[0], Molecule):
This implies that the species object has no defined corresponding molecular structure. Without such information, RMG cannot estimate its transport properties. I think the problem can be solved by providing a molecular identifier (either SMILES or InChI) when defining the species in the input file. For example:
species('C2H2', 'C#C.py', structure=SMILES('C#C'))
species('C5H5', 'C1=C[CH]C=C1.py', structure=SMILES('C1=C[CH]C=C1'))
species('C7H7', '[CH]=CC1C=CC=C1.py', structure=SMILES('[CH]=CC1C=CC=C1'))
@liqiang4567 Can you try this out and report if it solves your problem? Thanks.
Thank you very much for your answer, the program is running normally. But I have one doubt:
Transport data (such as Lennard-Jones parameters) are needed to compute the collision frequency. RMG uses molecular structure to estimate the transport data using Joback group additivity (see RMG database paper for more details). You can compute them instead of estimating them, e.g., through the approach elaborated in this paper, but it requires extra calculations beyond the QM calculation you have done.
Thank you for your reply. If I can get the Transport data, I don't need the structure. Can you write it like this?
species('C2H2', 'C#C.py',collisionModel = TransportData(sigma=(4.35,'angstrom'), epsilon=(2353.39,'J/mol')))
species('C5H5', 'C1=C[CH]C=C1.py',collisionModel = TransportData(sigma=(5.71,'angstrom'), epsilon=(3411.73,'J/mol')))
species('C7H7', '[CH]=CC1C=CC=C1.py',collisionModel = TransportData(sigma=(6.03,'angstrom'), epsilon=(3667.12,'J/mol')))
But there seems to be a mistake:
Calculating densities of states for C2H2_net + C5H5_net <=> C7H7_net network...
Using 1358 grains from 450.94 to 871.80 kJ/mol in steps of 0.31 kJ/mol to compute densities of states
Calculating phenomenological rate coefficients for C2H2 + C5H5 <=> C7H7...
Using 500 grains from 450.94 to 605.70 kJ/mol in steps of 0.31 kJ/mol to compute the k(T,P) values at 200 K
Traceback (most recent call last):
File "../../Arkane.py", line 59, in <module>
arkane.execute()
File "/rmg/RMG-Py/arkane/main.py", line 284, in execute
job.execute(output_file=output_file, plot=self.plot)
File "/rmg/RMG-Py/arkane/pdep.py", line 290, in execute
self.K = self.network.calculate_rate_coefficients(self.Tlist.value_si, self.Plist.value_si, self.method)
File "/rmg/RMG-Py/rmgpy/pdep/network.py", line 268, in calculate_rate_coefficients
self.set_conditions(T, P)
File "/rmg/RMG-Py/rmgpy/pdep/network.py", line 449, in set_conditions
self.calculate_collision_model()
File "/rmg/RMG-Py/rmgpy/pdep/network.py", line 907, in calculate_collision_model
coll_freq[i] = isomer.calculate_collision_frequency(self.T, self.P, self.bath_gas)
File "rmgpy/pdep/configuration.pyx", line 174, in rmgpy.pdep.configuration.Configuration.calculate_collision_frequency
File "rmgpy/pdep/configuration.pyx", line 200, in rmgpy.pdep.configuration.Configuration.calculate_collision_frequency
AttributeError: 'NoneType' object has no attribute 'value_si'
From what I can tell, it complains about missing molecular weights https://github.com/ReactionMechanismGenerator/RMG-Py/blob/036ab3f8ca0f94f567b50b0b83110bab0a14a35f/rmgpy/pdep/configuration.pyx#L200
I think this is an unexpected behavior, as it should be inferred from the calculation. Anyway, can you try explicitly assigning molecular weights to the species as a temporary workaround?
I have added molecularWeight, and even though this should be able to be obtained from the calculation, an error still appears:
Calculating densities of states for C2H2_net + C5H5_net <=> C7H7_net network...
Using 1358 grains from 450.94 to 871.80 kJ/mol in steps of 0.31 kJ/mol to compute densities of states
Calculating phenomenological rate coefficients for C2H2 + C5H5 <=> C7H7...
Using 500 grains from 450.94 to 605.70 kJ/mol in steps of 0.31 kJ/mol to compute the k(T,P) values at 200 K
Using 500 grains from 450.94 to 672.22 kJ/mol in steps of 0.44 kJ/mol to compute the k(T,P) values at 400 K
Using 500 grains from 450.94 to 705.48 kJ/mol in steps of 0.51 kJ/mol to compute the k(T,P) values at 500 K
Using 500 grains from 450.94 to 738.73 kJ/mol in steps of 0.58 kJ/mol to compute the k(T,P) values at 600 K
Using 500 grains from 450.94 to 771.99 kJ/mol in steps of 0.64 kJ/mol to compute the k(T,P) values at 700 K
Using 500 grains from 450.94 to 805.25 kJ/mol in steps of 0.71 kJ/mol to compute the k(T,P) values at 800 K
Using 500 grains from 450.94 to 838.51 kJ/mol in steps of 0.78 kJ/mol to compute the k(T,P) values at 900 K
Using 500 grains from 450.94 to 871.76 kJ/mol in steps of 0.84 kJ/mol to compute the k(T,P) values at 1000 K
Saving pressure dependence results for network C2H2_net + C5H5_net <=> C7H7_net...
Traceback (most recent call last):
File "../../Arkane.py", line 59, in <module>
arkane.execute()
File "/rmg/RMG-Py/arkane/main.py", line 284, in execute
job.execute(output_file=output_file, plot=self.plot)
File "/rmg/RMG-Py/arkane/pdep.py", line 295, in execute
self.save(output_file)
File "/rmg/RMG-Py/arkane/pdep.py", line 473, in save
f.write("#" + spc.label + " SMILES: " + spc.molecule[0].to_smiles() + "\n")
IndexError: list index out of range
Then I would suggest adding structure information back (e.g., structure=SMILES('C#C')
), as indicated by documentation (structure
is required) and the error. It is needed to write the output files. Since you have provided the collisionModel
, Arkane will only use the structure information to write output files.
Thank you for catching the issues. We will fix the bug related to molecular weights and update the documentation accordingly.
Ok, thank you very much for your reply
@xiaoruiDong which species were actually causing the problem (Arkane not being able to get their Molecular Weight on its own)?
This issue is being automatically marked as stale because it has not received any interaction in the last 90 days. Please leave a comment if this is still a relevant issue, otherwise it will automatically be closed in 30 days.
Topic
General area which your question is related to.
Question
I want to obtain the pressure-dependent rate coefficients of C2H2 + C5H5 = C7H7 through Arkane and obtain the relevant information through the gaussian software. An IndexError: list index out of range error occurred
Automated Reaction Kinetics and Network Exploration (Arkane) Version: 3.2.0 RMG Installed via docker