I'm sorry for delayed reply.
The exact answer to your question depends on computational method.
The general comment is that if you add the following option to your
$eldens diffd=.t. $end
(This option is documented here:
then Firefly will automatically compute and punch the differences
between two consecutive densities. This may require setting proper
iroot or istate keyword depending on particular computational method.
Unfortunately this does not work well for TDDFT as normally one is
interested in difference of relaxed density and KS density while
Firefly would computes two differences:
one between non-relaxed TDDFT density and KS densities and second
between relaxed and non-relaxed TDDFT densities. To make this work
one needs to specify proper nstate and istate in $tddft group and
adds tdprp=.t. to $dft group.
As to second part of your question, I'd suggest you to use gOpenMol
to manipulate cubes and plt files. First, gOpenMol distribution
contains gamess2plt utility that was developed to extract $CUBE
information from the PC GAMESS/Firefly punch files and convert them to
plt files. Second, there is an utility called contman that can be used
to add or subtract two plt files. Finally, plt files can be visualised
by either gOpenMol or by (the better way) Chimera and probably by some
other visualizer. In addition, powerful general purpose vilualizers
like VisIt and ParaView accepts cube files and can manipulate them.
All the best,
On Wed Jun 8 '16 4:09pm, Michal Krompiec wrote
>Hi, how can I generate a CUBE file for the difference in electron density between a chosen excited state and the ground state? If it is not possible directly, can I subtract the respective CUBEs with some external software? (other than ChemCraft)