Hi @bastonero
Is it possible to access the vibrational modes from vibroscopy, like we do in ph.x (.axsf file)?
Rijan
Hi @bastonero
Is it possible to access the vibrational modes from vibroscopy, like we do in ph.x (.axsf file)?
Rijan
I don’t know this format. What do you mean? You can use one of the scripts I shared, and use the Phonopy
class to post-process further.
Hi @bastonero
I am talking about how atoms vibrates in each mode (that also includes in Raman active modes) kind of display. I havent used phonopy a lot, but can something like this (eigenvectors in each modes) be extracted from calculation completed in IRamanSpectraWorkChain?
Unfortunately there is no direct way to get such thing yet. Since the entire aiida-vibroscopy is built on top of Phonopy, you should look into it to get these.
So for instace, via aiida-phonopy:
from aiida_phonopy.calculations.phonopy import PhonopyCalculation
inputs = {
'parameters': Dict('anime_type': 'jmol', 'anime': [0,0,0]), # phonons at Gamma
'force_constants': vibrational_data_node, # here a vibrational data node that you want to use
'code': load_code('phonopy@localhost'), # change here
'settings': Dict('keep_animation_files': True).
}
calc = submit(PhonopyCalculation, **inputs)
print(f'Launched calculation with PK = {calc.pk}')
Then you can find these files in calc.outputs.retrieved
(or just do load_node(PK).outputs.retrieved
). This is a FolderData
, and then via python you can simply get the file and dump it wherever you want.
If you want other options look here: Setting tags — Phonopy v.2.22.0
You can use any of such setting tags to postprocess your data.
For instance:
node = load_node(PK)
folder = node.outputs.retrieved
print(folder.list_object_names())
You can see how to use FolderData here: Data types — AiiDA 2.5.1.post0 documentation
Bare with me if some typos are in the scripts, just wrote them on the fly. But you should have got the gist.
Hi Lorenzo,
Is this a separate independent run or dependent on previous IRamanSpectraWorkChain?
Based on this input, how will phonopy know what structure/material I am talking about?
You need to provide the force_constants
input. The VibrationalData
contains such information. So just put such a node which is an output of the IRamanSpectraWorkChain.
E.g.
...
'force_constants': load_node(PK).outputs.vibrational_data.numerical_accuracy_2,
...
where PK is of the IRamanSpectraWorkChain finished correctly
Understood.
I am trying to create code for phonopy so that I could load code in the inputs above. Below is the code.yaml file but I am not sure what would be the default_calc_job_plugin: ?
label: 'phonopy'
description: 'Phonopy'
default_calc_job_plugin: ' '
filepath_executable: '/users/rkarkee/phonopy'
computer: 'newhpc'
you can also use your local version of phonopy, as it is a simple post-process. for instructions: Get started — aiida-phonopy 1.1.4 documentation
In this part, I got this syntax error:
(aiidaENV) rkarkee@ch-fe2:~> python displacement.py
File "/users/rkarkee/displacement.py", line 12
'settings': orm.Dict('keep_animation_files': True)
^
SyntaxError: invalid syntax
My displacement.py is:
from aiida_phonopy.calculations.phonopy import PhonopyCalculation
from aiida import load_profile, orm
from aiida.engine import submit
code = orm.load_code('phonopy@newhpc')
parameters={'anime_type': 'jmol', 'anime': [0,0,0]}
inputs = {
'code': code,
'parameters': orm.Dict(parameters),
'force_constants': load_node(2418).outputs.vibrational_data.numerical_accuracy_4, # here a vibrational data node that you want to use
'settings': orm.Dict('keep_animation_files': True)
}
calc = submit(PhonopyCalculation, **inputs)
print(f'Launched calculation with PK = {calc.pk}')
Hello, you simply missed to insert {…}.