I put together a table - starting with ChemDraw shortcuts and adding some that made sense to me (e.g. typing c# gives you a straight-chain alkyl because those are a pain). Also for some reason ChemDraw doesn’t have a nitrile / cyano group and for mysterious reasons a t-butyl group is “K” rather than “t”.
Other common groups that I missed?
Key
Name
Key
Name
Key
Name
Key
Name
a
phenyl
A
acyl
1
b
Br
B
BH2
2
carbonyl
c
methyl
C
Cl
3
phenyl
d
deuterium
D
4
e
ethyl
E
CO2Me ester
5
f
fluorine
F
CF3
6
cyclohexane
g
G
7
cyclopentane
h
hydrogen
H
Cbz
8
-C=CH2
i
iodine
I
isopropyl
9
isopropyl
j
J
0
methyl
k
sulfone SO2-CH3
K
t-butyl
l
Cl
L
Li
cn
nitrile / cyano
nc
isocyano
m
methyl
M
MgBr
no
nitroso
ep
epoxide
n
NH2
N
NO2
im
imine
o
OH
O
OMe
so
sulfoxide
p
PH2
P
phenyl
cs
C=S thiocarbonyl
q
OH
Q
FMoc
nn
N=N azo
r
R
n3
N3 azide
s
SH
S
SiH3
t
t-butyl
T
c2
ethyl
Rings
u
cyclobutane
U
c3
propyl
C3
cyclopropyl
v
cyclopropane
V
c4
butyl
C4
cyclobutyl
w
NH2
W
c5
pentyl
C5
cyclopentyl
x
X
c6
hexyl
C6
cyclohexyl
y
Boc
Y
…
etc.
…
z
≡CH
Z
N3
c0
decyl
C0
cyclodecyl
deuterium is currently ignored because I haven’t added isotope support.
I’ve been doing quite a lot of thinking on this because I think it could be a really nice interface and powerfully enabling. Big wall of text so for the TL;DR skip to the tables that summarize my proposal…
My general thoughts first of all:
I like the fact that shortcuts are generally mirrored between the groups and ligands, and I think that’s a good principle to stick to
While taking the ChemDraw hotkeys as a starting point is good, I think we shouldn’t be afraid to change it to make it more sensible – just as you suggested yourself
I think we should at minimum get rid of the various cases of redundancy, even if that means diverging from ChemDraw
I think we should avoid overriding the meaning of the hotkeys for the Draw Tool i.e. the element symbols – at least for the single letters and common double letters
We should stick to fragments/radicals rather than saturated molecules. So don’t have a hotkey for cyclohexane, just have cyclohexyl. Ideally they wouldn’t even be available in the groups selection. This keeps it more conceptually consistent and clear, and therefore predictable, for the user.
Note that actually the current behaviour of Avogadro already works perfectly for this principle: clicking on an atom replaces the atom with that fragment, while clicking on empty space creates the fragment with an extra hydrogen atom, so for example, adding an phenyl fragment to empty space creates benzene.
So, to cut redundancy in groups:
Keep l for Cl, lose C (prefer the easier to type and more commonly used of the two ChemDraw hotkeys)
Keep o for OH, lose q
Keep n for NH2, lose w
Keep a for Ph, lose 3 and P (so that it can be used for phosphorus, see below)
Keep c for methyl by analogy with the other organic elements, but put it at c1 too for consistency (my single exception to my anti-redundancy stance), drop 0 and m
Similarly, drop e for ethyl
Keep I for iPr, drop 9
Maybe keep K for tBu to match ChemDraw and drop the other two options
This means we can then use T for Troc
Drop u and v for cyclobutane/-propane
We should pick just one of the azide shortcuts – I favour n3 because then it matches the alkyl chains nicely
My further proposals for groups:
Keep the numerical keys free for now, as it’d be very useful to have them available to the user to set custom hotkeys in future
Use c# for the complete range of straight-chain alkyl groups methyl through dodecyl (extend the range)
It’s fine to use C# for the complete range of cycloalkyl groups starting at cyclopropyl, but have y# as an alternative because it is easier to type (no shift release between the letter and number)
Move vinyl to V
Move acetylenyl to W so that it’s paired with vinyl and the two can be remembered as number of bonds = number of vertical lines in the letter
Move carbonyl to co so it’s consistent with no and so
Make capital O OOH, and in general have shift + organic element letters be an oxidized form
Move silicon to z so that S and Si can each have oxidized forms with shift
Move bromine to r since it’s unused, and have b as boron so that it can have an oxidized form with shift
Move Li to li so that it matches the Draw Tool
Extend the f/F for F/CF3 to the other halogens, and to deuterium (even though it’s not yet implemented)
I would suggest some extra protecting groups such as Bn/Bz, Ms/Ts/Ns/Tf
This would be the result:
Single stroke
Key
Name
Key
Name
a
phenyl
A
acyl
b
BH2
B
B(OH)2
c
CH3
C
CH2OH
d
D
D
CD3
e
E
f
fluorine
F
CF3
g
G
h
(hydrogen)
H
Cbz
i
iodine
I
isopropyl
j
J
k
(potassium)
K
tert-butyl
l
chlorine
L
CCl3
m
M
MgBr
n
NH2
N
NHOH
o
OH
O
OOH
p
PH2
P
P(OH)2
q
Q
FMoc
r
bromine
R
CBr3
s
SH
S
SSH
t
T
Troc
u
(uranium)
U
v
(vanadium)
V
–C=CH2
w
(tungsten)
W
–C≡CH
x
X
y
(yttrium)
Y
Boc
z
SiH3
Z
Si(OH)3
2-stroke carbon chains and rings
Key
Name
Key
Name
c1
methyl
c2
ethyl
c3
propyl
C3 or y3
cyclopropyl
c4
butyl
C4 or y4
cyclobutyl
c5
pentyl
C5 or y5
cyclopentyl
c6
hexyl
C6 or y6
cyclohexyl
…
etc.
…
c10 or c0
decyl
C10/C0/y10/y0
cyclodecyl
c11
undecyl
C11 or y11
cycloundecyl
c12
dodecyl
C12 or y12
cyclododecyl
Organic functional groups
Combo
Formula
Name
Combo
Formula
Name
co
C(=O)H
carbonyl
CO
C(=O)OH
carboxylic acid
no
N=O
nitroso
NO
NO2
nitro
so
S(=O)H
sulfoxide
cn
CH=NH
imine
CN
C≡N
cyano/nitrile
nc
N=CH2
imine
NC
N≡C
isocyano/isonitrile
cs
C(=S)H
thiocarbonyl
nn
N=NH
azo
Miscellaneous 2- and 3-stroke hotkeys
Key
Name
a3
azide
bn
benzyl
bz
benzoyl
ep
epoxide
li
Li
mes
mesityl
ms
mesyl
ns
nosyl
piv
Piv
tf
triflyl
tr
trityl
ts
tosyl
You might say “Where’s the ester, the sulfone, why take them out? And why get rid of OMe, surely that’s useful?”. I have a proposal on how to handle organic functional groups in a nice and mostly systematic way – I’ll post it tomorrow.
Oh and I reckon the reasoning behind ChemDraw’s K for t-Bu is that it looks like it visually
By the way, assuming the hotkeys would be hard-coded somewhere, I’d be more than happy to help with doing the tedious leg work of specifying all the combinations. Also with generating reasonable structures for the fragments repo for anything that’s missing.
Actually writing a hotkey mechanism for the Template Tool is probably beyond me though.
I definitely want to have some discussion because a few of the ChemDraw choices seem weird and they leave out a wide range of groups. (No nitrile, no phosphate, etc.). Some of your suggestions seem reasonable.
On the other hand, some redundancy seems okay, and a few cases the more common functional group requires a shift key.
no (or no2) = nitro .. way more common than nitroso IMHO
cn = cyano / nitrile
And I can see that generally you’re trying to have the more oxidized form with shift, but is NHOH that common? I think NO2 is much more useful as “N”
It does, but I still don’t understand why they didn’t use t which seems way easier to remember.
Naturally I agree on the relative frequency of the two. But the logic of having it map to NHOH is part of my idea for a wider, systematic scheme:
For the key organic elements C, O, N, S, P, and B, the basic saturated functional group is selected using the normal hotkey. Si is accessed using the z key.
Following the first key with the o key increases the oxidation state by adding a double bonded oxygen atom to the first atom.
For sulfur, following this with a further o will add a second =O to the first sulfur atom.
Following the first element key with the n, s, or c key adds a doubly bonded N, S, or C atom to the first atom (if it creates a sensible combination).
There are a few special 3-stroke combinations that don’t follow this, where the typed elements are instead bonded in a line e.g. ono selects a nitrite –O–N=O
Holding Shift also causes the first atom to be oxidized but without the addition of double bonds to oxygen.
This generally means the replacement of hydrogen atoms with hydroxy groups or an increase in bond order, with the exact effect being whatever is most chemically appropriate/frequently encountered.
Shift is held while entering the entire sequence, for ease of input.
To demonstrate:
Combo
Formula
Name
Combo
Formula
Name
carbon
c
CH3
methyl
C
CH2OH
hydroxymethyl
co
C(=O)H
carbonyl
CO
C(=O)OH
carboxylic acid
cn
CH=NH
imine
CN
C≡N
cyano/nitrile
nc
N=CH2
imine
NC
N≡C
isocyano/isonitrile
cs
C(=S)H
thiocarbonyl
CS
C(=S)OH
thioacid
cno
CH=N–OH
oxime
oxygen
o
OH
hydroxy
O
OOH
peroxide
ono
O–N=O
nitrite
nitrogen
n
NH2
amino
N
NHOH
hydroxyamino
no
N=O
nitroso
NO
NO2
nitro
nn
N=NH
azo
NN
N+≡N
diazo
sulfur
s
SH
thiyl
S
SSH
disulfide
so
S(=O)H
sulfoxide
SO
S(=O)OH
sulfinic acid
soo
S(=O)2H
sulfone
SOO
S(=O)2OH
sulfonic acid
phosphorus
p
PH2
phosphine
P
P(OH)2
phosphite
po
P(=O)H2
phosphine oxide
PO
P(=O)(OH)2
phosphonic acid
pn
P(=NH)H2
phosphine imide
silicon
z
SiH3
silyl
Z
SiH2OH
silanol
boron
b
BH2
boryl
B
B(OH)2
boronic acid
To extend this, additionally, following a combo by m gives a version of the combo where methyl groups have replaced hydrogens e.g. a sulfide instead of a thiol or an ester instead of a carboxylic acid:
Combo
Result
Combo
Result
cm
CMe3
CM
CH2OMe
com
C(=O)Me
COM
C(=O)OMe
cnm
C(=NH)Me
csm
C(=S)Me
CSM
C(=S)OMe
om
OMe
OM
OOMe
nm
NMe2
NM
NHOMe
nnm
N=NMe
sm
SMe
SM
SSMe
som
S(=O)Me
SOM
S(=O)OMe
soom
S(=O)2Me
SOOM
S(=O)2OMe
pm
PMe2
PM
P(OMe)2
pom
P(=O)Me2
POM
P(=O)(OMe)2
pnm
P(=NH)Me2
zm
SiMe3
ZM
SiH2OMe
bm
BMe2
BM
B(OMe)2
Similarly, the combo can be followed by the a key in order to get a version with phenyl groups – a few examples only:
Combo
Result
Combo
Result
coa
C(=O)Ph
COA
C(=O)OPh
oa
OPh
OA
OOPh
soa
S(=O)Ph
SOA
S(=O)OPh
sooa
S(=O)2Ph
SOOA
S(=O)2OPh
poa
P(=O)Ph2
POA
P(=O)(OPh)2
ba
BPh2
BA
B(OPh)2
It probably sounds complicated when shown like this in a big table. The idea is that by making it predictable and systematic, users could have a feeling for what combinations would produce what without having to reference a table at all. And by having it systematic, having a large number of combinations becomes viable, whereas with arbitrary combos I don’t think you’d want to go very far beyond the obvious and simple ones you already suggested.
Would be interested to know what you/people think.
A systematic system is a reasonable long-term goal, although I suspect with everything you’ve outlined, we’d might want to assemble SMILES on-the-fly to insert rather than the pre-defined CJSON templates. After all, you have ~20 basic sets, plus the oxidized form, so that’s 40 times methyl and phenyl, or like 120 different small functional groups. (And I’m not going to ask if “nma = N(Me)(Ph)”.)
I guess what I mean to say is that my main priority right now will be to add some common cases that fit general expectations (e.g., c1-c0). I’ll try to avoid cases which might conflict with the systematic approach you mention (e.g., for now N is undefined rather than nitro).
But I’d also say that there’s no reason not to have some duplication where it makes sense. For example “no2” seems like a pretty useful and discoverable case for nitro.
Anyone who wants to help can add complex functional groups (e.g., mesityl, Piv, triflyl, trityl) to the fragments repository.
Yeah, I think if you actually wanted to implement it in full that would be pretty much necessary. It was more to demonstrate the suggested guiding principle for how the hotkeys for things we already have should be assigned, rather than a suggestion of fragments we should add.
Haha, my thinking was actually that only one such “modifier” at the end of a combo would be possible. But yes, it could easily get silly.
You are right though, nitro is extremely useful, and as you say, a hydroxyamine is not all that common – and the same goes for some of the other ones I suggested. As an alternative, we could simply make the Shift + element combo the fully oxidized form?
Hydroxymethyl and hydroxyamino could go, and disulfide could be ss instead since that’s unambiguous.
And then maybe restrict multi-letter combos to lowercase only, which would simplify things.
The basic element + m combos are worth having even if we don’t bother with the rest of the +methyl versions. If we keep methyl ester at E then we then have most of the useful ones covered tbh.
For reference, that would give the following, which doesn’t seem all that unwieldy:
Key
Result
Key
Result
Combo
Result
Combo
Result
a
phenyl
A
acyl C(=O)Me
b
BH2
B
B(OH)2
bm
BMe2
c
CH3
C
COOH
co
C(=O)H
cm
CMe3
d
D
D
CD3
cn
C≡N
nc
N≡C
e
CO2Et ester
E
CO2Me ester
im
CH=NH
cno
CH=N–OH
f
fluorine
F
CF3
cs
C(=S)H
cso
C(=S)OH
g
G
h
(hydrogen)
H
Cbz
bn
benzyl
bz
benzoyl
i
iodine
I
isopropyl
ep
epoxide
li
Li
j
J
mes
mesityl
tr
trityl
k
(potassium)
K
tert-butyl
ms
mesyl
tf
triflyl
l
chlorine
L
CCl3
ts
tosyl
piv
Piv
m
M
MgBr
n
NH2
N
NO2
no
N=O
ono
O–N=O
o
OH
O
OOH
nn
N=NH
nm
NMe2
p
PH2
P
PO(OH)2
n2
N+≡N
n3
N=N+=N-
q
Q
FMoc
oo
OOH
om
OMe
r
bromine
R
CBr3
pm
PMe2
s
SH
S
SO2OH
po
P(=O)H2
pn
P(=NH)H2
t
T
Troc
ss
SSH
sm
SMe
u
(uranium)
U
so
S(=O)H
so2
S(=O)2H
v
(vanadium)
V
–C=CH2
ncs
N=C=S
scn
S–C≡N
w
(tungsten)
W
–C≡CH
x
X
y
(yttrium)
Y
Boc
z
SiH3
Z
Si(OH)3
zm
SiMe3
c1
methyl
c2
ethyl
c3
propyl
y3
cyclopropyl
c4
butyl
y4
cyclobutyl
c5
pentyl
y5
cyclopentyl
c6
hexyl
y6
cyclohexyl
…
etc.
…
c10 or c0
decyl
y10 or y0
cyclodecyl
c11
undecyl
y11
cycloundecyl
c12
dodecyl
y12
cyclododecyl
The only thing that would still bother me there is that cn doesn’t fit logically with co, cs, so, po, pn. But I guess if we consider what a user would actually expect when they press cn, you’re surely right that it’s got to give a nitrile, it’s literally a CN group…
Without all the COM nonsense I think the methyl ester as E is then useful, and also thought that the ethyl ester might be a good counterpart, especially since it’s often abbreviated with ε, what do you think?