Index: trunk/packages/vizservers/vtkvis/Molecule.cpp
===================================================================
--- trunk/packages/vizservers/vtkvis/Molecule.cpp	(revision 3640)
+++ trunk/packages/vizservers/vtkvis/Molecule.cpp	(revision 3641)
@@ -181,9 +181,10 @@
     vtkPolyData *pd = vtkPolyData::SafeDownCast(ds);
     if (pd) {
-        TRACE("Verts: %d Lines: %d Polys: %d Strips: %d",
-                  pd->GetNumberOfVerts(),
-                  pd->GetNumberOfLines(),
-                  pd->GetNumberOfPolys(),
-                  pd->GetNumberOfStrips());
+        TRACE("Points: %d Verts: %d Lines: %d Polys: %d Strips: %d",
+              pd->GetNumberOfPoints(),
+              pd->GetNumberOfVerts(),
+              pd->GetNumberOfLines(),
+              pd->GetNumberOfPolys(),
+              pd->GetNumberOfStrips());
         // DataSet is a vtkPolyData
         if (pd->GetNumberOfLines() > 0) {
@@ -226,14 +227,16 @@
             getAssembly()->AddPart(_bondProp);
         }
-        if (pd->GetNumberOfVerts() > 0) {
-            vtkSmartPointer<vtkPointSetToLabelHierarchy> hier = vtkSmartPointer<vtkPointSetToLabelHierarchy>::New();
+        if (pd->GetNumberOfPoints() > 0) {
+            if (_labelHierarchy == NULL) {
+                _labelHierarchy = vtkSmartPointer<vtkPointSetToLabelHierarchy>::New();
+            }
 #ifdef USE_VTK6
-            hier->SetInputData(pd);
+            _labelHierarchy->SetInputData(pd);
 #else
-            hier->SetInput(pd);
+            _labelHierarchy->SetInput(pd);
 #endif
-            hier->SetLabelArrayName("labels");
-            hier->GetTextProperty()->SetColor(0, 0, 0);
-            _labelMapper->SetInputConnection(hier->GetOutputPort());
+            _labelHierarchy->SetLabelArrayName("_atom_labels");
+            _labelHierarchy->GetTextProperty()->SetColor(0, 0, 0);
+            _labelMapper->SetInputConnection(_labelHierarchy->GetOutputPort());
             _labelProp->SetMapper(_labelMapper);
 
@@ -588,4 +591,15 @@
 }
 
+void Molecule::setAtomLabelField(const char *fieldName)
+{
+    if (_labelHierarchy != NULL) {
+        if (strcmp(fieldName, "default") == 0) {
+            _labelHierarchy->SetLabelArrayName("_atom_labels");
+        } else {
+            _labelHierarchy->SetLabelArrayName(fieldName);
+        }
+    }
+}
+
 /**
  * \brief Turn on/off rendering of atom labels
@@ -866,5 +880,5 @@
 
     vtkSmartPointer<vtkStringArray> labelArray = vtkSmartPointer<vtkStringArray>::New();
-    labelArray->SetName("labels");
+    labelArray->SetName("_atom_labels");
     vtkPolyData *pd = vtkPolyData::SafeDownCast(dataSet);
     if (pd == NULL) {
@@ -872,5 +886,5 @@
         return;
     }
-    for (int i = 0; i < pd->GetNumberOfVerts(); i++) {
+    for (int i = 0; i < pd->GetNumberOfPoints(); i++) {
         char buf[32];
         if (elements != NULL) {
@@ -915,5 +929,5 @@
     }
     vtkSmartPointer<vtkFloatArray> radii = vtkSmartPointer<vtkFloatArray>::New();
-    radii->SetName("radius");
+    radii->SetName("_radii");
     radii->SetNumberOfComponents(3);
     vtkPolyData *pd = vtkPolyData::SafeDownCast(dataSet);
@@ -922,5 +936,5 @@
         return;
     }
-    for (int i = 0; i < pd->GetNumberOfVerts(); i++) {
+    for (int i = 0; i < pd->GetNumberOfPoints(); i++) {
         float tuple[3];
         tuple[1] = tuple[2] = 0;
Index: trunk/packages/vizservers/vtkvis/Molecule.h
===================================================================
--- trunk/packages/vizservers/vtkvis/Molecule.h	(revision 3640)
+++ trunk/packages/vizservers/vtkvis/Molecule.h	(revision 3641)
@@ -19,4 +19,5 @@
 #include <vtkCylinderSource.h>
 #include <vtkLineSource.h>
+#include <vtkPointSetToLabelHierarchy.h>
 #include <vtkLabelPlacementMapper.h>
 
@@ -117,4 +118,6 @@
     void setAtomLabelVisibility(bool state);
 
+    void setAtomLabelField(const char *fieldName);
+
     void setBondVisibility(bool state);
 
@@ -160,4 +163,5 @@
     vtkSmartPointer<vtkGlyph3DMapper> _atomMapper;
     vtkSmartPointer<vtkGlyph3DMapper> _bondMapper;
+    vtkSmartPointer<vtkPointSetToLabelHierarchy> _labelHierarchy;
     vtkSmartPointer<vtkLabelPlacementMapper> _labelMapper;
 };
Index: trunk/packages/vizservers/vtkvis/Renderer.h
===================================================================
--- trunk/packages/vizservers/vtkvis/Renderer.h	(revision 3640)
+++ trunk/packages/vizservers/vtkvis/Renderer.h	(revision 3641)
@@ -703,4 +703,6 @@
     void setMoleculeAtomVisibility(const DataSetId& id, bool state);
 
+    void setMoleculeAtomLabelField(const DataSetId& id, const char *fieldName);
+
     void setMoleculeAtomLabelVisibility(const DataSetId& id, bool state);
 
Index: trunk/packages/vizservers/vtkvis/RendererCmd.cpp
===================================================================
--- trunk/packages/vizservers/vtkvis/RendererCmd.cpp	(revision 3640)
+++ trunk/packages/vizservers/vtkvis/RendererCmd.cpp	(revision 3641)
@@ -6598,4 +6598,19 @@
 
 static int
+MoleculeAtomLabelFieldOp(ClientData clientData, Tcl_Interp *interp, int objc, 
+                         Tcl_Obj *const *objv)
+{
+    const char *fieldName = Tcl_GetString(objv[2]);
+    if (objc == 4) {
+        const char *name = Tcl_GetString(objv[3]);
+        g_renderer->setMoleculeAtomLabelField(name, fieldName);
+    } else {
+        g_renderer->setMoleculeAtomLabelField("all", fieldName);
+    }
+    return TCL_OK;
+}
+
+
+static int
 MoleculeAtomLabelVisibilityOp(ClientData clientData, Tcl_Interp *interp, int objc, 
                               Tcl_Obj *const *objv)
@@ -7043,4 +7058,5 @@
     {"edges",        1, MoleculeEdgeVisibilityOp, 3, 4, "bool ?dataSetName?"},
     {"labels",       2, MoleculeAtomLabelVisibilityOp, 3, 4, "bool ?dataSetName?"},
+    {"lfield",       2, MoleculeAtomLabelFieldOp, 3, 4, "fieldName ?dataSetName?"},
     {"lighting",     3, MoleculeLightingOp, 3, 4, "bool ?dataSetName?"},
     {"linecolor",    5, MoleculeLineColorOp, 5, 6, "r g b ?dataSetName?"},
Index: trunk/packages/vizservers/vtkvis/RendererGraphicsObjs.cpp
===================================================================
--- trunk/packages/vizservers/vtkvis/RendererGraphicsObjs.cpp	(revision 3640)
+++ trunk/packages/vizservers/vtkvis/RendererGraphicsObjs.cpp	(revision 3641)
@@ -1953,4 +1953,30 @@
 }
 
+void Renderer::setMoleculeAtomLabelField(const DataSetId& id, const char *fieldName)
+{
+    MoleculeHashmap::iterator itr;
+
+    bool doAll = false;
+
+    if (id.compare("all") == 0) {
+        itr = _molecules.begin();
+        if (itr == _molecules.end())
+            return;
+        doAll = true;
+    } else {
+        itr = _molecules.find(id);
+    }
+    if (itr == _molecules.end()) {
+        ERROR("Molecule not found: %s", id.c_str());
+        return;
+    }
+
+    do {
+        itr->second->setAtomLabelField(fieldName);
+    } while (doAll && ++itr != _molecules.end());
+
+    _needsRedraw = true;
+}
+
 /**
  * \brief Turn on/off rendering of the Molecule atom labels for the given DataSet
Index: trunk/packages/vizservers/vtkvis/protocol.txt
===================================================================
--- trunk/packages/vizservers/vtkvis/protocol.txt	(revision 3640)
+++ trunk/packages/vizservers/vtkvis/protocol.txt	(revision 3641)
@@ -573,4 +573,7 @@
 molecule edges <bool> <?datasetName?>
 molecule labels <bool> <?datasetName?>
+         Toggle display of atom labels
+molecule lfield <fieldName> <?datasetName?>
+         Set the field used for atom labels
 molecule lighting <bool> <?datasetName?>
 molecule linecolor <r> <g> <b> <?datasetName?>
