ReactionMechanismGenerator / RMG-Py

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

Unable to Estimate Thermochemistry for Phosphine Oxides #2567

Closed neeraj-170694 closed 8 months ago

neeraj-170694 commented 8 months ago

When I am simulating a chemical reaction with O=c1[nH]c2ccsc2[nH]1,O=P(Br)(Br)Br it is showing me an error. Traceback (most recent call last): File "rmg.py", line 118, in main() File "rmg.py", line 112, in main rmg.execute(kwargs) File "/rmg/RMG-py/rmgpy/rmg/main.py", line 751, in execute self.initialize(kwargs) File "/rmg/RMG-py/rmgpy/rmg/main.py", line 552, in initialize self.reaction_model.add_species_to_edge(spec) File "/rmg/RMG-py/rmgpy/rmg/model.py", line 1187, in add_species_to_edge self.edge.phase_system.phases["Default"].add_species(spec) File "/rmg/RMG-py/rmgpy/rmg/reactors.py", line 293, in add_species spec = to_rms(spc) File "/rmg/RMG-py/rmgpy/rmg/reactors.py", line 696, in to_rms th = obj.get_thermo_data() File "rmgpy/species.py", line 777, in rmgpy.species.Species.get_thermo_data submit(self, solvent_name) File "/rmg/RMG-py/rmgpy/thermo/thermoengine.py", line 183, in submit spc.thermo = evaluator(spc, solvent_name=solvent_name) File "/rmg/RMG-py/rmgpy/thermo/thermoengine.py", line 162, in evaluator thermo = generate_thermo_data(spc, solvent_name=solvent_name) File "/rmg/RMG-py/rmgpy/thermo/thermoengine.py", line 126, in generate_thermo_data thermo0 = thermodb.get_thermo_data(spc) File "/rmg/RMG-py/rmgpy/data/thermo.py", line 1415, in get_thermo_data thermo0 = self.get_thermo_data_from_groups(species) File "/rmg/RMG-py/rmgpy/data/thermo.py", line 1902, in get_thermo_data_from_groups tdata = self.estimate_thermo_via_group_additivity(molecule) File "/rmg/RMG-py/rmgpy/data/thermo.py", line 2140, in estimate_thermo_via_group_additivity thermo_data = self.compute_group_additivity_thermo(molecule) File "/rmg/RMG-py/rmgpy/data/thermo.py", line 2176, in compute_group_additivity_thermo data_added = self._add_group_thermo_data(thermo_data, self.groups['group'], molecule, {'': atom})[1] File "/rmg/RMG-py/rmgpy/data/thermo.py", line 2556, in _add_group_thermo_data raise DatabaseError(f'Unable to determine thermo parameters for atom {atom} in molecule {molecule}: ' rmgpy.exceptions.DatabaseError: Unable to determine thermo parameters for atom {'': <Atom 'P'>} in molecule <Molecule "O=P(Br)(Br)Br">: no data for node R or any of its ancestors in database group.

How could i resolve this error ? Will i be able to do simulation for the above molecules. pfa: input_1.txt

JacksonBurns commented 8 months ago

Hi @neeraj-170694 thanks for the report!

@xiaoruiDong do you know if RMG has support for phosphine oxides?

xiaoruiDong commented 8 months ago

I am not aware of anyone that has been working on phosphorus compounds before. I believe RMG has the infrastructure (e.g., relevant atom types, see below)

https://github.com/ReactionMechanismGenerator/RMG-Py/blob/dc2da84b1a6a637ba2af6b1f33d01f2c34d60af4/rmgpy/molecule/atomtype.py#L480-L538

But I don't think there is corresponding GAV data for phosphorus groups to calculate thermo.

JacksonBurns commented 8 months ago

Thanks for the input @xiaoruiDong!

@neeraj-170694 this is unfortunately a data issue. We don't have the group additivity values for the compound at hand (phosphorus(V) oxybromide) and we don't have anyone on the current developer team looking at it either.

I will point you toward our database documentation which explains how the database is laid out and how you can add more data. We are more than happy to review and merge and new data, but we can't currently add it ourselves. You can look at https://github.com/ReactionMechanismGenerator/RMG-database/pull/624 on RMG-database for an example of adding new data.

I'll close this issue for the time being, since the problem that caused the original error has been found. If you run into new issues please feel free to open new issues, or if you try adding new data. Thanks for using RMG!