# Generated by Django 4.2.7 on 2025-03-16 17:48

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="JarvisStructure",
            fields=[
                (
                    "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),
                ),
                (
                    "id",
                    models.CharField(max_length=25, primary_key=True, serialize=False),
                ),
                ("energy_above_hull", models.FloatField(blank=True, null=True)),
                (
                    "spacegroup",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.PROTECT,
                        to="core_components.spacegroup",
                    ),
                ),
            ],
            options={
                "db_table": "jarvis__structures",
            },
        ),
    ]
