#################################################
# README for the GW100.aiida and MPA.aiida files.
#################################################
We provide an GW100.aiida and MPA.aiida zip files which contains, respectively the export of the AiiDA databases for the PPA and MPA calculations done in this work.
You can export all the nodes into your own AiiDA(v1.5) databases by typing:
```
verdi import GW100.aiida
verdi import MPA.aiida
```
You will find a group for each molecule, by typing "verdi group list -A":
GW100/cell_fcc-dnn=13A/<formula_of_the_molecule> # for PPA
GW100/cell_fcc-dnn=13A/MPA/<formula_of_the_molecule> # for MPA
Formula of the molecules are contained in the *json files attached to this entry.
In addition, a Dict node with the "type_dict" extra equal to "instructions", in which you can find the uuid
of the YamboConvergence node, which collects all the YamboWorkflow (single Yambo calculation) nodes.
To access the instruction Dict, it is possible to use the QueryBuilder:
```
from aiida import orm
qb = QueryBuilder()
qb.append(Group, filters={
'label': <GROUP_NAME>},
tag ='g')
qb.append(
orm.Dict,
filters={
'extras.type_dict':'instructions',},
with_group='g',
tag = 'structure_imported',
)
```
To directly access the YamboConvergence:
```
from aiida_yambo.workflows.yamboconvergence import YamboConvergence
qb = QueryBuilder()
qb.append(Group, filters={
'label':'GW100/cell_fcc-dnn=13A/{}'.format(mol)},
tag ='g')
qb.append(
orm.Dict,
filters={
'extras.type_dict':'instructions',},
with_group='g',
tag = 'structure_imported',
)
```
## Access the convergence history for a system:
You can access all the convergence history by means of the pandas library:
```
import pandas as pd
YamboConvergence_node = load_node(<YamboConvergence node uuid>)
df = pd.DataFrame(YamboConvergence_node.outputs.history.get_dict())
```
The final converged YamboWorkflow can be accessed by:
```
final_workflow_uuid = df[df['useful'] == True]['uuid'].values[0]
```
Calculations can be accessed by their corresponding YamboWorkflow caller, whose uuid is store in df['uuid'] column of the df DataFrame.
##########
# Evaluation of the extrapolation:
The extrapolation procedure (A/x + b)(C/y + d) --> homo or lumo = b*d can be reproduced for each molecule, once exported the GW100.aiida and installed the aiida-yambo plugin, by using the analyse_molecule.py script:
```
verdi run analyse_molecule.py --mol <name_of_the_molecule> --method PPA
```