From: John Stone (
Date: Tue Nov 22 2016 - 17:27:12 CST

Hi Matt,
  At present, the VMD molden plugin loads the data as-is, and
it does not try to compress or discard any "inconsequential" terms.

If your CP2K code is only doing 1/10th or 1/100th of what's in the
file, that likely explains the speed difference you observe vs. the
CPU-only code in VMD since VMD is going to process everything you
send it. For your CP2K approach, what sort of threshold/compression
scheme are you using? How does a user control it? If it is not terribly
complex to evaluate it would probably be possible to add such a control
into VMD for cases like yours where the projection onto gto basis might
lead to a lot of near-zero terms that are necessary for complete numerical
accuracy, but would be complete overkill when performing routine
visualization tasks.

>From your previous email, it is clear that you aren't getting
GPU acceleration, but I would remind/caution that you have to
be running a VMD build that has CUDA enabled to get GPU acceleration.
You should see a CUDA-related startup message that looks
something like this in the VMD text console:
  Info) Creating CUDA device pool and initializing hardware...
  Info) Detected 1 available CUDA accelerator:
  Info) [0] GeForce GTX 980 16 SM_5.2 @ 1.22 GHz, 4.0GB RAM, KTO, AE2, ZCP

If you don't see messages like that during startup, then you won't
get the speedup from the GPUs when you go to display the orbitals,
regardless of the size of the basis set etc.

If you do see the CUDA startup messages, but you're still going into
CPU fallback, then I may be able to give you some environment variables
to try to collect more diagnostic info from VMD.

If you don't have a means to post the file locally, could you put it into
a simple Google Drive folder or something similar, or one that I invite
you to drop the file into?

  John Stone

On Tue, Nov 22, 2016 at 10:31:28PM +0000, Matt Watkins wrote:
> Hi,
> the hope is to use it for fairly large systems (compared to conventional
> QC softwares), so I'm just seeing what is doable.
> System I tried is 192 atoms (48 Si and 144 CaF2) with double zeta plus
> polarization basis - so up each atom having a D shell, and the basis set
> is quite heavy with 6-7 primitive gaussians contracted per shell. I
> appreciate this might be fairly heavy, total output size is 125 MB, so I
> can't easily directly share. The equivalent step in CP2K costs ~20s on 8
> CPU cores (there are quite some optimizations for the form of basis set
> etc though), VMD was ~800s.
> I should say that at the moment I am not 'compressing' the output at all -
> i.e. just directly printing all MO coefficients, so it is hard to compare
> to the cost within the CP2K, where we throw away density matrix elements
> below a certain threshold. I suspect I can get a 10-100x compression at
> negligible cost in accuracy for visualization by truncating the output at
> a given size and trimming data lengths. But I think the plugin has a
> threshold?
> Thanks for the rapid response, I'd be very interested in working out a way
> to get this working nicely. I'll add in some 'compression' to make things
> more reasonable and get back in touch,
> Matt
> P.S. thinking ahead, would it be plausible to get this projection working
> with periodic boundary conditions, at least for orthorhombic cells?
> On Tue, Nov 22, 2016 at 10:01 PM, John Stone <[1]> wrote:
> Hi,
> A What can you tell me about the size of the basis set or the highest
> shell type it incorporates?A It is possible that some aspect of your
> conversion is overwhelming a size limit in the GPU code that might be
> a very uncommon case for the other codes we've tested with.A I would be
> happy to get a copy of the input files you're testing with so I can look
> at it in more detail.
> Cheers,
> A John Stone
> A [2]
> On Tue, Nov 22, 2016 at 09:03:38PM +0000, Matt Watkins wrote:
> >A A Dear all,
> >A A I'm interested in using [1]VMDs orbital representation for rapid
> >A A visualisation of molecular orbitals. I've added the ability to
> output
> >A A MOLDEN format to CP2K, and can successfully read in the orbitals
> (as
> >A A compared to cube files). But it seems that the operations putting
> the
> >A A gaussians on the grid are occurring on the CPU rather than GPU
> (just
> >A A looking at CPU usage) and the performance is not great.
> >A A Are there any settings to activate GPU / speed up the orbital
> rendering
> >A A (beyond increasing the grid size) - I've only tried through the
> >A A interface currently.
> >A A I've tried VMD 1.92 and 1.93 on Windows 7. It seems to be picking
> up the
> >A A QUADRO card in the blurb on startup and claims full rendering
> modes
> >A A available.
> >A A Thanks for the great program,
> >A A Matt
> >
> > References
> >
> >A A Visible links
> >A A 1.
> [3]
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> [4] A A A A A Phone: [5]217-244-3349
> [6]
> References
> Visible links
> 1.
> 2.
> 3.
> 4.
> 5. tel:217-244-3349
> 6.

NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349