label *, text_type
set atom_type_format, X
save ligand.mol2, ligand
PyMOL can calculate, label, and write atoms types for molecules. Like stereochemistry, this happens at the level of the object
in PyMOL. (We plan to improve this for the next release.) Thus, for improved speed, it's beneficial to extract your ligand from a large protein before labeling it.