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

bug when using gaussian logs for seminario #76

Open
landreola opened this issue Mar 12, 2024 · 0 comments
Open

bug when using gaussian logs for seminario #76

landreola opened this issue Mar 12, 2024 · 0 comments
Assignees
Labels

Comments

@landreola
Copy link
Collaborator

Description

When using Gaussian logs to run seminario.py the atoms cannot be read from the archive because the atoms property of the structure has been initialized as None and it is trying to append to a list.

Traceback

Traceback (most recent call last):
  File "/afs/crc.nd.edu/user/l/landreol/q2mm/q2mm/seminario.py", line 921, in <module>
    main(sys.argv[1:])
  File "/afs/crc.nd.edu/user/l/landreol/q2mm/q2mm/seminario.py", line 858, in main
    mw_hessian = copy.deepcopy(log.structures[-1].hess)
  File "/afs/crc.nd.edu/user/l/landreol/q2mm/q2mm/schrod_indep_filetypes.py", line 1076, in structures
    self.read_archive()
  File "/afs/crc.nd.edu/user/l/landreol/q2mm/q2mm/schrod_indep_filetypes.py", line 1417, in read_archive
    struct._atoms.append(Atom(element=ele, x=float(x), y=float(y), z=float(z)))
AttributeError: 'NoneType' object has no attribute 'append'

To Reproduce

I ran this command (a single structure to make it simpler, it reproduces the issue):

seminario.py -i mm3.fld -o project.seminario.fld --mol Small_system_alkene_ligand_me_substrate.mol2 --log Small_system_alkene_ligand_me_substrate.log

Files

These files should be all you need to reproduce it.
seminario_bug_1.zip

My fix

I put a try/except at line 1417 of schro_indep_filetypes.py:

            try:
                struct._atoms.append(Atom(element=ele, x=float(x), y=float(y), z=float(z)))
            except AttributeError:
                struct._atoms=[Atom(element=ele, x=float(x), y=float(y), z=float(z))]

But I figured you might want to change how the property is initialized in case it affects anything else, so I did not push the change myself.

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

No branches or pull requests

2 participants