Does Paraview know chemistry?

Hi, I tried to upload a .cml file of a molecule in Paraview to find out if it communicated with Avogadro and in fact, to my great surprise, I found my molecule in the Paraview render view.

So I wonder: is it possible to create a molecule directly in Paraview rather than creating it in Avogadro and then opening it in Paraview?
I do not find any information on the guide about the topic

ParaView is intended for display and analysis. Creating data is not what it is designed for.

That said, you can programatically create a molecule inside ParaView using Programmable Source, output set to vtkMolecule, and then write the appropriate vtk python code (mostly use AppendAtom(atomicNumber, x, y ,z) method, and optionnally set AtomData or BondData)

I found an external software that creates the molecule, and calculates the electron density, orbitals, etc …
This software creates a file in cube format. When I open the file with paraview, I can get the result with the gaussian cube reader but I can visualize the molecule but not the densities. Is there any filter that I may not know that allows me to achieve this?

This is also a topic that interests me. I have had the most success with paraview 5.9.1 and the .xyz format.

From there, I use the Chemistry: Compute Molecular Bonds filter to get a visualization of the bonds. This gives me usable results, but double bonds are missing. PDB format is hit or miss.

1 Like

I am also trying to get this running:

As @nicolas.vuaille said ParaView doesn’t have a molecule editor. However, this functionality is available in Avogadro. The result can be visualized in ParaView.

@waveman Let us know how you get on with the JupyterLab integration.

Not well, so far. I’m not very good with node.js/npm, so that might be my problem.

Essentially, I am running into issues with the dependencies. If I understand it correctly, the syntax:

"@lumino/widgets": "^1.17.0"

means that it can be 1.17.0 or higher, as long as it’s < 2.0. For example, lumino is now 2.6. Jupyterlab in the binder is at version 1.1.4. Jupyterlab is in the meantime at version 3.2.1.

jupyter labextension install @openchemistry/jupyterlab

gives me the following:

An error occurred.
ValueError: The extension "@openchemistry/jupyterlab" does not yet support the current version of JupyterLab.

Conflicting Dependencies:
JupyterLab      Extension       Package
>=1.19.0 <2.0.0 1.17.0          @lumino/widgets
See the log file for details:  /tmp/jupyterlab-debug-2srd9aaa.log

Various attempts at convincing the conda nodejs (16.13.1) to create a yarn of a local version failed.

Any suggestions?

@waveman I think this PR may resolve your issue: Update reqs for @lumino deps. by mskblackbelt · Pull Request #70 · OpenChemistry/jupyterlab_cjson · GitHub. I will cut an new release soon.


1 Like

When visualizing simulation results, it is inordinately useful to visualize the molecule with bonds together with electron densities, potentials etc.

@waveman Please feel free to raise a issue with this feature request.

Thanks. Done: paraview#21149.