+ * is_atom_visible(index) -> Boolean
+ *
+ * Check is an atom is visible. It examines the atom attribute (ap->exflags & kAtomHiddenFlag)
+ * as well as the molecule attributes (showHydrogens, etc.)
+ */
+static VALUE
+s_Molecule_IsAtomVisible(VALUE self, VALUE ival)
+{
+ Molecule *mol;
+ Int idx;
+ Atom *ap;
+ Data_Get_Struct(self, Molecule, mol);
+ idx = s_Molecule_AtomIndexFromValue(mol, ival);
+ if (idx < 0 || idx >= mol->natoms)
+ return Qnil;
+ ap = ATOM_AT_INDEX(mol->atoms, idx);
+ if (mol->mview != NULL) {
+ if (mol->mview->showHydrogens == 0 && ap->atomicNumber == 1)
+ return Qfalse;
+ if (mol->mview->showExpandedAtoms == 0 && SYMOP_ALIVE(ap->symop))
+ return Qfalse;
+ if (mol->mview->showDummyAtoms == 0 && ap->atomicNumber == 0)
+ return Qfalse;
+ }
+ return ((ap->exflags & kAtomHiddenFlag) != 0 ? Qfalse : Qtrue);
+}
+
+/*
+ * call-seq: