-
Notifications
You must be signed in to change notification settings - Fork 11
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
ProtocolQMMM job takes a different POTCAR than ref job's POTCAR #52
Comments
Also, to add I have tried to set up a bulk Al- solute calculation inside ProtocolQMMM. Again, I see that POTCAR for a reference job directory has both Al and the solute parts in it. But the POSCAR and POTCARs in the qmmm_calc_static_qm folder only have the pure Al parts. |
Hi Hari, Have you tried modifying a plain VASP job's potential in the same way? Does this also display this behaviour? What if you submit the job? At the moment the only thing I can think is that the updated POTCAR information is not being saved in the reference job's HDF5 file and thus not being unpacked by the protocol. If this is the case, you should see similar behaviour with a plain VASP job -- create, set potential, and run in notebook and it's what you want, but create and set potential in notebook, then ship it off to the queue for running reverts to the default potential. I don't use VASP so I can't say how likely this behaviour is. If the plain VASP job behaves this way then we can ship the issue over to pyiron_atomistic. Also, what release of pyiron_contrib and pyiron_atomistic are you using? I have a fear that your QM/MM code is on an un-merged branch of contrib and that the atomistic dependency might be outdated... |
I just took a look at the QM/MM protocol on the master branch; there's nothing in the QM/MM side that looks suspicious. It invokes the VASP calculation with the job = ref_job.copy_to(
project=pr,
new_job_name=name,
input_only=True,
new_database_entry=True
) I don't have time to dig into it now, but I guess the POTCAR is not part of the input For a small unit cell VASP job with an updated POTCAR:
and let us know the results. However, already right now there's a chance @sudarsan-surendralal might be able to look at the desired behaviour (PP switching) and my |
Hi again, To answer @liamhuber 's questions:
Oddly, both of them threw VASP errors ( Regarding my code versions for pyiron-5fe5379 (tagged as For the recent comment from Liam: I'm guessing it is for the ProtocolQMMM job since that involves the My notebook cell for creating a ProtocolQMMM job looks like this:
EDIT: I understood what you mean.. I'll try it out and update back ASAP! |
Ok good, the fact it runs on the cluster means there's no foul play between setting a new POTCAR and packaging to HDF5.
Just a regular job, but use the copy functionality. The protocol is massive, but your problem is specifically with the Vasp POTCAR; since all the protocol does in this context is copy a reference job and run it, I'm just trying to extract and nail down the specific part that's causing problems by mimicking this corner of the protocol behaviour. ref_job = pr.create_job(pr.job_type.Vasp, 'to_copy')
# ...then the rest of the setup, structure, kpoints, POTCAR, etc
job = ref_job.copy_to(
project=pr,
new_job_name='copied',
input_only=True, # or False, and don't forget to use different job names each time
new_database_entry=True
)
job.run() |
Regarding your points:
Yes, this works as expected with the USPP
Yes, this works too! POTCAR is as expected.. Case 3
Case 4
Well, for case 3 and case 4 the POTCAR here defaults to GGA. I have tried Also, when I look at
Weirdly enough I see the same table for the case 3 and case 2 also. So I'm guessing the default ones somehow slide in the potcar list and get assigned to the species when the job is submitted. But I'm curious as to why this only occurs for cases 3 and 4 and case 2 runs OK with the specified USPPs. |
@hari-ushankar, cool, this is good news: the problem is just in the As a next step please update to the latest versions of pyiron_atomistics and pyiron_base and make a minimum working example which looks roughly like this: from pyiron_atomistics import Project
pr = Project('mwe')
def check_potcar_worked(job):
# Whatever code you need
if passes:
return True
else:
return False
works = pr.create.job.Vasp('works')
# blah blah job setup
works.run()
print("working: {}".format(check_potcar_worked(works)))
reference = pr.create.job.Vasp('reference')
# blah blah same setup
copy1 = reference.copy_to(*some_args, **and_kwargs)
copy1.run()
print("copy 1: {}".format(check_potcar_worked(copy1)))
copy2 = reference.copy_to(*other_args, **and_or_kwargs)
copy2.run()
print("copy 2: {}".format(check_potcar_worked(copy2))) You'll need to look at the docstring (and possibly code) to see what args and kwargs are reasonable to explore for your copied instances. If you find a setting that works then we'll just try updating the protocol's copy_to command. If none of them work then you can make a new issue on pyiron_atomistics and we'll see if we can get a copied job to do what you want! :) |
@liamhuber, I think this is still the issue. When you submit a single VASP job to the queue, the Just to confirm this, @hari-ushankar can you verify that the last value that gets printed in the following snippet is
|
@sudarsan-surendralal thanks for sharing your insight! If I understand you correctly that means that every time we use MWE: from pyiron import Project
pr = Project('scratch')
pr.remove_jobs_silently(recursive=True)
job = pr.create_job(pr.job_type.Vasp, 'vasp')
job.structure = pr.create_ase_bulk('Al')
job.potential.Al = 'Al_GW'
copied = job.copy_to(new_job_name='copied')
print(job.potential)
> {'Al': 'Al_GW'}
print(copied.potential)
> {'Al': None} @sudarsan-surendralal, this seems like a fundamental problem to me -- should we move this over to atomistics or am I still missing something silly? |
Hi @sudarsan-surendralal and @liamhuber, To @sudarsan-surendralal comment:
my output is the following:
So yes, I get I had to add a line ( Also, I'm still using the pyiron 0.2.17 version.. I'm little worried that the On the other hand, I did a quick ( and dirty?) fix by pasting the USPP POTCAR in my |
@hari-ushankar Is this issue fixed? |
Hi there,
I have hit an issue while setting up a ProtocolQMM job and thought I'll post here. If it's not relevant, please let me know I can post it on
pyiron_atomistics
issues page.I have a pure bulk Al structure and I want to use a non-default POTCAR for the QM calculation in my ProtocolQMMM job.
My issue is that ProtocolQMMM takes the default POTCAR (GGA XC) even though a different POTCAR(US-PPs) was supplied in the QM reference job. I have specifically assigned the following:
qm_ref_pureAl.potential.Al = "~/pyiron/resources/vasp/potentials/USPP/Al/POTCAR"
And I check my qm_ref_pureAl's directory and it nicely gets the ultrasoft pseudopotential from the directory I specify.
Although, when the actual ProtocolQMMM job is submitted the POTCAR file defaults to that of GGA.
I use the following for setting the path for the QM reference job:
qmmm_bulk.input.qm_ref_job_full_path = qm_ref_pureAl.path
Any tips/suggestions on how to tackle this problem would be helpful.
Thanks!
The text was updated successfully, but these errors were encountered: