diff --git a/qstack/spahm/rho/bond.py b/qstack/spahm/rho/bond.py index 3c83337..194743e 100755 --- a/qstack/spahm/rho/bond.py +++ b/qstack/spahm/rho/bond.py @@ -83,8 +83,8 @@ def main(): if args.filename.endswith('xyz'): xyzlist = [args.filename] - charge = [int(args.charge) or 0] - spin = [int(args.spin) or 0] + charge = [int(args.charge) if args.charge else 0] + spin = [int(args.spin) if args.spin else None] else: xyzlistfile = args.filename xyzlist = utils.get_xyzlist(xyzlistfile)