support multiple volumetric data

34 views
Skip to first unread message

Yun Liu

unread,
Sep 5, 2023, 4:31:51 AM9/5/23
to Beautiful Atoms
Does Batoms currently support multiple volumetric data? I see on the github page that some changes were merged in May.

Is there any example to demonstrate this capability? Thank you very much.

Xing Wang

unread,
Sep 6, 2023, 2:55:39 AM9/6/23
to Beautiful Atoms

Yun Liu

unread,
Oct 4, 2023, 4:52:26 AM10/4/23
to Beautiful Atoms
Apologies my previous message was sent privately, and thanks for the reply.

I managed to load multiple volumetric data into the "VolumetricData" object. Here is the output from perovskite.volumetric_data
name          npoint        shape  
hole      1830600 [  120    135    113]
electron      1830600 [  120    135    113]
------------------------------------------------------------

How to render these 2 data using different isosurface settings? Currently I'm using the following 3 lines in python to control the isosurface rendering
perovskite.isosurface.settings["1"] = {'level': 0.015, 'color': [1, 0, 0, 0.5]}
perovskite.isosurface.settings["2"] = {'level': 0.015, 'color': [0, 0, 1, 0.5]}
perovskite.isosurface.draw()

It seems that only the "hole" isosurface is loaded, and that setting 2 will override setting 1.

Thank you very much.

Xing Wang

unread,
Oct 4, 2023, 8:30:36 AM10/4/23
to Yun Liu, Beautiful Atoms

You can set 'volumetric_data' in the settings

perovskite.isosurface.settings["1"] = {'level': 0.015, 'color': [1, 0, 0, 0.5], 'volumetric_data': 'hole'}
perovskite.isosurface.settings["2"] = {'level': 0.015, 'color': [0, 0, 1, 0.5], 'volumetric_data': 'electron'}

--
You received this message because you are subscribed to the Google Groups "Beautiful Atoms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beautiful-ato...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beautiful-atoms/cd0fea66-f667-4131-bd65-9365beba34f8n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yun Liu

unread,
Oct 16, 2023, 4:18:55 AM10/16/23
to Beautiful Atoms
Thank you very much for the help. The solution worked very well.
Reply all
Reply to author
Forward
0 new messages