text: # Generated by Django 2.2.8 on 2020-04-27 14:23
  
  from django.db import migrations, models
  import django.db.models.deletion
  import django_rdkit.models.fields
  import genui.utils.extensions.tasks.models
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('django_rdkit', '0001_setup'),
          ('projects', '0001_initial'),
          ('contenttypes', '0002_remove_content_type_name'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='ActivitySet',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=256)),
                  ('description', models.TextField(blank=True, max_length=10000)),
                  ('created', models.DateTimeField()),
                  ('updated', models.DateTimeField(verbose_name='last_updated')),
              ],
              options={
                  'abstract': False,
              },
              bases=(genui.utils.extensions.tasks.models.TaskShortcutsMixIn, models.Model),
          ),
          migrations.CreateModel(
              name='ActivityTypes',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('value', models.CharField(max_length=128, unique=True)),
              ],
          ),
          migrations.CreateModel(
              name='ActivityUnits',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('value', models.CharField(max_length=128, unique=True)),
              ],
          ),
          migrations.CreateModel(
              name='ChEMBLAssay',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('assayID', models.CharField(max_length=128, unique=True)),
              ],
          ),
          migrations.CreateModel(
              name='ChEMBLTarget',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('targetID', models.CharField(max_length=128, unique=True)),
              ],
          ),
          migrations.CreateModel(
              name='Molecule',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('canonicalSMILES', models.CharField(max_length=65536, unique=True)),
                  ('inchiKey', models.CharField(max_length=65536, unique=True)),
                  ('molObject', django_rdkit.models.fields.MolField()),
                  ('morganFP2', django_rdkit.models.fields.BfpField(null=True)),
                  ('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_compounds.molecule_set+', to='contenttypes.ContentType')),
              ],
              options={
                  'abstract': False,
                  'base_manager_name': 'objects',
              },
          ),
          migrations.CreateModel(
              name='MolSet',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('name', models.CharField(max_length=256)),
                  ('description', models.TextField(blank=True, max_length=10000)),
                  ('created', models.DateTimeField()),
                  ('updated', models.DateTimeField(verbose_name='last_updated')),
                  ('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_compounds.molset_set+', to='contenttypes.ContentType')),
                  ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project')),
              ],
              options={
                  'abstract': False,
              },
              bases=(genui.utils.extensions.tasks.models.TaskShortcutsMixIn, models.Model),
          ),
          migrations.CreateModel(
              name='PictureFormat',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('extension', models.CharField(choices=[('.png', 'PNG'), ('.svg', 'SVG')], default='.svg', max_length=128)),
              ],
          ),
          migrations.CreateModel(
              name='ChEMBLActivities',
              fields=[
                  ('activityset_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='compounds.ActivitySet')),
              ],
              options={
                  'abstract': False,
              },
              bases=('compounds.activityset',),
          ),
          migrations.CreateModel(
              name='ChEMBLMolecule',
              fields=[
                  ('molecule_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='compounds.Molecule')),
                  ('chemblID', models.CharField(max_length=128, unique=True)),
              ],
              options={
                  'abstract': False,
                  'base_manager_name': 'objects',
              },
              bases=('compounds.molecule',),
          ),
          migrations.CreateModel(
              name='MoleculePic',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('image', models.ImageField(upload_to='compounds/pics/')),
                  ('format', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='compounds.PictureFormat')),
                  ('molecule', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pics', to='compounds.Molecule')),
              ],
          ),
          migrations.AddField(
              model_name='molecule',
              name='providers',
              field=models.ManyToManyField(related_name='molecules', to='compounds.MolSet'),
          ),
          migrations.AddField(
              model_name='activityset',
              name='molecules',
              field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='compounds.MolSet'),
          ),
          migrations.AddField(
              model_name='activityset',
              name='polymorphic_ctype',
              field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_compounds.activityset_set+', to='contenttypes.ContentType'),
          ),
          migrations.AddField(
              model_name='activityset',
              name='project',
              field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='projects.Project'),
          ),
          migrations.CreateModel(
              name='Activity',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('value', models.FloatField()),
                  ('molecule', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='compounds.Molecule')),
                  ('parent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='compounds.Activity')),
                  ('polymorphic_ctype', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_compounds.activity_set+', to='contenttypes.ContentType')),
                  ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='activities', to='compounds.ActivitySet')),
                  ('type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='compounds.ActivityTypes')),
                  ('units', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='compounds.ActivityUnits')),
              ],
              options={
                  'abstract': False,
                  'base_manager_name': 'objects',
              },
          ),
          migrations.CreateModel(
              name='ChEMBLCompounds',
              fields=[
                  ('molset_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='compounds.MolSet')),
                  ('targets', models.ManyToManyField(to='compounds.ChEMBLTarget')),
              ],
              options={
                  'abstract': False,
              },
              bases=('compounds.molset',),
          ),
          migrations.CreateModel(
              name='ChEMBLActivity',
              fields=[
                  ('activity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='compounds.Activity')),
                  ('relation', models.CharField(max_length=128)),
                  ('comment', models.CharField(blank=True, max_length=128, null=True)),
                  ('assay', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='compounds.ChEMBLAssay')),
                  ('target', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='compounds.ChEMBLTarget')),
              ],
              options={
                  'abstract': False,
                  'base_manager_name': 'objects',
              },
              bases=('compounds.activity',),
          ),
      ]
  