Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split the creation of crystals and compounds here? #147

Open
TJGorrie opened this issue Nov 3, 2021 · 0 comments
Open

Split the creation of crystals and compounds here? #147

TJGorrie opened this issue Nov 3, 2021 · 0 comments
Assignees

Comments

@TJGorrie
Copy link

TJGorrie commented Nov 3, 2021

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.

@TJGorrie TJGorrie self-assigned this Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant