Skip to content

Potential file reader crash #4

@cstein

Description

@cstein

The following potential file

@COORDINATES
3
AA
O    18.30000000   13.14400000    8.37500000
H    19.08700000   12.52900000    8.26000000
H    17.96500000   12.81500000    9.21300000
@MULTIPOLES
ORDER 0
3
     1   -0.83400000
     2    0.41700000
     3    0.41700000
EXCLISTS
3 3
     1     2     3
     2     1     3
     3     1     2

gives rise to a crash when the above is read like

>>> from pepytools import Potential as P
>>> P.from_file('test.pot')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/work/sdujk/cstein/Programs/pepytools-0.2.0/lib64/python2.7/site-packages/pepytools/potential.py", line 60, in from_file
    a.polarizabilities = p
  File "/work/sdujk/cstein/Programs/pepytools-0.2.0/lib64/python2.7/site-packages/pepytools/potential.py", line 194, in setPolarizabilities
    if len(polarizabilities) != self.nsites:
TypeError: object of type 'NoneType' has no len()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions