﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1182	Error in addh at coordination sites	Tristan Croll	Eric Pettersen	"Traceback:

{{{
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/cmd_line/tool.py"", line 205, in execute
    cmd.run(cmd_text)
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/core/commands/cli.py"", line 2561, in run
    result = ci.function(session, **kw_args)
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/atomic/addh/cmd.py"", line 55, in cmd_addh
    add_h_func(session, structures, in_isolation=in_isolation, **prot_schemes)
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/atomic/addh/cmd.py"", line 130, in simple_add_hydrogens
    idatm_type, invert, coordinations.get(atom, []))
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/atomic/addh/simple.py"", line 34, in add_hydrogens
    _alt_loc_add_hydrogens(atom, alt_loc_atom, *args, **kw)
  File ""/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/atomic/addh/simple.py"", line 104, in _alt_loc_add_hydrogens
    positions.remove(coord_pos)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
}}}

Amending the offending lines (94-102) of `simple.py` to pop by index appears to do the trick:

{{{
        if coordinations:
            coord_i = None
            for i, pos in enumerate(positions):
                d = distance_squared(pos, toward)
                if coord_i is None or d < lowest:
                    coord_i = i
                    lowest = d
            positions.pop(coord_i)
}}}"	defect	closed	major		Structure Editing		fixed						all	ChimeraX
