Tsjerk / Insane

INSert membrANE - A simple, versatile tool for building coarse-grained simulation systems
GNU General Public License v2.0
39 stars 24 forks source link

Error calculating the charge with -salt #36

Closed jbarnoud closed 7 years ago

jbarnoud commented 7 years ago
$ insane -o prot.gro -f ../data/inputs/1a0s/CG1a0s.pdb -sol W -salt 0
Traceback (most recent call last):
  File "/home/jon/Envs/tsjerk/bin/insane", line 11, in <module>
    load_entry_point('insane', 'console_scripts', 'insane')()
  File "/home/jon/dev/Insane/insane/cli.py", line 161, in cli
    sys.exit(main(sys.argv))
  File "/home/jon/dev/Insane/insane/cli.py", line 142, in main
    box) = core.old_main(argv, options)
  File "/home/jon/dev/Insane/insane/core.py", line 1195, in old_main
    solvent, added = setup_solvent(pbc, protein, membrane, options)
  File "/home/jon/dev/Insane/insane/core.py", line 680, in setup_solvent
    charge = (options["charge"] != "auto") and int(options["charge"]) or charge
UnboundLocalError: local variable 'charge' referenced before assignment
Tsjerk commented 7 years ago

Fixed (was missing summing mcharge and pcharge, which serve no purpose on their own)