ReactionMechanismGenerator / RMG-Py

Python version of the amazing Reaction Mechanism Generator (RMG).
http://reactionmechanismgenerator.github.io/RMG-Py/
Other
397 stars 228 forks source link

ValueError: Species(label="...") is not in list #600

Closed alongd closed 8 years ago

alongd commented 8 years ago

I got an error (after sim convergence) that seems to be related to pruning (I added line breaks for readability):

At time 1.0000e-03 s, reached target termination time.

Traceback (most recent call last):
  File "/home/alongd/ws/RMG-Py/rmg.py", line 165, in <module>
    rmg.execute(inputFile, output_dir, **kwargs)
  File "/home/alongd/ws/RMG-Py/rmgpy/rmg/main.py", line 589, in execute
    self.reactionModel.prune(self.reactionSystems, self.fluxToleranceKeepInEdge, self.maximumEdgeSpecies, self.minSpeciesExistIterationsForPrune)
  File "/home/alongd/ws/RMG-Py/rmgpy/rmg/model.py", line 1134, in prune
    index = self.edge.species.index(spec)
ValueError: 
Species(index=76, label="C(C)[NH]", 
thermo=NASA(polynomials=[NASAPolynomial(coeffs=[3.07655,0.0146361,1.59432e-05,-2.83982e-08,1.13719e-11,17287.5,13.0493], 
Tmin=(100,'K'), Tmax=(967.272,'K')), NASAPolynomial(coeffs=[6.63585,0.0139417,-4.72846e-06,8.38819e-10,-5.89095e-14,15942.9,-7.39521], 
Tmin=(967.272,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(143.418,'kJ/mol'), comment="""Thermo library: CHN + radical(Cs_P)"""), 
conformer=Conformer(E0=(143.418,'kJ/mol'), modes=[HarmonicOscillator(frequencies=([2750,2850,1437.5,1250,1305,750,350,2750,2800,2850,1350,1500,750,1050,1375,1000,4000,4000,4000],'cm^-1')), 
HinderedRotor(inertia=(0.452885,'amu*angstrom^2'), symmetry=1, barrier=(22.5298,'kJ/mol'), semiclassical=False), HinderedRotor(inertia=(0.452895,'amu*angstrom^2'), 
symmetry=1, barrier=(22.5298,'kJ/mol'), semiclassical=False)], spinMultiplicity=2), molecule=[Molecule(SMILES="C(C)[NH]")], transportData=TransportData(shapeIndex=2, 
epsilon=(1971.36,'J/mol'), sigma=(5.118e-10,'m'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, 
comment="""Epsilon & sigma estimated with fixed Lennard Jones Parameters. This is the fallback method! Try improving transport databases!"""), 
molecularWeight=(44.0758,'amu'), energyTransferModel=SingleExponentialDown(alpha0=(3.5886,'kJ/mol'), T0=(300,'K'), n=0.85)) is not in list

My input file was set to

model(
    toleranceKeepInEdge=0,
    toleranceMoveToCore=0.1,
    toleranceInterruptSimulation=1e10,
    maximumEdgeSpecies=300000
)

I got this error when I seeded one reaction to a work that did not produce any errors prior to this addition. The reaction I added (H + NCO <=> NCOH) worked well with other simulations. The C(C)[NH] species mentioned in the error (a simple radical of ethylamine) appears in many of my simulations, so I wouldn't suspect there's something particularly wrong with the way RMG handles it. However, RMG did crash on it.

I used PDep in this work, which recently was mentioned to conflict with pruning (issue #490).

soumsrani commented 8 years ago

Hi, I used RMG ver 1.0.4. I am having similar error as above, but in my case the model is not converged. The error is shown below. The input and stdout.txt files are attached. Any suggestions as to how to resolve this error? Thank you.

stdout.txt

input.txt

Conducting simulation of reaction system 5...
At time 2.9579e-02 s, species [C]#CC#C(2810) exceeded the minimum rate for moving to model core
    Characteristic rate: 2.5901e+00 mol/m^3*s
    [C]#CC#C(2810) rate: 1.3044e+00 mol/m^3*s (0.5036)
    PDepNetwork #1391 leak rate: 1.3010e+00 mol/m^3*s (0.5023)
At time 5.0000e-02 s, reached target termination time.

Traceback (most recent call last):
  File "/home/soumyag/workspace/RMG-Py/rmg.py", line 165, in <module>
    rmg.execute(inputFile, output_dir, **kwargs)
  File "/home/soumyag/workspace/RMG-Py/rmgpy/rmg/main.py", line 593, in execute
    self.reactionModel.prune(self.reactionSystems, self.fluxToleranceKeepInEdge, self.maximumEdgeSpecies, self.minSpeciesExistIterationsForPrune)
  File "/home/soumyag/workspace/RMG-Py/rmgpy/rmg/model.py", line 1133, in prune
    index = self.edge.species.index(spec)
ValueError: Species(index=2798, label="[CH]=[C]C#C", thermo=NASA(polynomials=[NASAPolynomial(coeffs=[2.53264,0.0269958,-3.04872e-05,1.76606e-08,-3.72335e-12,74012.9,13.51], Tmin=(100,'K'), Tmax=(1422.33,'K')), NASAPolynomial(coeffs=[8.18732,0.00427854,6.57397e-07,-3.05879e-10,2.66597e-14,73093.7,-13.3395], Tmin=(1422.33,'K'), Tmax=(5000,'K'))], Tmin=(100,'K'), Tmax=(5000,'K'), E0=(614.901,'kJ/mol'), comment="""Thermo library: DFT_QCI_thermo + radical(C=C=CJ) + radical(C=C=CJ)"""), conformer=Conformer(E0=(614.901,'kJ/mol'), modes=[HarmonicOscillator(frequencies=([540,563.333,586.667,610,1970,2140,182.461,249.239,821.659,2007.63,2008.53,2009.86],'cm^-1'))], spinMultiplicity=3), molecule=[Molecule(SMILES="[CH]=C=C=[CH]"), Molecule(SMILES="[CH]=[C]C#C")], transportData=TransportData(shapeIndex=2, epsilon=(3010.21,'J/mol'), sigma=(5.08147,'angstroms'), dipoleMoment=(0,'C*m'), polarizability=(0,'angstroms^3'), rotrelaxcollnum=0, comment="""Epsilon & sigma estimated with Tc=470.19 K, Pc=52.06 bar (from Joback method)"""), molecularWeight=(50.0587,'amu'), energyTransferModel=SingleExponentialDown(alpha0=(3.5886,'kJ/mol'), T0=(300,'K'), n=0.85)) is not in list
 error number =    22, message level =     1
 i1 =      110
 dbolsm(). more than (i1)=itmax iterations solving bounded least squares problem.
 error number =    22, message level =     1
 i1 =      115
 dbolsm(). more than (i1)=itmax iterations solving bounded least squares problem.
 error number =    22, message level =     1
 i1 =      110
 dbolsm(). more than (i1)=itmax iterations solving bounded least squares problem.
 error number =    22, message level =     1
 i1 =       95
 dbolsm(). more than (i1)=itmax iterations solving bounded least squares problem.
 error number =    22, message level =     1
 i1 =      115
 dbolsm(). more than (i1)=itmax iterations solving bounded least squares problem.
 error number =    22, message level =     1
 i1 =      120