# Generated by Django 4.2.6 on 2023-11-19 21:07

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
        ("core_components", "0002_alter_fingerprint_id_alter_fingerprintpool_id"),
    ]

    operations = [
        migrations.CreateModel(
            name="ChemicalSystemSearch",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=10, null=True),
                ),
                (
                    "subworkflow_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "subworkflow_kwargs",
                    models.JSONField(blank=True, default=dict, null=True),
                ),
                ("max_atoms", models.IntegerField(blank=True, null=True)),
                ("max_stoich_factor", models.IntegerField(blank=True, null=True)),
                (
                    "singleshot_sources",
                    models.JSONField(blank=True, default=list, null=True),
                ),
            ],
        ),
        migrations.CreateModel(
            name="DiffusionAnalysis",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                (
                    "migrating_specie",
                    models.CharField(blank=True, max_length=4, null=True),
                ),
                ("vacancy_mode", models.BooleanField(blank=True, null=True)),
                ("atomic_fraction", models.FloatField(blank=True, null=True)),
                ("barrier_cell", models.FloatField(blank=True, null=True)),
                (
                    "paths_involved",
                    models.CharField(blank=True, max_length=100, null=True),
                ),
                ("npaths_involved", models.IntegerField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Dynamics",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("temperature_start", models.IntegerField(blank=True, null=True)),
                ("temperature_end", models.IntegerField(blank=True, null=True)),
                ("time_step", models.FloatField(blank=True, null=True)),
                ("nsteps", models.IntegerField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="FixedCompositionSearch",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("composition", models.CharField(blank=True, max_length=50, null=True)),
                (
                    "subworkflow_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "subworkflow_kwargs",
                    models.JSONField(blank=True, default=dict, null=True),
                ),
                (
                    "fitness_field",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                ("min_structures_exact", models.IntegerField(blank=True, null=True)),
                ("max_structures", models.IntegerField(blank=True, null=True)),
                ("best_survival_cutoff", models.IntegerField(blank=True, null=True)),
                ("nfirst_generation", models.IntegerField(blank=True, null=True)),
                ("nsteadystate", models.IntegerField(blank=True, null=True)),
                ("convergence_cutoff", models.FloatField(blank=True, null=True)),
                (
                    "selector_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "selector_kwargs",
                    models.JSONField(blank=True, default=dict, null=True),
                ),
                (
                    "validator_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "validator_kwargs",
                    models.JSONField(blank=True, default=dict, null=True),
                ),
                (
                    "singleshot_sources",
                    models.JSONField(blank=True, default=list, null=True),
                ),
                ("sleep_step", models.FloatField(blank=True, null=True)),
                (
                    "unique_individuals_ids",
                    models.JSONField(blank=True, default=list, null=True),
                ),
                ("expected_structure", models.JSONField(default=dict)),
            ],
        ),
        migrations.CreateModel(
            name="IonicStep",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("site_forces", models.JSONField(blank=True, null=True)),
                ("lattice_stress", models.JSONField(blank=True, null=True)),
                ("site_force_norm_max", models.FloatField(blank=True, null=True)),
                ("site_forces_norm", models.FloatField(blank=True, null=True)),
                ("site_forces_norm_per_atom", models.FloatField(blank=True, null=True)),
                ("lattice_stress_norm", models.FloatField(blank=True, null=True)),
                (
                    "lattice_stress_norm_per_atom",
                    models.FloatField(blank=True, null=True),
                ),
                ("energy", models.FloatField(blank=True, null=True)),
                ("energy_per_atom", models.FloatField(blank=True, null=True)),
                ("energy_above_hull", models.FloatField(blank=True, null=True)),
                ("is_stable", models.BooleanField(blank=True, null=True)),
                ("decomposes_to", models.JSONField(blank=True, null=True)),
                ("formation_energy", models.FloatField(blank=True, null=True)),
                ("formation_energy_per_atom", models.FloatField(blank=True, null=True)),
                ("number", models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name="MigrationHop",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("site_start", models.CharField(blank=True, max_length=100, null=True)),
                ("site_end", models.CharField(blank=True, max_length=100, null=True)),
                ("index_start", models.IntegerField(blank=True, null=True)),
                ("index_end", models.IntegerField(blank=True, null=True)),
                ("number", models.IntegerField(blank=True, null=True)),
                ("length", models.FloatField(blank=True, null=True)),
                ("dimension_path", models.IntegerField(blank=True, null=True)),
                ("dimension_host_lattice", models.IntegerField(blank=True, null=True)),
                ("energy_barrier", models.FloatField(blank=True, null=True)),
                (
                    "diffusion_analysis",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="migration_hops",
                        to="workflows.diffusionanalysis",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="StaticEnergy",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("site_forces", models.JSONField(blank=True, null=True)),
                ("lattice_stress", models.JSONField(blank=True, null=True)),
                ("site_force_norm_max", models.FloatField(blank=True, null=True)),
                ("site_forces_norm", models.FloatField(blank=True, null=True)),
                ("site_forces_norm_per_atom", models.FloatField(blank=True, null=True)),
                ("lattice_stress_norm", models.FloatField(blank=True, null=True)),
                (
                    "lattice_stress_norm_per_atom",
                    models.FloatField(blank=True, null=True),
                ),
                ("energy", models.FloatField(blank=True, null=True)),
                ("energy_per_atom", models.FloatField(blank=True, null=True)),
                ("energy_above_hull", models.FloatField(blank=True, null=True)),
                ("is_stable", models.BooleanField(blank=True, null=True)),
                ("decomposes_to", models.JSONField(blank=True, null=True)),
                ("formation_energy", models.FloatField(blank=True, null=True)),
                ("formation_energy_per_atom", models.FloatField(blank=True, null=True)),
                ("band_gap", models.FloatField(blank=True, null=True)),
                ("is_gap_direct", models.BooleanField(blank=True, null=True)),
                ("energy_fermi", models.FloatField(blank=True, null=True)),
                ("conduction_band_minimum", models.FloatField(blank=True, null=True)),
                ("valence_band_maximum", models.FloatField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="VariableNsitesCompositionSearch",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("composition", models.CharField(blank=True, max_length=50, null=True)),
                (
                    "subworkflow_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "subworkflow_kwargs",
                    models.JSONField(blank=True, default=dict, null=True),
                ),
                (
                    "fitness_field",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                ("min_structures_exact", models.IntegerField(blank=True, null=True)),
                ("max_structures", models.IntegerField(blank=True, null=True)),
                ("best_survival_cutoff", models.IntegerField(blank=True, null=True)),
                ("nfirst_generation", models.IntegerField(blank=True, null=True)),
                ("nsteadystate", models.IntegerField(blank=True, null=True)),
                ("convergence_cutoff", models.FloatField(blank=True, null=True)),
                (
                    "selector_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "selector_kwargs",
                    models.JSONField(blank=True, default=dict, null=True),
                ),
                (
                    "validator_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "validator_kwargs",
                    models.JSONField(blank=True, default=dict, null=True),
                ),
                ("sleep_step", models.FloatField(blank=True, null=True)),
                ("expected_structure", models.JSONField(default=dict)),
            ],
        ),
        migrations.CreateModel(
            name="PopulationAnalysis",
            fields=[
                (
                    "staticenergy_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="workflows.staticenergy",
                    ),
                ),
                ("oxidation_states", models.JSONField(blank=True, null=True)),
                ("charges", models.JSONField(blank=True, null=True)),
                ("min_dists", models.JSONField(blank=True, null=True)),
                ("atomic_volumes", models.JSONField(blank=True, null=True)),
                ("element_list", models.JSONField(blank=True, null=True)),
                ("vacuum_charge", models.FloatField(blank=True, null=True)),
                ("vacuum_volume", models.FloatField(blank=True, null=True)),
                ("nelectrons", models.FloatField(blank=True, null=True)),
            ],
            bases=("workflows.staticenergy",),
        ),
        migrations.CreateModel(
            name="SteadystateSource",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("name", models.CharField(max_length=50)),
                ("kwargs", models.JSONField(default=dict)),
                ("nsteadystate_target", models.FloatField(blank=True, null=True)),
                ("is_creator", models.BooleanField()),
                ("is_transformation", models.BooleanField()),
                ("workitem_ids", models.JSONField(default=list)),
                (
                    "search",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="steadystate_sources",
                        to="workflows.fixedcompositionsearch",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Relaxation",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("site_forces", models.JSONField(blank=True, null=True)),
                ("lattice_stress", models.JSONField(blank=True, null=True)),
                ("site_force_norm_max", models.FloatField(blank=True, null=True)),
                ("site_forces_norm", models.FloatField(blank=True, null=True)),
                ("site_forces_norm_per_atom", models.FloatField(blank=True, null=True)),
                ("lattice_stress_norm", models.FloatField(blank=True, null=True)),
                (
                    "lattice_stress_norm_per_atom",
                    models.FloatField(blank=True, null=True),
                ),
                ("energy", models.FloatField(blank=True, null=True)),
                ("energy_per_atom", models.FloatField(blank=True, null=True)),
                ("energy_above_hull", models.FloatField(blank=True, null=True)),
                ("is_stable", models.BooleanField(blank=True, null=True)),
                ("decomposes_to", models.JSONField(blank=True, null=True)),
                ("formation_energy", models.FloatField(blank=True, null=True)),
                ("formation_energy_per_atom", models.FloatField(blank=True, null=True)),
                ("band_gap", models.FloatField(blank=True, null=True)),
                ("is_gap_direct", models.BooleanField(blank=True, null=True)),
                ("energy_fermi", models.FloatField(blank=True, null=True)),
                ("conduction_band_minimum", models.FloatField(blank=True, null=True)),
                ("valence_band_maximum", models.FloatField(blank=True, null=True)),
                ("volume_change", models.FloatField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
                (
                    "structure_final",
                    models.OneToOneField(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="relaxations_as_final",
                        to="workflows.ionicstep",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="MigrationImage",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("number", models.IntegerField()),
                ("force_tangent", models.FloatField(blank=True, null=True)),
                ("energy", models.FloatField(blank=True, null=True)),
                ("structure_distance", models.FloatField(blank=True, null=True)),
                (
                    "migration_hop",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="migration_images",
                        to="workflows.migrationhop",
                    ),
                ),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="ionicstep",
            name="relaxation",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="structures",
                to="workflows.relaxation",
            ),
        ),
        migrations.AddField(
            model_name="ionicstep",
            name="spacegroup",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="core_components.spacegroup",
            ),
        ),
        migrations.CreateModel(
            name="DynamicsIonicStep",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("site_forces", models.JSONField(blank=True, null=True)),
                ("lattice_stress", models.JSONField(blank=True, null=True)),
                ("site_force_norm_max", models.FloatField(blank=True, null=True)),
                ("site_forces_norm", models.FloatField(blank=True, null=True)),
                ("site_forces_norm_per_atom", models.FloatField(blank=True, null=True)),
                ("lattice_stress_norm", models.FloatField(blank=True, null=True)),
                (
                    "lattice_stress_norm_per_atom",
                    models.FloatField(blank=True, null=True),
                ),
                ("energy", models.FloatField(blank=True, null=True)),
                ("energy_per_atom", models.FloatField(blank=True, null=True)),
                ("energy_above_hull", models.FloatField(blank=True, null=True)),
                ("is_stable", models.BooleanField(blank=True, null=True)),
                ("decomposes_to", models.JSONField(blank=True, null=True)),
                ("formation_energy", models.FloatField(blank=True, null=True)),
                ("formation_energy_per_atom", models.FloatField(blank=True, null=True)),
                ("number", models.IntegerField()),
                ("temperature", models.FloatField(blank=True, null=True)),
                (
                    "dynamics_run",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="structures",
                        to="workflows.dynamics",
                    ),
                ),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="DensityofStatesCalc",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("density_of_states_data", models.JSONField(blank=True, null=True)),
                ("band_gap", models.FloatField(blank=True, null=True)),
                ("energy_fermi", models.FloatField(blank=True, null=True)),
                ("conduction_band_minimum", models.FloatField(blank=True, null=True)),
                ("valence_band_maximum", models.FloatField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="BandStructureCalc",
            fields=[
                ("id", models.AutoField(primary_key=True, serialize=False)),
                (
                    "created_at",
                    models.DateTimeField(auto_now_add=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(auto_now=True, db_index=True, null=True),
                ),
                ("source", models.JSONField(blank=True, null=True)),
                ("structure", models.TextField(blank=True, null=True)),
                ("nsites", models.IntegerField(blank=True, null=True)),
                ("nelements", models.IntegerField(blank=True, null=True)),
                ("elements", models.JSONField(blank=True, null=True)),
                (
                    "chemical_system",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("density", models.FloatField(blank=True, null=True)),
                ("density_atomic", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("volume_molar", models.FloatField(blank=True, null=True)),
                (
                    "formula_full",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_reduced",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                (
                    "formula_anonymous",
                    models.CharField(blank=True, max_length=50, null=True),
                ),
                ("started_at", models.DateTimeField(blank=True, null=True)),
                ("finished_at", models.DateTimeField(blank=True, null=True)),
                ("total_time", models.FloatField(blank=True, null=True)),
                ("queue_time", models.FloatField(blank=True, null=True)),
                (
                    "workflow_name",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "workflow_version",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "computer_system",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("directory", models.CharField(blank=True, max_length=250, null=True)),
                (
                    "run_id",
                    models.CharField(blank=True, max_length=50, null=True, unique=True),
                ),
                ("corrections", models.JSONField(blank=True, null=True)),
                ("band_structure_data", models.JSONField(blank=True, null=True)),
                ("nbands", models.IntegerField(blank=True, null=True)),
                ("band_gap", models.FloatField(blank=True, null=True)),
                ("is_gap_direct", models.BooleanField(blank=True, null=True)),
                ("band_gap_direct", models.FloatField(blank=True, null=True)),
                ("energy_fermi", models.FloatField(blank=True, null=True)),
                ("conduction_band_minimum", models.FloatField(blank=True, null=True)),
                ("valence_band_maximum", models.FloatField(blank=True, null=True)),
                ("is_metal", models.BooleanField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
        ),
    ]
