pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
42 stars 15 forks source link

Add ElasticMatrixJob #1375

Closed jan-janssen closed 4 months ago

jan-janssen commented 5 months ago
from pyiron_atomistics import Project

pr = Project("elastic")
job_lmp = pr.create.job.Lammps("lmp")
job_lmp.structure = pr.create.structure.ase.bulk("Al", cubic=True)
job_elastic = pr.create.job.ElasticMatrixJob("elastic")
job_elastic.ref_job = job_lmp
job_elastic.run()
jan-janssen commented 5 months ago

We now have both the ElasticTensor and the ElasticMatrixJob, having both can be confusing for new users. To my understanding the ElasticMatrixJob is more stable at least for DFT calculation. So I am wondering if it makes sense to move the ElasticTensor to pyiron_contrib.

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 8616626851

Details


Totals Coverage Status
Change from base Build 8572185654: 0.0%
Covered Lines: 14244
Relevant Lines: 15284

💛 - Coveralls
samwaseda commented 5 months ago

I'm fine with moving ElasticTensor to pyiron_contrib, but does ElasticMatrixJob work for any structure, like if there's a vacancy for example?

jan-janssen commented 5 months ago

I'm fine with moving ElasticTensor to pyiron_contrib, but does ElasticMatrixJob work for any structure, like if there's a vacancy for example?

@HaithamGaafer Is this something you can test? You can install the current version of pyiron_gpl using:

conda install -c conda-forge pyiron-gpl=0.0.5 

Once it is installed you should be able to execute the example code above by adding the import statement for pyiron_gpl on top of the example:

import pyiron_gpl
from pyiron_atomistics import Project

pr = Project("elastic")
job_lmp = pr.create.job.Lammps("lmp")
structure =  pr.create.structure.ase.bulk("Al", cubic=True)
job_lmp.structure = structure
job_elastic = pr.create.job.ElasticMatrixJob("elastic")
job_elastic.ref_job = job_lmp
job_elastic.run()

This should work on your laptop without any issue. Once this is working you can delete an atom from the structure using:

structure =  pr.create.structure.ase.bulk("Al", cubic=True)
structure.set_repeat([3,3,3])
del structure[0]
job_lmp.structure = structure