Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy_template for Sphinx raises error #1069

Open
sinazadeh opened this issue May 29, 2023 · 2 comments
Open

copy_template for Sphinx raises error #1069

sinazadeh opened this issue May 29, 2023 · 2 comments
Assignees

Comments

@sinazadeh
Copy link

sinazadeh commented May 29, 2023


box = pr.create.structure.bulk(name='Al', cubic=True).repeat(2)
template_job = pr.create_job(job_type=pr.job_type.Sphinx, job_name='template')
vac_0_struct = box.copy() 
vac_0_struct.pop(vac_id_initial) 
vac_0 = template_job.copy_template(project=pr, new_job_name='vac_0')

Raises AttributeError: 'NoneType' object has no attribute 'positions'.

Versions:

pyiron                    0.4.7              pyhd8ed1ab_1    conda-forge
pyiron-data               0.0.22               hd8ed1ab_0    conda-forge
pyiron_atomistics         0.2.67             pyhd8ed1ab_0    conda-forge
pyiron_base               0.5.39             pyhd8ed1ab_0    conda-forge
pyiron_contrib            0.1.6              pyhd8ed1ab_0    conda-forge
sphinxdft                 3.0.7                hd4da288_3    conda-forge
sphinxdft-data            0.0.1                hd8ed1ab_2    conda-forge
@samwaseda
Copy link
Member

I don't really understand what copy_template is actually supposed to do. The error in this case comes from the fact that the job does not have a structure, and when pyiron tries to store the data to HDF, it fails to read the structure positions. It would be obviously possible to store the data without the structure, but I might be reluctant to do so because I don't know what the ramifications of this sort of incomplete storage would be...

@sinazadeh
Copy link
Author

sinazadeh commented May 30, 2023

I don't really understand what copy_template is actually supposed to do. The error in this case comes from the fact that the job does not have a structure, and when pyiron tries to store the data to HDF, it fails to read the structure positions. It would be obviously possible to store the data without the structure, but I might be reluctant to do so because I don't know what the ramifications of this sort of incomplete storage would be...

The error was raised when I tried to use protocol_neb_example.ipynb for Sphinx (pyiron_contrib). The mentioned notebook is originally written for Lammmps and runs without error, but DFT calculations (VASP, GPAW, and Sphinx) raise different errors, as discussed here and pyiron/pyiron_contrib#694. Having copy_template thing without structure is useful when we want to have a template job like this:

box = pr.create.structure.bulk(name='Al', cubic=True).repeat(2)
template_job = pr.create_job(job_type=pr.job_type.Lammps, job_name='template')
template_job.potential = potential
vac_0_struct = box.copy() 
vac_0_struct.pop(0) 
vac_0 = template_job.copy_template(project=pr, new_job_name='vac_0')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants