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

Reaction simulation with boron is throwing an error like KeyError: 'B' #2566

Closed
joel-brelson opened this issue Oct 30, 2023 · 2 comments · May be fixed by #2383
Closed

Reaction simulation with boron is throwing an error like KeyError: 'B' #2566

joel-brelson opened this issue Oct 30, 2023 · 2 comments · May be fixed by #2383

Comments

@joel-brelson
Copy link

I was trying a simulation with two compounds in which one of the compounds is containing boron when i ran the script it is throwing an error like
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 508, in initialize
self.load_input(self.input_file)
File "/rmg/RMG-py/rmgpy/rmg/main.py", line 259, in load_input
read_input_file(path, self)
File "/rmg/RMG-py/rmgpy/rmg/input.py", line 1558, in read_input_file
exec(f.read(), global_context, local_context)
File "", line 26, in
File "/rmg/RMG-py/rmgpy/rmg/input.py", line 231, in smiles
return Molecule().from_smiles(string)
File "rmgpy/molecule/molecule.py", line 1772, in rmgpy.molecule.molecule.Molecule.from_smiles
def from_smiles(self, smilesstr, backend='try-all', raise_atomtype_exception=True):
File "rmgpy/molecule/molecule.py", line 1776, in rmgpy.molecule.molecule.Molecule.from_smiles
translator.from_smiles(self, smilesstr, backend, raise_atomtype_exception=raise_atomtype_exception)
File "rmgpy/molecule/translator.py", line 328, in rmgpy.molecule.translator.from_smiles
def from_smiles(mol, smilesstr, backend='try-all', raise_atomtype_exception=True):
File "rmgpy/molecule/translator.py", line 334, in rmgpy.molecule.translator.from_smiles
return _read(mol, smilesstr, 'smi', backend, raise_atomtype_exception=raise_atomtype_exception)
File "rmgpy/molecule/translator.py", line 516, in rmgpy.molecule.translator._read
mol = _openbabel_translator(identifier, identifier_type, mol)
File "rmgpy/molecule/translator.py", line 426, in rmgpy.molecule.translator._openbabel_translator
output = from_ob_mol(mol, obmol)
File "rmgpy/molecule/converter.py", line 279, in rmgpy.molecule.converter.from_ob_mol
def from_ob_mol(mol, obmol, raise_atomtype_exception=True):
File "rmgpy/molecule/converter.py", line 337, in rmgpy.molecule.converter.from_ob_mol
mol.update_atomtypes(log_species=True, raise_exception=raise_atomtype_exception)
File "rmgpy/molecule/molecule.py", line 1437, in rmgpy.molecule.molecule.Molecule.update_atomtypes
self.update_lone_pairs()
File "rmgpy/molecule/molecule.py", line 2270, in rmgpy.molecule.molecule.Molecule.update_lone_pairs
atom1.lone_pairs = (elements.PeriodicSystem.valence_electrons[atom1.symbol]
KeyError: 'B'

Could some one explain why am i getting this error and how could i solve it. I am attaching the input.py file that i used for simulation
input.txt

@JacksonBurns
Copy link
Contributor

Hi @joel-brelson we are currently working on adding support for Boron to RMG (like in PR #2383) but it is not ready for general use at the moment. I can't currently estimate how long it would be to get this out into production. I'll link this issue to that PR so that once it is merged this issue will automatically be updated, and then you can try using the main branch of RMG.

If you are up for it, you could do a source installation based on the branch that @ssun30 has been developing over in #2383 but that might not be fully working at the moment and require some hacking.

@JacksonBurns JacksonBurns linked a pull request Oct 31, 2023 that will close this issue
Copy link

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.

@github-actions github-actions bot added the stale stale issue/PR as determined by actions bot label Jan 30, 2024
@github-actions github-actions bot added the abandoned abandoned issue/PR as determined by actions bot label Mar 1, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
@JacksonBurns JacksonBurns removed stale stale issue/PR as determined by actions bot abandoned abandoned issue/PR as determined by actions bot labels Mar 1, 2024
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

Successfully merging a pull request may close this issue.

2 participants