chainer_chemistry.dataset.preprocessors.WeaveNetPreprocessor

class chainer_chemistry.dataset.preprocessors.WeaveNetPreprocessor(max_atoms=20, add_Hs=True, use_fixed_atom_feature=False, atom_list=None, include_unknown_atom=False, kekulize=False)[source]
WeaveNet must have fixed-size atom list for now, zero_padding option is always set to True.
Parameters:
  • max_atoms (int) – Max number of atoms for each molecule, if the number of atoms is more than this value, this data is simply ignored. Setting negative value indicates no limit for max atoms.
  • add_Hs (bool) – If True, implicit Hs are added.
  • use_fixed_atom_feature (bool) – If True, atom feature is extracted used in original paper. If it is False, atomic number is used instead.
  • atom_list (list) – list of atoms to extract feature. If None, default ATOM is used as atom_list
  • include_unknown_atom (bool) – If False, when the mol includes atom which is not in atom_list, it will raise MolFeatureExtractionError. If True, even the atom is not in atom_list, atom_type is set as “unknown” atom.
  • kekulize (bool) – If True, Kekulizes the molecule.
__init__(max_atoms=20, add_Hs=True, use_fixed_atom_feature=False, atom_list=None, include_unknown_atom=False, kekulize=False)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([max_atoms, add_Hs, …]) Initialize self.
get_input_features(mol) get input features for WeaveNet
get_label(mol[, label_names]) Extracts label information from a molecule.
prepare_smiles_and_mol(mol) Prepare smiles and mol used in following preprocessing.
process(filepath)