Skip to content

typo prevents writing input files #2531

@sevyharris

Description

@sevyharris

Bug Description

I'm trying to read, edit, and write RMG input files using the rmgpy.rmg.input module, but the writing portion gives me the following error:

Traceback (most recent call last):
  File "edit_input_file.py", line 14, in <module>
    rmgpy.rmg.input.save_input_file(new_input_file, rmg0)
  File "/home/moon/rmg/RMG-Py/rmgpy/rmg/input.py", line 1665, in save_input_file
    if rmg.surfaceSiteDenisty or rmg.binding_energies:
AttributeError: 'RMG' object has no attribute 'surfaceSiteDenisty'

There's obviously the misspelled word. I think the attribute is supposed to be surface_site_density.
I'm running into some other issues with this module (can't write files with a temperature range, using this module is painfully slow because of the hidden and unnecessary Julia dependency), and will try adding a few unit tests to cover my tracks here.

How To Reproduce

This is my Python script for reproducing the error (input.py is the superminimal example):

import os
import rmgpy.rmg.input
import rmgpy.rmg.main

# reset with  cp ~/rmg/RMG-Py/examples/rmg/superminimal/input.py .
my_input_file = os.path.join('input.py')

rmg0 = rmgpy.rmg.main.RMG()
rmgpy.rmg.input.read_input_file(my_input_file, rmg0)

print('read RMG input file')

new_input_file = 'new_input.py'
rmgpy.rmg.input.save_input_file(new_input_file, rmg0)
print('wrote RMG input file')

Expected Behavior

It'd be really convenient to be able to use the RMG API to edit input files. I expected to be able to read and write the simplest input file without any errors.

Installation Information

Describe your installation method and system information.

  • OS (include version if known): WSL: Ubuntu 20.04.1 LTS
  • Installation method: source
  • RMG version information:
    • RMG-Py: 3.2.0-112-g8ba4c0dd3
    • RMG-database: 3.1.0-618-gb7ff16364

Metadata

Metadata

Assignees

Labels

Complexity: Lowstalestale issue/PR as determined by actions bot

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions