# Generated by Django 4.2.7 on 2025-04-03 17:38

from django.db import migrations, models

import simmate.apps.rdkit.models.custom_fields.bfp
import simmate.apps.rdkit.models.custom_fields.mol


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("pdb", "0001_setup"),
    ]

    operations = [
        migrations.CreateModel(
            name="PdbLigand",
            fields=[
                ("molecule", models.TextField(blank=True, null=True)),
                ("molecule_original", models.TextField(blank=True, null=True)),
                ("is_3d", models.BooleanField(blank=True, null=True)),
                ("smiles", models.TextField(blank=True, null=True)),
                ("inchi", models.TextField(blank=True, null=True)),
                (
                    "inchi_key",
                    models.CharField(
                        blank=True, db_index=True, max_length=30, null=True
                    ),
                ),
                ("num_atoms", models.IntegerField(blank=True, null=True)),
                ("num_stereocenters", models.IntegerField(blank=True, null=True)),
                ("num_rings", models.IntegerField(blank=True, null=True)),
                ("num_h_acceptors", models.IntegerField(blank=True, null=True)),
                ("num_h_donors", models.IntegerField(blank=True, null=True)),
                ("molecular_weight", models.FloatField(blank=True, null=True)),
                ("molecular_weight_exact", models.FloatField(blank=True, null=True)),
                ("functional_groups", models.JSONField(blank=True, null=True)),
                ("log_p_rdkit", models.FloatField(blank=True, null=True)),
                ("tpsa_rdkit", models.FloatField(blank=True, null=True)),
                ("synthetic_accessibility", models.FloatField(blank=True, null=True)),
                (
                    "rdkit_mol",
                    simmate.apps.rdkit.models.custom_fields.mol.MolField(
                        blank=True, null=True
                    ),
                ),
                (
                    "fingerprint_morganbv",
                    simmate.apps.rdkit.models.custom_fields.bfp.BfpField(
                        blank=True, null=True
                    ),
                ),
                (
                    "id",
                    models.CharField(max_length=5, primary_key=True, serialize=False),
                ),
                ("name", models.TextField()),
                ("type_code", models.TextField()),
                ("type", models.TextField()),
                (
                    "created_at",
                    models.DateTimeField(blank=True, db_index=True, null=True),
                ),
                (
                    "updated_at",
                    models.DateTimeField(blank=True, db_index=True, null=True),
                ),
                ("protein_ids", models.JSONField(blank=True, null=True)),
            ],
            options={
                "db_table": "pdb__ligands",
            },
        ),
    ]
