theochem / grid

Python library for numerical integration, interpolation, and differentiation on (molecular) grids.
https://grid.qcdevs.org/
GNU Lesser General Public License v3.0
46 stars 19 forks source link

Construct and export cube files #204

Closed marco-2023 closed 11 months ago

marco-2023 commented 11 months ago

I think it would be helpful to have the functionality to define a uniform grid and export it as a cube file. Doing the reverse (going from a cube to a grid) could be useful too. The idea is that is easier to work with grid than with utilities such as Gaussian's cubman.

Also in this way, we provide an expedited way to visualize results e.g. surfaces that depend on electron densities (create a uniform grid and export to cube).

PaulWAyers commented 11 months ago

@FarnazH can speak to this. I think it is not much work to do this and yet has some advantage. However, we'd want to be sure that the interface/features resemble the ChemTools choices, similar to the way we (try to) use IOData names for variables that appear in IOData also.

Ali-Tehrani commented 11 months ago

Read Cube https://github.com/theochem/chemtools/blob/4078cd125e3d0742f4fae2b06f4528ac20161cf2/chemtools/utils/cube.py#L153

Generate Cube https://github.com/theochem/chemtools/blob/4078cd125e3d0742f4fae2b06f4528ac20161cf2/chemtools/utils/cube.py#L259

Potential test to add https://github.com/theochem/chemtools/blob/4078cd125e3d0742f4fae2b06f4528ac20161cf2/chemtools/utils/test/test_cube.py#L134

FarnazH commented 11 months ago

PR #211 addressed this issue.