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

I can't see outputs.relax.structure #676

Open
Kaikennokuro opened this issue Sep 11, 2023 · 4 comments
Open

I can't see outputs.relax.structure #676

Kaikennokuro opened this issue Sep 11, 2023 · 4 comments

Comments

@Kaikennokuro
Copy link

Steps that lead to the error

Regarding the calculation of Exit code of 501, to set the structure output from the first calculation as the initial structure again, I wrote the code below.
structure_clone = node_relax.outputs.relax.structure.clone()

What should happen

The calculation results should start normally. Also, if I do verdi process show, I should see the outputs.relax.structure column. The same procedure could be used for calculations on other substances without any problems.

What happened instead

Traceback (most recent call last): File "aiida/calc/Y203/code/Eu_doped.py", line 191, in <module> main(code_string, options, num, group_name) File "aiida/calc/X203/code/Eu_doped.py",line 153, in main structure_clone = node_relax.outputs.relax.structure.clone() File "aiida/.venv/lib/python3.10/site-packages/aiida/orm/utils/managers.py",line145,in __geta ttr__ raise NotFxistentAttributeFrror aiida.common.exceptions.NotExistentAttributeError: Node<16996> does not have an output with link label 'relax'

In the results displayed by verdi process pk, the relax strucure was not displayed in the outputs column.

@Kaikennokuro
Copy link
Author

ISIF = 3, outputs.relax.structure was output, so this may be due to the fact that the calculation is being done with ISIF = 2.
Is there any way to ensure that outputs.relax.structure is output even if calculated with ISIF = 2?

@atztogo
Copy link
Collaborator

atztogo commented Sep 12, 2023

What is your launch script for ISIF=3 and ISIF=2?

@Kaikennokuro
Copy link
Author

Kaikennokuro commented Sep 13, 2023

def launch_aiida(structure, code_string, options,label=f'{name} calculaton'):
    Dict = DataFactory('dict')
    KpointsData = DataFactory('array.kpoints')

    incar_dict = {
        #'PREC': 'Accurate',
        'System':name,
        'EDIFF': 1E-5,
        'ENCUT': 500,
        'ISMEAR': 0,
        'SIGMA': 0.1,
        'IBRION': 2,
        'LASPH': True,
        'ISTART': 0,
        'ICHARG':2,
        'ISPIN':2,
        'ldautype':2,
        'lmaxmix':6,
        'nupdown':7,
        'NELM':80,
        'algo':'Fast',
        'LDAU': True,
        'magmom':f'1*1.0 {num_magmom}*0.0',
        'ldaul':'3 -1 -1',
        'ldauu':'7.5 0.0 0.0',
        'ldauj':'0.0 0.0 0.0'
        
    }   
    kpoints = KpointsData()
    kpoints.set_kpoints_mesh([1, 1, 1], offset=[0, 0, 0])

    potential_family = 'PBE.54'
    potential_mapping = potential(unit_cell=Eu_1)
    

    parser_settings = {'add_energies': True, 'add_forces': True, 'add_stress': True}

    code = Code.get_from_string(code_string)
    Workflow = WorkflowFactory('vasp.relax')
    builder = Workflow.get_builder()
    builder.code = code
    builder.parameters = Dict(dict={'incar': incar_dict})
    builder.structure = structure
    builder.settings = Dict(dict={'parser_settings': parser_settings})
    builder.potential_family = Str(potential_family)
    builder.potential_mapping = Dict(dict=potential_mapping)
    builder.kpoints = kpoints
    builder.options = Dict(dict=options)
    builder.metadata.label = label
    builder.metadata.description = label
    relax = AttributeDict()
    relax.perform = Bool(True)  # Turn on relaxation of the structure
    relax.force_cutoff = Float(0.01)  # Relax force cutoff
    relax.steps = Int(100)  # Relax number of ionic steps cutoff
    relax.positions = Bool(True)  # Relax atomic positions
    relax.shape = Bool(False)  # Relax cell shape (alpha, beta, gamma)
    relax.volume = Bool(False)  # Relax volume
    builder.relax = relax
    builder.verbose = Bool(True)
    builder.clean_workdir = Bool(False)
    node = submit(builder)
    return node

Here is the code for ISIF =3; ISIF2 is almost the same, just changing the last part as shown below.

   relax.shape = Bool(True)          # Relax cell shape (alpha, beta, gamma)
   relax.volume = Bool(True)         # Relax volume
   builder.relax = relax

@JPchico
Copy link
Collaborator

JPchico commented Apr 23, 2024

@Kaikennokuro sorry for the late reply. I wonder if this is still an issue or if this is solved?

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

3 participants