Index: trunk/gui/scripts/molvisviewer.tcl
===================================================================
--- trunk/gui/scripts/molvisviewer.tcl	(revision 6052)
+++ trunk/gui/scripts/molvisviewer.tcl	(revision 6640)
@@ -910,19 +910,4 @@
             set serial    1
 
-            if { $_reportClientInfo }  {
-                set parent [$dataobj parent -as object]
-                while { $parent != "" } {
-                    set xmlobj $parent
-                    set parent [$parent parent -as object]
-                }
-                set info {}
-                lappend info "tool_id"      [$xmlobj get tool.id]
-                lappend info "tool_name"    [$xmlobj get tool.name]
-                lappend info "tool_title"   [$xmlobj get tool.title]
-                lappend info "tool_command" [$xmlobj get tool.execute]
-                lappend info "tool_revision" \
-                    [$xmlobj get tool.version.application.revision]
-                SendCmd "clientinfo [list $info]"
-            }
             foreach _atom [$dataobj children -type atom components.molecule] {
                 set symbol [$dataobj get components.molecule.$_atom.symbol]
@@ -946,8 +931,29 @@
                 incr serial
             }
+            if { $_reportClientInfo }  {
+                set parent [$dataobj parent -as object]
+                while { $parent != "" } {
+                    set xmlobj $parent
+                    set parent [$parent parent -as object]
+                }
+            }
             if {"" != $data1} {
                 # Save the PDB data in case the user wants to later save it.
                 set _pdbdata $data1
                 set numBytes [string length $data1]
+
+                if { $_reportClientInfo }  {
+                    set info {}
+                    lappend info "tool_id"      [$xmlobj get tool.id]
+                    lappend info "tool_name"    [$xmlobj get tool.name]
+                    lappend info "tool_title"   [$xmlobj get tool.title]
+                    lappend info "tool_command" [$xmlobj get tool.execute]
+                    lappend info "tool_revision" \
+                        [$xmlobj get tool.version.application.revision]
+                    lappend info "dataset_type" "molecule-xml"
+                    lappend info "dataset_size"  $numBytes
+                    lappend info "dataset_tag"   $model-$state
+                    SendCmd "clientinfo [list $info]"
+                }
 
                 # We know we're buffered here, so append the "loadpdb" command
@@ -964,4 +970,18 @@
                 set numBytes [string length $data2]
 
+                if { $_reportClientInfo }  {
+                    set info {}
+                    lappend info "tool_id"      [$xmlobj get tool.id]
+                    lappend info "tool_name"    [$xmlobj get tool.name]
+                    lappend info "tool_title"   [$xmlobj get tool.title]
+                    lappend info "tool_command" [$xmlobj get tool.execute]
+                    lappend info "tool_revision" \
+                        [$xmlobj get tool.version.application.revision]
+                    lappend info "dataset_type" "pdb"
+                    lappend info "dataset_size"  $numBytes
+                    lappend info "dataset_tag"   $model-$state
+                    SendCmd "clientinfo [list $info]"
+                }
+
                 # We know we're buffered here, so append the "loadpdb" command
                 # with the data payload immediately afterwards.
@@ -971,7 +991,7 @@
             }
             # lammps dump file overwrites pdb file (change this?)
-            set lammpstypemap [$dataobj get components.molecule.lammpstypemap]
             set lammpsdata [$dataobj get components.molecule.lammps]
             if {"" != $lammpsdata} {
+                set lammpstypemap [$dataobj get components.molecule.lammpstypemap]
                 set data3 ""
                 set modelcount 0
@@ -1013,4 +1033,18 @@
                     set numBytes [string length $data3]
 
+                    if { $_reportClientInfo }  {
+                        set info {}
+                        lappend info "tool_id"      [$xmlobj get tool.id]
+                        lappend info "tool_name"    [$xmlobj get tool.name]
+                        lappend info "tool_title"   [$xmlobj get tool.title]
+                        lappend info "tool_command" [$xmlobj get tool.execute]
+                        lappend info "tool_revision" \
+                            [$xmlobj get tool.version.application.revision]
+                        lappend info "dataset_type" "lammps"
+                        lappend info "dataset_size"  $numBytes
+                        lappend info "dataset_tag"   $model-$state
+                        SendCmd "clientinfo [list $info]"
+                    }
+
                     # We know we're buffered here, so append the "loadpdb"
                     # command with the data payload immediately afterwards.
