diff -Npur plugins/molfile_plugin/Makefile /Users/fx/devel/vmd-1.9.src/plugins/molfile_plugin/Makefile
--- plugins/molfile_plugin/Makefile	2011-03-05 05:27:06.000000000 +0100
+++ /Users/fx/devel/vmd-1.9.src/plugins/molfile_plugin/Makefile	2011-07-02 10:45:26.000000000 +0200
@@ -21,8 +21,8 @@ SCXXFLAGS = $(CCFLAGS) $(DEF)"STATIC_PLU
 # Rules
 #
 
-STATICPLUGINS = abinitplugin biomoccaplugin cpmdplugin psfplugin pdbplugin dcdplugin babelplugin gromacsplugin parmplugin crdplugin namdbinplugin binposplugin graspplugin msmsplugin stlplugin cubeplugin edmplugin ccp4plugin dsn6plugin brixplugin pltplugin raster3dplugin parm7plugin rst7plugin tinkerplugin uhbdplugin vaspchgcarplugin vaspparchgplugin vaspposcarplugin vaspoutcarplugin vaspxdatcarplugin vaspxmlplugin dlpolyplugin lammpsplugin vtfplugin xyzplugin corplugin moldenplugin phiplugin pbeqplugin grdplugin situsplugin dxplugin spiderplugin mapplugin avsplugin fs4plugin pqrplugin mol2plugin gridplugin carplugin mdfplugin gamessplugin xsfplugin bgfplugin xbgfplugin jsplugin maeffplugin dtrplugin basissetplugin
-PLUGINS = abinitplugin.so biomoccaplugin.so cpmdplugin.so psfplugin.so pdbplugin.so dcdplugin.so babelplugin.so gromacsplugin.so parmplugin.so crdplugin.so namdbinplugin.so binposplugin.so graspplugin.so msmsplugin.so stlplugin.so cubeplugin.so edmplugin.so ccp4plugin.so dsn6plugin.so brixplugin.so pltplugin.so raster3dplugin.so parm7plugin.so rst7plugin.so tinkerplugin.so uhbdplugin.so vaspchgcarplugin.so vaspparchgplugin.so vaspposcarplugin.so vaspoutcarplugin.so vaspxdatcarplugin.so vaspxmlplugin.so dlpolyplugin.so lammpsplugin.so vtfplugin.so xyzplugin.so corplugin.so moldenplugin.so phiplugin.so pbeqplugin.so grdplugin.so situsplugin.so dxplugin.so spiderplugin.so mapplugin.so avsplugin.so fs4plugin.so pqrplugin.so mol2plugin.so gridplugin.so carplugin.so mdfplugin.so gamessplugin.so xsfplugin.so bgfplugin.so xbgfplugin.so jsplugin.so dtrplugin.so maeffplugin.so basissetplugin.so
+STATICPLUGINS = abinitplugin biomoccaplugin cpmdplugin psfplugin pdbplugin dcdplugin babelplugin gromacsplugin parmplugin crdplugin namdbinplugin binposplugin graspplugin msmsplugin stlplugin offplugin cubeplugin edmplugin ccp4plugin dsn6plugin brixplugin pltplugin raster3dplugin parm7plugin rst7plugin tinkerplugin uhbdplugin vaspchgcarplugin vaspparchgplugin vaspposcarplugin vaspoutcarplugin vaspxdatcarplugin vaspxmlplugin dlpolyplugin lammpsplugin vtfplugin xyzplugin corplugin moldenplugin phiplugin pbeqplugin grdplugin situsplugin dxplugin spiderplugin mapplugin avsplugin fs4plugin pqrplugin mol2plugin gridplugin carplugin mdfplugin gamessplugin xsfplugin bgfplugin xbgfplugin jsplugin maeffplugin dtrplugin basissetplugin
+PLUGINS = abinitplugin.so biomoccaplugin.so cpmdplugin.so psfplugin.so pdbplugin.so dcdplugin.so babelplugin.so gromacsplugin.so parmplugin.so crdplugin.so namdbinplugin.so binposplugin.so graspplugin.so msmsplugin.so stlplugin.so offplugin.so cubeplugin.so edmplugin.so ccp4plugin.so dsn6plugin.so brixplugin.so pltplugin.so raster3dplugin.so parm7plugin.so rst7plugin.so tinkerplugin.so uhbdplugin.so vaspchgcarplugin.so vaspparchgplugin.so vaspposcarplugin.so vaspoutcarplugin.so vaspxdatcarplugin.so vaspxmlplugin.so dlpolyplugin.so lammpsplugin.so vtfplugin.so xyzplugin.so corplugin.so moldenplugin.so phiplugin.so pbeqplugin.so grdplugin.so situsplugin.so dxplugin.so spiderplugin.so mapplugin.so avsplugin.so fs4plugin.so pqrplugin.so mol2plugin.so gridplugin.so carplugin.so mdfplugin.so gamessplugin.so xsfplugin.so bgfplugin.so xbgfplugin.so jsplugin.so dtrplugin.so maeffplugin.so basissetplugin.so
 
 #
 # Check to see if we should build the Tcl-based plugins
@@ -195,6 +195,9 @@ msmsplugin.so: ${ARCHDIR}/msmsplugin.o
 stlplugin.so: ${ARCHDIR}/stlplugin.o
 	$(SHLD) $(LOPTO)${ARCHDIR}/$@ $? $(LDFLAGS)
 
+offplugin.so: ${ARCHDIR}/offplugin.o
+	$(SHLD) $(LOPTO)${ARCHDIR}/$@ $? $(LDFLAGS)
+
 cubeplugin.so: ${ARCHDIR}/cubeplugin.o
 	$(SHLD) $(LOPTO)${ARCHDIR}/$@ $? $(LDFLAGS)
 
@@ -396,6 +399,9 @@ ${ARCHDIR}/msmsplugin.o: msmsplugin.C ${
 ${ARCHDIR}/stlplugin.o: stlplugin.C ${PLUGINAPI}
 	$(CXX) $(CXXFLAGS) $(SHLDFLAGS) $(INCDIR) -c $< $(COPTO)$@
 
+${ARCHDIR}/offplugin.o: offplugin.C ${PLUGINAPI}
+	$(CXX) $(CXXFLAGS) $(SHLDFLAGS) $(INCDIR) -c $< $(COPTO)$@
+
 ${ARCHDIR}/cubeplugin.o: cubeplugin.C ${PLUGINAPI} periodic_table.h unit_conversion.h
 	$(CXX) $(CXXFLAGS) $(SHLDFLAGS) $(INCDIR) -c $< $(COPTO)$@
 
@@ -541,7 +547,7 @@ ${ARCHDIR}/dtrplugin.o: dtrplugin.cxx ${
 # archive rules
 #
 
-ARCHIVEOBJS = ${ARCHDIR}/abinitplugin-s.o ${ARCHDIR}/biomoccaplugin-s.o ${ARCHDIR}/cpmdplugin-s.o ${ARCHDIR}/psfplugin-s.o ${ARCHDIR}/pdbplugin-s.o ${ARCHDIR}/dcdplugin-s.o ${ARCHDIR}/babelplugin-s.o ${ARCHDIR}/gromacsplugin-s.o ${ARCHDIR}/parmplugin-s.o ${ARCHDIR}/crdplugin-s.o ${ARCHDIR}/namdbinplugin-s.o ${ARCHDIR}/binposplugin-s.o ${ARCHDIR}/graspplugin-s.o ${ARCHDIR}/msmsplugin-s.o ${ARCHDIR}/stlplugin-s.o ${ARCHDIR}/edmplugin-s.o ${ARCHDIR}/ccp4plugin-s.o ${ARCHDIR}/dsn6plugin-s.o ${ARCHDIR}/brixplugin-s.o ${ARCHDIR}/pltplugin-s.o ${ARCHDIR}/cubeplugin-s.o ${ARCHDIR}/raster3dplugin-s.o ${ARCHDIR}/rst7plugin-s.o ${ARCHDIR}/parm7plugin-s.o ${ARCHDIR}/vtfplugin-s.o ${ARCHDIR}/xyzplugin-s.o ${ARCHDIR}/tinkerplugin-s.o ${ARCHDIR}/uhbdplugin-s.o ${ARCHDIR}/vaspchgcarplugin-s.o ${ARCHDIR}/vaspparchgplugin-s.o ${ARCHDIR}/vaspposcarplugin-s.o ${ARCHDIR}/vaspoutcarplugin-s.o ${ARCHDIR}/vaspxdatcarplugin-s.o ${ARCHDIR}/vaspxmlplugin-s.o ${ARCHDIR}/dlpolyplugin-s.o ${ARCHDIR}/lammpsplugin-s.o ${ARCHDIR}/corplugin-s.o ${ARCHDIR}/moldenplugin-s.o ${ARCHDIR}/phiplugin-s.o ${ARCHDIR}/pbeqplugin-s.o ${ARCHDIR}/grdplugin-s.o ${ARCHDIR}/situsplugin-s.o ${ARCHDIR}/dxplugin-s.o ${ARCHDIR}/spiderplugin-s.o ${ARCHDIR}/mapplugin-s.o ${ARCHDIR}/avsplugin-s.o ${ARCHDIR}/fs4plugin-s.o ${ARCHDIR}/pqrplugin-s.o ${ARCHDIR}/mol2plugin-s.o ${ARCHDIR}/gridplugin-s.o ${ARCHDIR}/carplugin-s.o ${ARCHDIR}/mdfplugin-s.o ${ARCHDIR}/gamessplugin-s.o ${ARCHDIR}/xsfplugin-s.o ${ARCHDIR}/bgfplugin-s.o ${ARCHDIR}/xbgfplugin-s.o ${ARCHDIR}/jsplugin-s.o ${ARCHDIR}/maeffplugin-s.o ${ARCHDIR}/dtrplugin-s.o ${ARCHDIR}/basissetplugin-s.o
+ARCHIVEOBJS = ${ARCHDIR}/abinitplugin-s.o ${ARCHDIR}/biomoccaplugin-s.o ${ARCHDIR}/cpmdplugin-s.o ${ARCHDIR}/psfplugin-s.o ${ARCHDIR}/pdbplugin-s.o ${ARCHDIR}/dcdplugin-s.o ${ARCHDIR}/babelplugin-s.o ${ARCHDIR}/gromacsplugin-s.o ${ARCHDIR}/parmplugin-s.o ${ARCHDIR}/crdplugin-s.o ${ARCHDIR}/namdbinplugin-s.o ${ARCHDIR}/binposplugin-s.o ${ARCHDIR}/graspplugin-s.o ${ARCHDIR}/msmsplugin-s.o ${ARCHDIR}/stlplugin-s.o ${ARCHDIR}/offplugin-s.o ${ARCHDIR}/edmplugin-s.o ${ARCHDIR}/ccp4plugin-s.o ${ARCHDIR}/dsn6plugin-s.o ${ARCHDIR}/brixplugin-s.o ${ARCHDIR}/pltplugin-s.o ${ARCHDIR}/cubeplugin-s.o ${ARCHDIR}/raster3dplugin-s.o ${ARCHDIR}/rst7plugin-s.o ${ARCHDIR}/parm7plugin-s.o ${ARCHDIR}/vtfplugin-s.o ${ARCHDIR}/xyzplugin-s.o ${ARCHDIR}/tinkerplugin-s.o ${ARCHDIR}/uhbdplugin-s.o ${ARCHDIR}/vaspchgcarplugin-s.o ${ARCHDIR}/vaspparchgplugin-s.o ${ARCHDIR}/vaspposcarplugin-s.o ${ARCHDIR}/vaspoutcarplugin-s.o ${ARCHDIR}/vaspxdatcarplugin-s.o ${ARCHDIR}/vaspxmlplugin-s.o ${ARCHDIR}/dlpolyplugin-s.o ${ARCHDIR}/lammpsplugin-s.o ${ARCHDIR}/corplugin-s.o ${ARCHDIR}/moldenplugin-s.o ${ARCHDIR}/phiplugin-s.o ${ARCHDIR}/pbeqplugin-s.o ${ARCHDIR}/grdplugin-s.o ${ARCHDIR}/situsplugin-s.o ${ARCHDIR}/dxplugin-s.o ${ARCHDIR}/spiderplugin-s.o ${ARCHDIR}/mapplugin-s.o ${ARCHDIR}/avsplugin-s.o ${ARCHDIR}/fs4plugin-s.o ${ARCHDIR}/pqrplugin-s.o ${ARCHDIR}/mol2plugin-s.o ${ARCHDIR}/gridplugin-s.o ${ARCHDIR}/carplugin-s.o ${ARCHDIR}/mdfplugin-s.o ${ARCHDIR}/gamessplugin-s.o ${ARCHDIR}/xsfplugin-s.o ${ARCHDIR}/bgfplugin-s.o ${ARCHDIR}/xbgfplugin-s.o ${ARCHDIR}/jsplugin-s.o ${ARCHDIR}/maeffplugin-s.o ${ARCHDIR}/dtrplugin-s.o ${ARCHDIR}/basissetplugin-s.o
 
 
 #
@@ -662,6 +668,9 @@ ${ARCHDIR}/msmsplugin-s.o: msmsplugin.C 
 ${ARCHDIR}/stlplugin-s.o: stlplugin.C ${PLUGINAPI}
 	${CXX} ${SCXXFLAGS} $(INCDIR) $(DEF)"VMDPLUGIN=molfile_stlplugin" -c $< $(COPTO)$@
 
+${ARCHDIR}/offplugin-s.o: offplugin.C ${PLUGINAPI}
+	${CXX} ${SCXXFLAGS} $(INCDIR) $(DEF)"VMDPLUGIN=molfile_offplugin" -c $< $(COPTO)$@
+
 ${ARCHDIR}/cubeplugin-s.o: cubeplugin.C ${PLUGINAPI} periodic_table.h unit_conversion.h
 	${CXX} ${SCXXFLAGS} $(INCDIR) $(DEF)"VMDPLUGIN=molfile_cubeplugin" -c $< $(COPTO)$@
 
diff -Npur plugins/molfile_plugin/src/offplugin.C /Users/fx/devel/vmd-1.9.src/plugins/molfile_plugin/src/offplugin.C
--- plugins/molfile_plugin/src/offplugin.C	1970-01-01 01:00:00.000000000 +0100
+++ /Users/fx/devel/vmd-1.9.src/plugins/molfile_plugin/src/offplugin.C	2011-07-02 10:59:37.000000000 +0200
@@ -0,0 +1,212 @@
+/*
+ *  Object File Format (.off)
+ *
+ *  Represent surfaces composed of polygons. It is documented there:
+ *  http://people.sc.fsu.edu/~jburkardt/data/off/off.html
+ *  http://shape.cs.princeton.edu/benchmark/documentation/off_format.html
+ *
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <math.h>
+#include <string.h>
+
+#if defined(_AIX)
+#include <strings.h>
+#endif
+
+#if defined(WIN32) || defined(WIN64)
+#define strcasecmp stricmp
+#endif
+
+#include "molfile_plugin.h"
+
+static void *open_file_read(const char *filepath, const char *filetype,
+    int *natoms) {
+  FILE *f;
+  
+  f = fopen(filepath, "rb");
+  if (!f) {
+    fprintf(stderr, "offplugin) Error opening file.\n");
+    return NULL;
+  }
+  *natoms = 0;
+  return f;
+}
+
+
+static char *nextNoncommentLine(char *buff, int bufflen, FILE *f)
+{
+  while (1)
+  {
+    char *res = fgets(buff, bufflen, f);
+    if (!res || (res[0] != '#' && res[0] != '\n'))
+      return res;
+  };
+}
+
+
+static int read_rawgraphics(void *v, int *nelem, 
+    const molfile_graphics_t **data) {
+    int i, k, n;
+    int nVert, nFaces, nEdges;
+    float *vertices = NULL;
+    molfile_graphics_t *graphics = NULL;
+
+#define BUFFLEN 1024
+    char buff[BUFFLEN+1];
+    FILE *infile = (FILE *)v;
+
+    // First line is the header: "OFF"
+    nextNoncommentLine(buff, BUFFLEN, infile);
+    if (buff[0] != 'O' || buff[1] != 'F' || buff[2] != 'F')
+    {
+      fprintf(stderr, "offplugin) error: expected \"OFF\" header.\n");
+      goto error;
+    }
+
+    // Second line: numVertices numFaces numEdges
+    nextNoncommentLine(buff, BUFFLEN, infile);
+    if (sscanf (buff, " %d %d %d", &nVert, &nFaces, &nEdges) < 2
+	|| nVert <= 0 || nFaces <= 0)
+    {
+      fprintf(stderr, "offplugin) error: wrong number of elements.\n");
+      goto error;
+    }
+
+    // Read vertices
+    vertices = (float *) calloc (3 * nVert, sizeof(float));
+    for (i = 0; i < nVert; i++)
+    {
+      nextNoncommentLine(buff, BUFFLEN, infile);
+      if (sscanf (buff, " %g %g %g", &vertices[3*i], &vertices[3*i+1], &vertices[3*i+2]) != 3)
+      {
+	fprintf(stderr, "offplugin) error: not enough data.\n");
+	goto error;
+      }
+    }
+
+    // Read faces
+    // We alloc twice the memory because a quadrangle will be transformed
+    // into two triangles.
+    graphics = (molfile_graphics_t *) calloc(2*nFaces, sizeof(molfile_graphics_t));
+    n = 0;
+    for (i = 0; i < nFaces; i++)
+    {
+      int idx[10], j;
+      nextNoncommentLine(buff, BUFFLEN, infile);
+
+      j = sscanf (buff, "%d %d %d %d %d %d %d %d %d %d %d", &k,
+		  &idx[0], &idx[1], &idx[2], &idx[3], &idx[4],
+		  &idx[5], &idx[6], &idx[7], &idx[8], &idx[9]);
+
+      if (j < k + 1 || k < 3)
+      {
+	fprintf(stderr, "offplugin) error: not enough data.\n");
+	goto error;
+      }
+
+      if (k > 4)
+      {
+	// TODO -- handle polygon decomposition into triangles
+	// Follow the algorithm there:
+	// http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml
+	fprintf(stderr, "offplugin) error: TODO -- handling polygons with more than 4 vertices.\n");
+	goto error;
+      }
+
+      if (k == 3)
+      {
+	graphics[n].type = MOLFILE_TRIANGLE;
+	graphics[n].data[0] = vertices[3*idx[0]];
+	graphics[n].data[1] = vertices[3*idx[0]+1];
+	graphics[n].data[2] = vertices[3*idx[0]+2];
+	graphics[n].data[3] = vertices[3*idx[1]];
+	graphics[n].data[4] = vertices[3*idx[1]+1];
+	graphics[n].data[5] = vertices[3*idx[1]+2];
+	graphics[n].data[6] = vertices[3*idx[2]];
+	graphics[n].data[7] = vertices[3*idx[2]+1];
+	graphics[n].data[8] = vertices[3*idx[2]+2];
+	n++;
+      }
+
+      if (k == 4)
+      {
+	// Split a quadrangle into two triangles
+	graphics[n].type = MOLFILE_TRIANGLE;
+	graphics[n].data[0] = vertices[3*idx[0]];
+	graphics[n].data[1] = vertices[3*idx[0]+1];
+	graphics[n].data[2] = vertices[3*idx[0]+2];
+	graphics[n].data[3] = vertices[3*idx[1]];
+	graphics[n].data[4] = vertices[3*idx[1]+1];
+	graphics[n].data[5] = vertices[3*idx[1]+2];
+	graphics[n].data[6] = vertices[3*idx[2]];
+	graphics[n].data[7] = vertices[3*idx[2]+1];
+	graphics[n].data[8] = vertices[3*idx[2]+2];
+	n++;
+
+	graphics[n].type = MOLFILE_TRIANGLE;
+	graphics[n].data[0] = vertices[3*idx[2]];
+	graphics[n].data[1] = vertices[3*idx[2]+1];
+	graphics[n].data[2] = vertices[3*idx[2]+2];
+	graphics[n].data[3] = vertices[3*idx[3]];
+	graphics[n].data[4] = vertices[3*idx[3]+1];
+	graphics[n].data[5] = vertices[3*idx[3]+2];
+	graphics[n].data[6] = vertices[3*idx[0]];
+	graphics[n].data[7] = vertices[3*idx[0]+1];
+	graphics[n].data[8] = vertices[3*idx[0]+2];
+	n++;
+      }
+    }
+
+    *nelem = n;
+    *data = (molfile_graphics_t *) realloc(graphics, n*sizeof(molfile_graphics_t));
+
+    return MOLFILE_SUCCESS;
+
+
+error:
+    // Clear memory
+    free (graphics);
+    free (vertices);
+
+    // Bail out
+    return MOLFILE_ERROR;
+}
+
+static void close_file_read(void *v) {
+  fclose((FILE *)v);
+}
+
+
+/*
+ * Initialization stuff here
+ */
+static molfile_plugin_t plugin;
+
+VMDPLUGIN_API int VMDPLUGIN_init(void) {
+  memset(&plugin, 0, sizeof(molfile_plugin_t));
+  plugin.abiversion = vmdplugin_ABIVERSION;
+  plugin.type = MOLFILE_PLUGIN_TYPE;
+  plugin.name = "off";
+  plugin.prettyname = "Object File Format (OFF)";
+  plugin.author = "Francois-Xavier Coudert";
+  plugin.minorv = 1;
+  plugin.majorv = 0;
+  plugin.is_reentrant = VMDPLUGIN_THREADSAFE;
+  plugin.filename_extension = "off";
+  plugin.open_file_read = open_file_read;
+  plugin.read_rawgraphics = read_rawgraphics;
+  plugin.close_file_read = close_file_read;
+  return VMDPLUGIN_SUCCESS;
+}
+
+VMDPLUGIN_API int VMDPLUGIN_register(void *v, vmdplugin_register_cb cb) {
+  (*cb)(v, (vmdplugin_t *)&plugin);
+  return VMDPLUGIN_SUCCESS;
+}
+
+VMDPLUGIN_API int VMDPLUGIN_fini(void) { return VMDPLUGIN_SUCCESS; }
+

