Molecular Density?

General discussion of the Cambridge quantum Monte Carlo code CASINO; how to install and setup; how to use it; what it does; applications.
Post Reply
Kayahan
Posts: 22
Joined: Fri Jun 07, 2013 5:56 pm

Molecular Density?

Post by Kayahan »

Dear CASINO Users,

As I checked the latest version of the manual, I came across with this (in page 112):
START MOLECULAR DENSITY
Accumulation carried out using
VMC
Grid size
100 100 1
Coordinates of A
3.0000000000000000 3.0000000000000000 2.9999999999999999E-002
Coordinates of B
-3.0000000000000000 -3.0000000000000000 -2.9999999999999999E-002
Nstep, Total weight, Total weight^2
1000000.0000000000 1000000.0000000000 1000000.0000000000
START SET 1
n_i,(n_i)**2
(...)
END SET 1
START SET 2
n_i,(n_i)**2
(...)
END SET 2
END MOLECULAR DENSITY
It is not present in 2013 manual and I guess it is something implemented in current beta. In the preceding pages, if I am not missing, relevant information about other expectation values are given but not about the molecular density. Does this mean that plotting finite system charge densities without spherical symmetry is implemented in CASINO? It seems to be still in the todo list at Vallico webpage. If it is finite system implementation, I would be happy to learn about its format and how grid density can be changed.

Thanks,
Kayahan
Mike Towler
Posts: 239
Joined: Thu May 30, 2013 11:03 pm
Location: Florence
Contact:

Re: Molecular Density?

Post by Mike Towler »

Hi Kayahan,

The DIARY file is your friend:

Code: Select all

---[v2.13.414]---
* expval.f90: added molecular density expectation value
  -- Blazej Jaworowski, 2014-09-21

  Initial patch by Blazej Jaworowski, extended and modified by PLR.

  This patch implements accumulation in bins of the density for non-periodic
  systems with more than one atom.

  Accumulation is activated via the DENSITY input keyword, and the accumulated
  data go to the MOLECULAR DENSITY block of the expval.data file, which is now
  documented in the manual.  Updated plot_expval to handle the MOLECULAR DENISTY
  block, producing a lineplot.dat, 2D_plot.dat or 3D_plot.dat file as required.
So basically, this was put in the code only a few days ago, which is why I haven't necessarily updated all the web page stuff to reflect the change.

As you can see this was implemented by Blazej, who masquerades as varelse in these forums. He was our Summer School Champion from a couple of years back, and he has clearly now found an outlet for his QMC talents (for which we're very grateful). Apart from a brief glance at some plots he showed me at the conference this year, I haven't actually looked at this yet. Clearly Pablo has though -- as he sent me the patch -- and he seems to have polished the initial version a bit.

There was a discussion about this a while back here:

http://www.vallico.net/casino-forum/vie ... p?f=4&t=67

which sets this in context and in which I talked about the 'too many bins' problem (there are better -- though more complicated -- ways to do this than by using bins..). Perhaps Blazej could comment on how his implementation works practically..?
Kayahan
Posts: 22
Joined: Fri Jun 07, 2013 5:56 pm

Re: Molecular Density?

Post by Kayahan »

Hi Mike,

Thanks for your thorough reply. So regarding the grid density issue that you pointed out in the old post, which you forwarded to me, I am wondering something. What criteria should we apply while choosing the sufficient grid density? Maybe I am thinking too simple, but should it be just enough to resolve most energetic charge oscillations in the real space? Therefore, can we be more flexible with the grid density if we are using pseudo potential rather than running all electron calculation? Is the reason why you say we need 5000^3 grid density for benzene because only in that way we can identify the nodal surface?

Thanks,
Kayahan
varelse
Posts: 44
Joined: Mon Jun 10, 2013 10:17 pm

Re: Molecular Density?

Post by varelse »

This implementation takes a cuboid whose corners are A and B, and whose edges are along x,y,z axes, and divides it into bins (number of bins in each direction is specified by "Grid size"). So A and B define the region you are working in. Later it goes as in Mike's post, it counts how many times a walker visits a bin. The output is written in such a way that you can read it in nested loop first looping over z direction, then y, then x (by "first" I mean that the loop over z direction is the outer one - so it is similar to the Gaussian cube format http://paulbourke.net/dataformats/cube/, but the loops are in reversed order).

"Set 1" and "Set 2" are for spin up and down.

As far as I know the only way to use parameters other than default is is to create an empty expval.data file with your values of parameters (by "empty" I mean that the data in sets have to be fillled with bins_x*bins_y*bins_z lines of "0 0" - one zero for n_i and other for n_i^2, and also Nstep, Total weight and Total weight^2 have to be set to 0).

You can use plot_expval to generate data for plot (although here ask Pablo - I didn't do anything in this part).

If you have other questions - please ask.
Post Reply