SEE ALSO LIGANDS.TXT Ligands and non-standard residues reported in the molecule information tab: getHetNam() in moltab.js Count is done with e.g. 1ijw (should return 2) print {[TRS] and hetero}.groupindex.all.count().length (suggested by Alexander Rose) 2022-06: it worked through 14.32.49 but returns 1 in 14.32.58 and 59. Bug reported. While awaiting bug fix in 14.32.60, Bob suggests this workaround: print {[hem] and hetero}.groupindex.all.pivot.keys.length This was failing in JSmol 14.3.7 with 1ijw consistently, reported to jmol-users Sept 20, 2014.