|
obj, was_created = models.Crystal.objects.get_or_create(crystal_name=vals[0], |
|
compound=models.Compounds.objects.get_or_create( |
|
smiles=vals[1])[0], |
|
target=models.Target.objects.get_or_create( |
|
target_name=vals[2])[0], |
|
visit=models.SoakdbFiles.objects.get_or_create( |
|
filename=filename)[0], |
|
product=vals[3] |
|
) |
SMILES should be separated by a ; which will then get or create multiple compounds.
The crystal then gets generated and compounds get assigned to crystals manytomany field...
...
I think.
pipeline/functions/db_functions.py
Lines 256 to 264 in 220ebc3
SMILES should be separated by a ; which will then get or create multiple compounds.
The crystal then gets generated and compounds get assigned to crystals manytomany field...
...
I think.