aoterodelaroza / critic2

Analysis of quantum chemical interactions in molecules and solids.
Other
97 stars 35 forks source link

Definition scalar fields #47

Closed wutobias closed 2 years ago

wutobias commented 3 years ago

Hi, I am confused about how scalar fields are being defined using molecule as input for critic2. For instance, when using something along these lines as input file

molecule benzene.fchk
load benzene.fchk id wfn READVIRTUAL
load as "$wfn" 150 150 150 id dens

Critic2 creates a grid with 150 grid centers in each direction, but I don't see how I could set the length of each grid axis. That being said, I don't know how to set the density of grid centers (in each direction) in advance. Ideally, I want to be able to make grids with the same grid center density in each direction. Is there a way to define either the length of the axis in each direction or the density of grid centers in each direction (something like grid centers / bohr)?

Thanks!

aoterodelaroza commented 3 years ago

Molecules in critic2 are also treated as periodic systems, because critic was originally a program for solids and molecules are a bit of an afterthought. When you load the molecular structure with molecule, critic2 assigns a periodic cell that is by default 10 angstrom larger than the molecule in each direction. You can control this by passing the border you want after the molecule file name and you can also make the periodic cell cubic with the CUBIC keyword. See MOLECULE in the manual.

Grid scalar fields loaded with LOAD AS span the whole periodic cell. The number of points in each direction combined with the options above to set the dimensions of the cell are all there is. You have several options:

wutobias commented 3 years ago

Thanks @aoterodelaroza ! Indeed the CUBE keyword is what I wanted. I am now mapping the field into a cube file and reading it back in, which works nicely.

I was confused by something in the manual: The manual entry for Grid (CUBE) says that the default units for defining end-points for a molecule system (loaded with molecule) is Angstrom. However the keyword for the density of points along an axes in the cube is given by bpp which means “bohr per point”. Maybe one can add that for a molecule system bpp is still really Bohr although the end-points are in Angstrom.

aoterodelaroza commented 3 years ago

That's a good point. I've changed bpp to lpp (length per point) and pushed a modification to the code so it interprets lpp in bohr for crystals and in angstrom for molecules, to make it consistent with the rest of the keywords. I've also changed that particular section in the manual.