gt4sd.domains.materials package¶
Types, classes, validation, etc. for the material domain.
Submodules:
Summary¶
Reference¶
- class MoleculeFormat(value)[source]¶
Bases:
str
,Enum
An enumeration.
- __dict__ = mappingproxy({'_generate_next_value_': <function Enum._generate_next_value_>, '__module__': 'gt4sd.domains.materials', '__doc__': 'An enumeration.', '__dict__': <attribute '__dict__' of 'MoleculeFormat' objects>, '__weakref__': <attribute '__weakref__' of 'MoleculeFormat' objects>, '_member_names_': ['selfies', 'smiles', 'copolymer'], '_member_map_': {'selfies': <MoleculeFormat.selfies: 'SELFIES'>, 'smiles': <MoleculeFormat.smiles: 'SMILES'>, 'copolymer': <MoleculeFormat.copolymer: 'Copolymer'>}, '_member_type_': <class 'str'>, '_value2member_map_': {'SELFIES': <MoleculeFormat.selfies: 'SELFIES'>, 'SMILES': <MoleculeFormat.smiles: 'SMILES'>, 'Copolymer': <MoleculeFormat.copolymer: 'Copolymer'>}, 'selfies': <MoleculeFormat.selfies: 'SELFIES'>, 'smiles': <MoleculeFormat.smiles: 'SMILES'>, 'copolymer': <MoleculeFormat.copolymer: 'Copolymer'>, '__repr__': <function Enum.__repr__>, '__str__': <function Enum.__str__>, '__format__': <function Enum.__format__>, '__new__': <function Enum.__new__>, '__annotations__': {}})¶
- __doc__ = 'An enumeration.'¶
- __module__ = 'gt4sd.domains.materials'¶
- __weakref__¶
list of weak references to the object (if defined)
- _generate_next_value_(start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_value: the last value assigned or None
- _member_map_ = {'copolymer': MoleculeFormat.copolymer, 'selfies': MoleculeFormat.selfies, 'smiles': MoleculeFormat.smiles}¶
- _member_names_ = ['selfies', 'smiles', 'copolymer']¶
- _member_type_¶
alias of
str
- _value2member_map_ = {'Copolymer': MoleculeFormat.copolymer, 'SELFIES': MoleculeFormat.selfies, 'SMILES': MoleculeFormat.smiles}¶
- copolymer = 'Copolymer'¶
- selfies = 'SELFIES'¶
- smiles = 'SMILES'¶
- validate_copolymer(copolymers_list)[source]¶
Validate copolymers.
- Parameters
copolymers_list (
List
[str
]) – list of Copolymer representing molecules.- Return type
Tuple
[List
[str
],List
[int
]]- Returns
a tuple containing RDKit molecules and valid indexes.
- validate_molecules(pattern_list, input_type)[source]¶
Validate molecules.
- Parameters
pattern_list (
List
[str
]) – list of patterns representing molecules.input_type (
str
) – type of patter (SELFIES, SMILES OR Copolymer).
- Return type
Tuple
[List
[Any
],List
[int
]]- Returns
a tuple containing RDKit molecules and valid indexes.