# Generated by Django 4.2.7 on 2025-08-26 20:48

from django.db import migrations, models

from simmate.apps.rdkit.utils import get_rdkit_ext_fields


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name="PpdbMolecule",
            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),
                ),
                ("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)),
                *get_rdkit_ext_fields(),
                ("name", models.TextField(blank=True, null=True)),
                ("aliases", models.JSONField(blank=True, null=True)),
                ("summary", models.TextField(blank=True, null=True)),
                ("description", models.TextField(blank=True, null=True)),
                ("evironment_fate", models.TextField(blank=True, null=True)),
                ("ecotoxicity", models.TextField(blank=True, null=True)),
                ("human_health", models.TextField(blank=True, null=True)),
                ("pesticide_type", models.JSONField(blank=True, null=True)),
                ("substance_groups", models.JSONField(blank=True, null=True)),
                ("applications", models.JSONField(blank=True, null=True)),
                ("pests_controlled", models.JSONField(blank=True, null=True)),
                ("mode_of_action", models.TextField(blank=True, null=True)),
                ("known_resistances", models.TextField(blank=True, null=True)),
                ("efficacy_and_activity", models.TextField(blank=True, null=True)),
                ("updated_at_original", models.DateTimeField(blank=True, null=True)),
                ("key_dates", models.TextField(blank=True, null=True)),
                (
                    "manufacturers_and_suppliers",
                    models.JSONField(blank=True, null=True),
                ),
                ("product_names", models.JSONField(blank=True, null=True)),
                ("formulation_details", models.TextField(blank=True, null=True)),
                (
                    "commercial_production_details",
                    models.TextField(blank=True, null=True),
                ),
                ("physical_state", models.TextField(blank=True, null=True)),
                ("availability_status", models.TextField(blank=True, null=True)),
                ("hb_copr_regulatory_status", models.TextField(blank=True, null=True)),
                ("ec_regulatory_status", models.TextField(blank=True, null=True)),
                ("cas_number", models.TextField(blank=True, null=True)),
                ("ec_number", models.TextField(blank=True, null=True)),
                ("cipac_number", models.TextField(blank=True, null=True)),
                ("us_epa_chemical_code", models.TextField(blank=True, null=True)),
                ("pubchem_cid", models.TextField(blank=True, null=True)),
                ("clp_index_number", models.TextField(blank=True, null=True)),
            ],
            options={
                "db_table": "ppdb__molecules",
            },
        ),
    ]
