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

How to publish calculation with pyiron? #46

Open
jan-janssen opened this issue Mar 26, 2024 · 0 comments
Open

How to publish calculation with pyiron? #46

jan-janssen opened this issue Mar 26, 2024 · 0 comments

Comments

@jan-janssen
Copy link
Member

Pyiron provides a publication template in https://github.com/pyiron/pyiron-publication-template this template is based on the project being archived before. In many cases you might not want to archive all calculation in a given project. So below is a short example code to copy the calculation to an archive project and then pack this project for publication.

from pyiron_atomistics import Project

# Create an example calculation 
pr_origin = Project("origin")
job = pr_origin.create.job.Lammps("lmp")
job.structure = pr_origin.create.structure.ase.bulk("Al", cubic=True)
job.run()

# Copy selected calculation 
pr_archive = Project("archive")
job_new = job.copy_to(project=pr_archive)

# Backup selected calculation with all output files
pr_archive.pack(destination_path="publish", copy_all_files=True)

# clean up 
pr_archive.remove(enable=True)
pr_origin.remove(enable=True)

# Restore backup 
Project(".").unpack(origin_path="publish")
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

1 participant