Open aageo25 opened 1 month ago
pyiron_to_ase(pr2.inspect('singlepoint')['input/structure'].to_object())
A word of warning. arrays
/tags
are not included when a structure is converted into an object, i.e., calling to_object()
. My workaround was assigning the tag again:
simcell = pyiron_to_ase(
proj['simcell'].inspect('singlepoint')['input/structure'].to_object())
seldyn = proj['simcell'].inspect(
'singlepoint')['input/structure/tags/selective_dynamics']
simcell.set_array(
'selective_dynamics', np.array(seldyn)
)
I would like to use the input structure of a job in
pr2
intonewjob
. The idea is to usetags
that were previously assigned to aPyiron
structure.What I tried to do was collect the structure via
pr2.inspect('singlepoint')['input/structure']
. I tried the following:pyiron_to_ase(pr2.inspect('singlepoint')['input/structure'])
AttributeError: 'ProjectHDFio' object has no attribute 'get_parent_symbols'
AttributeError: 'ProjectHDFio' object has no attribute 'cell'
It would be optimal for me if I could convert the structure into an
ASE
'sAtoms
object since I will systematically modify the simulation cell in a series of jobs.Thank you in advance.