Opened 10 years ago

Closed 10 years ago

#104 closed defect (fixed)

Command parsing abbreviated keyword gives error

Reported by: Tom Goddard Owned by: Greg Couch
Priority: major Milestone:
Component: Command Line Version:
Keywords: Cc: conrad@…
Blocked By: Blocking:
Notify when closed: Platform: all
Project: chimera

Description

Using an abbreviation of the "enclose" keyword option of the surface command "surf encl #1" generates an error. Using the full option name "surf enclose #1" works. The error suggests that the keyword is being interpreted as the first optional argument named "atoms". There are no required arguments of the surface command.

surface encl #1
........
Invalid "atoms" argument: (1:1) no available options :
encl #1

atom_specifier

Here is the cli.CmdDesc for the surface command:

_surface_desc = cli.CmdDesc(

optional = [('atoms', AtomsArg)],
keyword = [('enclose', AtomsArg),

('probe_radius', cli.FloatArg),
('grid_spacing', cli.FloatArg),
('color', color.ColorArg),
('transparency', cli.FloatArg),
('nthread', cli.IntArg)],

synopsis = 'create molecular surface')

Change History (2)

comment:1 by Tom Goddard, 10 years ago

According to Eric, the expected parsing in this case would be to try to interpret "encl" as the optional argument. The atom spec parsing for that optional argument would then consume no tokens since encl is not an atom spec. And parsing would proceed to the key words. It is not clear if the problem likes in the atom spec parsing or in the command-line parsing code.

comment:2 by Greg Couch, 10 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.