# Generated by Django 4.2.7 on 2026-01-07 21:45

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("core", "0004_websitepagevisit"),
    ]

    operations = [
        migrations.CreateModel(
            name="Badelf",
            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),
                ),
                ("method_kwargs", models.JSONField(blank=True, null=True)),
                ("oxidation_states", models.JSONField(blank=True, null=True)),
                ("species", models.JSONField(blank=True, null=True)),
                ("labeled_structure", models.JSONField(blank=True, null=True)),
                ("charges", models.JSONField(blank=True, null=True)),
                ("volumes", models.JSONField(blank=True, null=True)),
                ("min_surface_distances", models.JSONField(blank=True, null=True)),
                ("avg_surface_distances", models.JSONField(blank=True, null=True)),
                ("elf_maxima", models.JSONField(blank=True, null=True)),
                (
                    "electride_formula",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("electrides_per_formula", models.FloatField(blank=True, null=True)),
                (
                    "electrides_per_reduced_formula",
                    models.FloatField(blank=True, null=True),
                ),
                ("nelectrides", models.IntegerField(blank=True, null=True)),
                (
                    "electride_dimensionality",
                    models.IntegerField(blank=True, null=True),
                ),
                ("all_electride_dims", models.JSONField(blank=True, null=True)),
                ("all_electride_dim_cutoffs", models.JSONField(blank=True, null=True)),
                ("electride_structure", models.JSONField(blank=True, null=True)),
                ("total_charge", models.FloatField(blank=True, null=True)),
                ("total_volume", models.FloatField(blank=True, null=True)),
                ("spin_system", models.CharField(blank=True, max_length=25, null=True)),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="ElfAnalysis",
            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),
                ),
                ("method_kwargs", models.JSONField(blank=True, null=True)),
                ("bifurcation_graph", models.JSONField(blank=True, null=True)),
                ("labeled_structure", models.JSONField(blank=True, null=True)),
                ("electride_structure", models.JSONField(blank=True, null=True)),
                ("atom_elf_radii", models.JSONField(blank=True, null=True)),
                ("atom_elf_radii_types", models.JSONField(blank=True, null=True)),
                ("oxidation_states", models.JSONField(blank=True, null=True)),
                ("oxidation_states_e", models.JSONField(blank=True, null=True)),
                ("charges", models.JSONField(blank=True, null=True)),
                ("charges_e", models.JSONField(blank=True, null=True)),
                ("volumes", models.JSONField(blank=True, null=True)),
                ("volumes_e", models.JSONField(blank=True, null=True)),
                (
                    "electride_formula",
                    models.CharField(blank=True, max_length=25, null=True),
                ),
                ("electrides_per_formula", models.FloatField(blank=True, null=True)),
                (
                    "electrides_per_reduced_formula",
                    models.FloatField(blank=True, null=True),
                ),
                ("nelectrides", models.IntegerField(blank=True, null=True)),
                ("spin_system", models.CharField(blank=True, max_length=25, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="SpinBadelf",
            fields=[
                (
                    "badelf_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="baderkit.badelf",
                    ),
                ),
                ("differing_spin", models.BooleanField(blank=True, null=True)),
            ],
            bases=("baderkit.badelf",),
        ),
        migrations.CreateModel(
            name="SpinElfAnalysis",
            fields=[
                (
                    "elfanalysis_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="baderkit.elfanalysis",
                    ),
                ),
                ("differing_spin", models.BooleanField(blank=True, null=True)),
                (
                    "analysis_down",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="spin_analysis",
                        to="baderkit.elfanalysis",
                    ),
                ),
                (
                    "analysis_up",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="spin_analysis",
                        to="baderkit.elfanalysis",
                    ),
                ),
            ],
            bases=("baderkit.elfanalysis",),
        ),
        migrations.CreateModel(
            name="ElfRadii",
            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)),
                ("site_index", models.IntegerField()),
                ("neigh_index", models.IntegerField()),
                ("radius", models.FloatField()),
                ("site_frac_coords", models.JSONField()),
                ("neigh_frac_coords", models.JSONField()),
                ("radius_type", models.CharField(blank=True, max_length=75, null=True)),
                ("spin_system", models.CharField(blank=True, max_length=75, null=True)),
                (
                    "analysis",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="atom_nn_elf_radii",
                        to="baderkit.elfanalysis",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ElfFeatures",
            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)),
                (
                    "domain_subtype",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                (
                    "feature_type",
                    models.CharField(blank=True, max_length=75, null=True),
                ),
                ("frac_coords", models.JSONField(blank=True, null=True)),
                ("average_frac_coords", models.JSONField(blank=True, null=True)),
                ("max_value", models.FloatField(blank=True, null=True)),
                ("min_value", models.FloatField(blank=True, null=True)),
                ("depth", models.FloatField(blank=True, null=True)),
                ("depth_to_infinite", models.FloatField(blank=True, null=True)),
                ("charge", models.FloatField(blank=True, null=True)),
                ("volume", models.FloatField(blank=True, null=True)),
                ("nearest_atom", models.FloatField(blank=True, null=True)),
                (
                    "nearest_atom_species",
                    models.CharField(blank=True, max_length=10, null=True),
                ),
                ("atom_distance", models.FloatField(blank=True, null=True)),
                ("labeled_structure_index", models.IntegerField(blank=True, null=True)),
                (
                    "electride_structure_index",
                    models.IntegerField(blank=True, null=True),
                ),
                ("min_surface_dist", models.FloatField(blank=True, null=True)),
                ("avg_surface_dist", models.FloatField(blank=True, null=True)),
                ("dist_beyond_atom", models.FloatField(blank=True, null=True)),
                ("coord_number", models.IntegerField(blank=True, null=True)),
                ("coord_indices", models.JSONField(blank=True, null=True)),
                ("coord_species", models.JSONField(blank=True, null=True)),
                ("coord_number_e", models.IntegerField(blank=True, null=True)),
                ("coord_indices_e", models.JSONField(blank=True, null=True)),
                ("coord_species_e", models.JSONField(blank=True, null=True)),
                (
                    "analysis",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="elf_features",
                        to="baderkit.elfanalysis",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="ElfAnalysisCalculation",
            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)),
                (
                    "analysis",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="calculation",
                        to="baderkit.elfanalysis",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Bader",
            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)),
                ("method_kwargs", models.JSONField(blank=True, null=True)),
                ("oxidation_states", models.JSONField(blank=True, null=True)),
                ("atom_charges", models.JSONField(blank=True, null=True)),
                ("atom_volumes", models.JSONField(blank=True, null=True)),
                ("atom_min_surface_distances", models.JSONField(blank=True, null=True)),
                ("atom_avg_surface_distances", models.JSONField(blank=True, null=True)),
                ("basin_maxima_frac", models.JSONField(blank=True, null=True)),
                ("basin_maxima_charge_values", models.JSONField(blank=True, null=True)),
                ("basin_maxima_ref_values", models.JSONField(blank=True, null=True)),
                ("basin_charges", models.JSONField(blank=True, null=True)),
                ("basin_volumes", models.JSONField(blank=True, null=True)),
                (
                    "basin_min_surface_distances",
                    models.JSONField(blank=True, null=True),
                ),
                (
                    "basin_avg_surface_distances",
                    models.JSONField(blank=True, null=True),
                ),
                ("basin_atoms", models.JSONField(blank=True, null=True)),
                ("basin_atom_dists", 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)),
                ("total_electron_number", models.FloatField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core.spacegroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="BadelfCalculation",
            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)),
                (
                    "badelf",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="calculation",
                        to="baderkit.badelf",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="badelf",
            name="elf_analysis",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="badelf",
                to="baderkit.elfanalysis",
            ),
        ),
        migrations.AddField(
            model_name="badelf",
            name="spacegroup",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="core.spacegroup",
            ),
        ),
        migrations.CreateModel(
            name="SpinElfAnalysisCalculation",
            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)),
                (
                    "analysis",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="calculation",
                        to="baderkit.spinelfanalysis",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="SpinBadelfCalculation",
            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)),
                (
                    "badelf",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="calculation",
                        to="baderkit.spinbadelf",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="spinbadelf",
            name="badelf_down",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="spin_badelf",
                to="baderkit.badelf",
            ),
        ),
        migrations.AddField(
            model_name="spinbadelf",
            name="badelf_up",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="spin_badelf",
                to="baderkit.badelf",
            ),
        ),
    ]
