This script finds and turns a selection of waters determined to be buried (no solvent accessibility) in the original selection. If you prefer to define your own cutoff of "accessible" use the 2nd parameter.
Usage
find_buried_waters [ sele [, cutoff [, state ]]]
Script
<source lang="python">
from pymol import cmd
def find_buried_waters(sele='all', cutoff=-1, state=1, quiet=1, _self=cmd):
DESCRIPTION
Finds and turns a selection of waters determined to be buried (no solvent
accessibility) in the original selection.
ARGUMENTS
sele = string: atom selection {default: all}
cutoff = float: threshold on what one considers an "exposed"
atom (in A**2) {default: surface_residue_cutoff}
state = int: object state {default: 1}
cutoff, state, quiet = float(cutoff), int(state), int(quiet)
tmpObj=_self.get_unused_name("__tmp")
_self.create(tmpObj, sele, state, 1, zoom=0)
_self.set("dot_solvent", 1, tmpObj);
_self.get_area(tmpObj, state=1, load_b=1)
if cutoff < ..→