genui.compounds.extensions.sdf package

Subpackages

Submodules

genui.compounds.extensions.sdf.admin module

genui.compounds.extensions.sdf.apps module

class genui.compounds.extensions.sdf.apps.SdfConfig(app_name, app_module)[source]

Bases: AppConfig

name = 'genui.compounds.extensions.sdf'

genui.compounds.extensions.sdf.exporters module

sdf

Created by: Martin Sicho On: 28.04.21, 13:51

class genui.compounds.extensions.sdf.exporters.SDFExporter(export_instance, progress_recorder=None)[source]

Bases: BaseMolSetExporter

name = 'SDF File'
saveFile()[source]

genui.compounds.extensions.sdf.genuisetup module

genuisetup.py

Created by: Martin Sicho On: 7/13/20, 1:03 PM

genui.compounds.extensions.sdf.genuisetup.setup(*args, **kwargs)[source]

genui.compounds.extensions.sdf.initializer module

initializer

Created by: Martin Sicho On: 7/13/20, 4:12 PM

class genui.compounds.extensions.sdf.initializer.SDFSetInitializer(*args, **kwargs)[source]

Bases: FileInitializer

parserCallback(smile, props)[source]
populateInstance()[source]

genui.compounds.extensions.sdf.models module

class genui.compounds.extensions.sdf.models.SDFCompounds(id, polymorphic_ctype, name, description, created, updated, project, molset_ptr, activitiesProp, activityTypesProp, activityUnitsProp, dataSeparator)[source]

Bases: FileCompounds

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

activitiesProp

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

activityTypesProp

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

activityUnitsProp

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

dataSeparator

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

molset_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

molset_ptr_id
polymorphic_primary_key_name = 'id'
polymorphic_super_sub_accessors_replaced = False
tasks

Accessor to the related objects manager on the one-to-many relation created by GenericRelation.

In the example:

class Post(Model):
    comments = GenericRelation(Comment)

post.comments is a ReverseGenericManyToOneDescriptor instance.

class genui.compounds.extensions.sdf.models.SDFMolecule(id, polymorphic_ctype, entity, molecule_ptr, name)[source]

Bases: Molecule

exception DoesNotExist

Bases: DoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

molecule_ptr

Accessor to the related object on the forward side of a one-to-one relation.

In the example:

class Restaurant(Model):
    place = OneToOneField(Place, related_name='restaurant')

Restaurant.place is a ForwardOneToOneDescriptor instance.

molecule_ptr_id
name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

polymorphic_primary_key_name = 'id'
polymorphic_super_sub_accessors_replaced = False

genui.compounds.extensions.sdf.parser module

initializer

Created by: Martin Sicho On: 7/13/20, 2:49 PM

class genui.compounds.extensions.sdf.parser.SDFParser(file, molset)[source]

Bases: FileParser

parse()[source]

genui.compounds.extensions.sdf.serializers module

serializers

Created by: Martin Sicho On: 7/13/20, 3:58 PM

class genui.compounds.extensions.sdf.serializers.SDFSetSerializer(*args, **kwargs)[source]

Bases: FileSetSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'description', 'created', 'updated', 'project', 'activities', 'files', 'file', 'activitiesProp', 'activityTypesProp', 'activityUnitsProp', 'dataSeparator')
file_extension = '.sdf'
model

alias of SDFCompounds

read_only_fields = ('created', 'updated', 'activities', 'files')
class genui.compounds.extensions.sdf.serializers.SDFSetUpdateSerializer(*args, **kwargs)[source]

Bases: FileSetUpdateSerializer

class Meta[source]

Bases: object

fields = ('id', 'name', 'description', 'created', 'updated', 'project', 'activities', 'files', 'updateData')
model

alias of SDFCompounds

read_only_fields = ('created', 'updated', 'activities', 'files')

genui.compounds.extensions.sdf.tests module

class genui.compounds.extensions.sdf.tests.SDFMolSetTestCase(methodName='runTest')[source]

Bases: ProjectMixIn, APITestCase

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_sdf_create()[source]

genui.compounds.extensions.sdf.urls module

urls

Created by: Martin Sicho On: 7/13/20, 1:08 PM

genui.compounds.extensions.sdf.views module

class genui.compounds.extensions.sdf.views.SDFSetViewSet(**kwargs)[source]

Bases: BaseMolSetViewSet

basename = None
description = None
detail = None
get_initializer_additional_arguments(validated_data)[source]

This needs to return a JSON-parsable object.

Parameters

validated_data

Returns

get_serializer_class()[source]

Return the class to use for the serializer. Defaults to using self.serializer_class.

You may want to override this if you need to provide different serializations depending on the incoming request.

(Eg. admins get full serialization, others get basic serialization)

initializer_class

alias of SDFSetInitializer

name = None
parser_classes = (<class 'rest_framework.parsers.MultiPartParser'>, <class 'rest_framework.parsers.JSONParser'>)
queryset
serializer_class

alias of SDFSetSerializer

suffix = None

Module contents