pyscf / gpu4pyscf

A plugin to use Nvidia GPU in PySCF package
GNU General Public License v3.0
122 stars 21 forks source link

Support for Calculating Surface Area Using Implicit Solvation Models in gpu4PySCF #144

Closed ORCAaAaA-ui closed 4 months ago

ORCAaAaA-ui commented 5 months ago

Hello,

I am currently conducting DFT calculations using ORCA, utilizing implicit solvation models such as CPCM and SMD. In ORCA, when using these solvation models, the .cpcm file provides values for surface points' charges and areas.

I am interested in performing similar calculations using gpu4PySCF and would like to know if gpu4PySCF supports these functionalities. Specifically, I am looking for information on whether it's possible to calculate and extract surface area values using implicit solvation models in gpu4PySCF.

Below is an example of what the .cpcm file looks like in ORCA:

image

Any guidance on how to set up and use such features in gpu4PySCF would be greatly appreciated.

Thank you!

wxj6000 commented 5 months ago

Those intermediate variables are stored in mf.with_solvent.surface and mf.with_solvent.__intermediates. They are not documented.

mf.with_solvent.surface contains the info when the surface is generated. For instance grid_coords for grid coordinates, switch_fun for the value of switching function, area for grid area. https://github.com/pyscf/gpu4pyscf/blob/master/gpu4pyscf/solvent/pcm.py#L156

mf.with_solvent.__intermediates contains the intermediate values during the calculations. For instance, K for the stiffness matrix, R for the matrix on the right hand side. q for the charge. q_sym for the symmetrized charge. v_grids for the potential on grids. https://github.com/pyscf/gpu4pyscf/blob/master/gpu4pyscf/solvent/pcm.py#L338