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

Children of master job not copying potential from the reference job #1377

Closed raynol-dsouza closed 4 months ago

raynol-dsouza commented 4 months ago

Summary

Children of a master job (ex. a Murnaghan job) do not copy the "potential" from the reference job when they are created.

pyiron Version and Platform

pyiron_atomistics version '0.4.17' (cm cluster)

Expected Behavior

ref_job.potential['Nb'] = 'Nb_pv'
...
child_job = next(job_murn.iter_jobs())
child_job.potential

>>> {'Nb': 'Nb_pv}

Actual Behavior

ref_job.potential['Nb'] = 'Nb_pv'
...
child_job = next(job_murn.iter_jobs())
child_job.potential

>>> {'Nb': None}

Steps to Reproduce

ref_job = pr.create.job.Vasp(job_name='vasp_ref')
ref_job.structure = structure.copy()
ref_job.potential['Nb'] = 'Nb_pv'
ref_job.set_encut(encut)
ref_job.set_kpoints(mesh=kpoint_mesh, scheme='MP')

murn_job = pr.create.job.Murnaghan(job_name='murn_job')
murn_job.ref_job = ref_job
murn_job.input['strains'] = strains.tolist()
murn_job.run()

child_job = next(job_murn.iter_jobs())
child_job.potential

Further Information, Files, and Links

jan-janssen commented 4 months ago

I tried the following for LAMMPS and this seems to work fine with the latest version of both pyiron_atomistics and pyiron_base:

from pyiron_atomistics import Project

pr = Project("test")

ref_job = pr.create.job.Lammps(job_name='lmp_ref')
ref_job.structure = pr.create.structure.ase.bulk("Al", cubic=True)
ref_job.potential = '2008--Mendelev-M-I--Al--LAMMPS--ipr1'

murn_job = pr.create.job.Murnaghan(job_name='murn_job')
murn_job.ref_job = ref_job
murn_job.run()

child_job = next(murn_job.iter_jobs())
child_job.potential

@raynol-dsouza Can you confirm that this is also working for you? just to make sure it is a VASP specific error.

raynol-dsouza commented 4 months ago

Hi @jan-janssen ,

yes, this is working for me too. Should be a VASP specific error.

raynol-dsouza commented 4 months ago

For LAMMPS, it works on the cluster for me, but not on my local machine, which is runningpyiron_atomistics v. 0.4.8 and pyiron_base v. 0.7.0 (both from conda).

I end up getting this error: ValueError: Was not able to locate the potential files.

Is this a separate issue?

pmrv commented 4 months ago

Sounds like you don't have all the data packages installed locally and it cannot find the potential database.

raynol-dsouza commented 4 months ago

This job runs perfectly fine on my machine:

potential = pd.DataFrame({
  'Name': ["Cu"],
  'Filename': [["Cu/Cu-PBE-core-rep.ace"]],
  'Model': ["ACE"],
  'Species': [["Cu"]],
  'Config': [["pair_style pace\n",
              "pair_coeff * * Cu-PBE-core-rep.ace Cu\n"]]
})

job = pr.create.job.Lammps(job_name='lmp', delete_existing_job=True)
job.structure = pr.create.structure.ase.bulk("Cu", cubic=True)
job.potential = potential
job.calc_minimize()
job.run()

The directory "Cu" is in a parent directory which is in my .pyiron resource paths.

jan-janssen commented 4 months ago

@raynol-dsouza There was a bug in a previous version, can you update to the latest version for your local tests? In addition, I opened a pull request to fix the VASP related issue.