schrodinger.application.phase.packages.conformer_storage module¶
Support for serialization of “multiconformer structures”.
-
class
schrodinger.application.phase.packages.conformer_storage.
Format
¶ Bases:
enum.Enum
An enumeration.
-
COMPACT
= 'compact'¶
-
LOSSLESS
= 'lossless'¶
-
-
schrodinger.application.phase.packages.conformer_storage.
serialize_lossless
(conformers, keep_properties=False, deflate=True)¶ Serializes conformers to be deserialized by
deserialize_lossless()
.Parameters: - conformers (list(structure.Structure)) – List of conformer structures.
- keep_properties (bool) – Keep properties that would be discarded otherwise.
- deflate (bool) – Deflate using zlib?
Returns: Serialized conformers.
Return type: str
-
schrodinger.application.phase.packages.conformer_storage.
deserialize_lossless
(data, inflate=True)¶ Deserializes conformers serialized by
serialize_lossless()
.Parameters: - data (str) – Serialized conformers.
- inflate (bool) – Decompress using zlib?
Returns: Conformer structures.
Return type: list(structure.Structure)
-
schrodinger.application.phase.packages.conformer_storage.
serialize_compact
(conformers, keep_properties=False, deflate=True)¶ Serializes conformers using approach from PHASE-2096.
Parameters: - conformers (list(structure.Structure)) – List of conformer structures.
- keep_properties (bool) – Keep properties that would be discarded otherwise.
- deflate (bool) – Deflate using zlib?
Returns: Serialized conformers.
Return type: str
-
schrodinger.application.phase.packages.conformer_storage.
deserialize_compact
(data, inflate=True)¶ Deserializes conformers serialized by
serialize_compact
.Parameters: - data (str) – Serialized conformers.
- inflate (bool) – Decompress using zlib?
Returns: Conformer structures.
Return type: list(structure.Structure)
-
schrodinger.application.phase.packages.conformer_storage.
get_api
(fmt, keep_properties=False, compress=True)¶ Returns conformer serializer/deserializer for format
fmt
.Parameters: - fmt (
Format
) – Desired data format. - keep_properties (bool) – Keep properties that would be discarded otherwise.
- compress (bool) – Apply zlib compression.
Returns: Couple of callables to serialize/deserialize conformers.
Return type: (iterable(structure.Structure) -> str, str -> list(structure.Structure))
- fmt (