backend package¶
Submodules¶
backend.cif_file module¶
Cif file wriing backend for fapswitch.
backend.sql module¶
Sqlite backend to save generated structures in a database.
-
class
backend.sql.
AlchemyBackend
(db_name)[source]¶ Bases:
object
Abstraction for fapswitch+sql interface.
-
add_freeform_structure
(base_structure, functions, cif_file)[source]¶ Insert a structure with freeform functionalisation into the database. Will try to associate all the different functional groups contained.
-
add_symmetry_structure
(base_structure, functions, cif_file)[source]¶ Insert a structure with symmetry based functionalisation into the database. Will try not to duplicate the “group@site” association designations.
-
-
class
backend.sql.
FreeFunctionalisedStructure
(base_structure, name, cif_file)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
SQLAlchemy model for structures that have freeform functionalisation over all the sites of the base structure. Each .base_structure .name (or .fullname) should be the same structure but rotations may change each generation.
-
base_structure
¶
-
cif_file
¶
-
functional_groups
¶
-
id
¶
-
name
¶
-
status
¶
-
unique_name
¶ Return the unique composite name
-
-
class
backend.sql.
FunctionalGroup
(id, name)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
Essentially the names and identifiers of available groups
-
functionalisations
¶
-
id
¶
-
name
¶
-
-
class
backend.sql.
Functionalisation
(functional_group_id, site)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
Pairs of functional groups and attachment sites. Note that sites with the same name will have no relationship between structures.
-
functional_group_id
¶
-
id
¶
-
site
¶
-
-
class
backend.sql.
SymFunctionalisedStructure
(base_structure, name, cif_file)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
SQLAlchemy model for structures that have been derived with the symmetry of the base structure. Each .base_structure .name (or .fullname) should be the same structure.
-
base_structure
¶
-
cif_file
¶
-
fullname
¶ Return the unique composite name
-
functionalisations
¶
-
id
¶
-
name
¶
-
status
¶
-