Skip to content
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

BM Tree Fitting Gets Stuck in a Loop #599

Open
sevyharris opened this issue Oct 26, 2022 · 1 comment
Open

BM Tree Fitting Gets Stuck in a Loop #599

sevyharris opened this issue Oct 26, 2022 · 1 comment

Comments

@sevyharris
Copy link
Contributor

I'm trying to refit the Disproportionation tree using some new training reactions I calculated. I tried using Matt's tree fitting script and it appears to be stuck in a loop. I don't know if I just haven't let it run long enough (tried 24 hours) or if there's a setting I need to change so it can break free.

I haven't figured out a good way to log the error, so here's a portion of what it keeps printing to the terminal:

3 *4 H u0 p0 c0 {1,S}
4    H u0 p0 c0 {1,S}
5    H u0 p0 c0 {1,S}
6    H u0 p0 c0 {2,S}
7    H u0 p0 c0 {2,S}

ERROR:root:C2H5-2
ERROR:root:C2H5-2
multiplicity 2
1    C u0 p0 c0 {2,S} {3,S} {4,S} {5,S}
2 *1 C u1 p0 c0 {1,S} {6,S} {7,S}
3    H u0 p0 c0 {1,S}
4    H u0 p0 c0 {1,S}
5    H u0 p0 c0 {1,S}
6    H u0 p0 c0 {2,S}
7    H u0 p0 c0 {2,S}

ERROR:root:C2H6
ERROR:root:C2H6
1 *1 C u0 p0 c0 {2,S} {3,S} {4,S} {5,S}
2    C u0 p0 c0 {1,S} {6,S} {7,S} {8,S}
3    H u0 p0 c0 {1,S}
4    H u0 p0 c0 {1,S}
5 *4 H u0 p0 c0 {1,S}
6    H u0 p0 c0 {2,S}
7    H u0 p0 c0 {2,S}
8    H u0 p0 c0 {2,S}

ERROR:root:C2H4
ERROR:root:C2H4
1 *3 C u0 p0 c0 {2,D} {3,S} {4,S}
2 *2 C u0 p0 c0 {1,D} {5,S} {6,S}
3    H u0 p0 c0 {1,S}
4    H u0 p0 c0 {1,S}
5    H u0 p0 c0 {2,S}
6    H u0 p0 c0 {2,S}

ERROR:root:Clearing Regularization Dimensions and Reattempting

Any help here is appreciated, thanks!

@sevyharris
Copy link
Contributor Author

If anyone wants to look at the exact script I'm using to refit it, here's my version of Matt's script:

import rmgpy
import numpy as np
from rmgpy.molecule.molecule import *
from rmgpy.species import *
from rmgpy.chemkin import *
from rmgpy.data.rmg import RMGDatabase
from rmgpy.data.thermo import ThermoLibrary
from rmgpy.rmg.react import react
from rmgpy.species import Species
from rmgpy.reaction import Reaction
from rmgpy.data.rmg import get_db
from rmgpy.molecule.group import Group
from rmgpy.kinetics.arrhenius import ArrheniusBM
import time

from rmgpy import settings


database = RMGDatabase()
database.load(
    path = settings['database.directory'],
    thermo_libraries = ['Klippenstein_Glarborg2016', 'BurkeH2O2', 'thermo_DFT_CCSDTF12_BAC',
        'DFT_QCI_thermo',
        'primaryThermoLibrary', 'primaryNS', 'NitrogenCurran', 'NOx2018', 'FFCM1(-)',
        'SulfurLibrary', 'SulfurGlarborgH2S','SABIC_aromatics'],
    transport_libraries = [],
    reaction_libraries = [],
    seed_mechanisms = [],#['BurkeH2O2inN2','ERC-FoundationFuelv0.9'],
    #kinetics_families = 'all',,
    kinetics_families = ['Disproportionation'],
    kinetics_depositories = ['training'],
    #frequenciesLibraries = self.statmechLibraries,
    depository = False, # Don't bother loading the depository information, as we don't use it
)
print('loaded database')

family = database.kinetics.families["Disproportionation"]

family.clean_tree()

start = time.time()
family.generate_tree(thermo_database=database.thermo,
                     nprocs=32,
                     new_fraction_threshold_to_reopt_node=0.25,
                     max_batch_size=800,
                     extension_iter_max=2,
                     extension_iter_item_cap=100)

end = time.time()
print(end-start)

It hasn't gotten past here, so no point in adding the rest yet. Also, I originally had it at npocs=1 for the 24 hour run, then tried increasing to see if that changed anything. Also, I'm on my experimental correlated_uncertainty branch of RMG-Py, so that's another possible source of error. I'll try rebuilding because I always forget to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant