how to set q_point to 0.0 0.0 0.0 in quantumespresso.ph.x?

18 views
Skip to first unread message

Witty Yonng

unread,
Aug 25, 2022, 7:05:02 AM8/25/22
to aiidausers
Hi all,

I want to calculate effective charge using quantumespresso.ph.x and can not set q_points to zero  [0.0, 0.0, 0.0], because it always raise error. Could you give me an example about how to set q_points to zero?
Thanks,

Best,
Witty

Jusong Yu

unread,
Aug 26, 2022, 2:36:10 AM8/26/22
to aiidausers
Hi Witty,

Can you elaborate a bit on which error was raised? 
The qpoints can be set by creating an orm.KpointsData and pass to PhBaseWorkflow. 
Here is how I put it in my workflow (be careful that the shape of qpoints_list depends on the dimension of your system[1]):

```
qpoints_list = [[0.0, 0.0, 0.0], [0.5, 0.5, 0.5]]

qpoints = orm.KpointsData()
qpoints.set_cell_from_structure(self.ctx.structure)
qpoints.set_kpoints(qpoints_list)


inputs = {
                    "code": <ph_code>,
                    "qpoints": qpoints,
                    "parameters": orm.Dict(dict=<.ph_parameters>),
                    "metadata": {
                        "options": <ph_options>,
                    },
                },

self.submit(PwBaseWorkflow, **inputs)
```

I hope it helps.

Best,
Jason

Reply all
Reply to author
Forward
0 new messages