def process_args(self) -> None: # Load checkpoint paths self.checkpoint_paths = get_checkpoint_paths( checkpoint_path=self.checkpoint_path, checkpoint_paths=self.checkpoint_paths, checkpoint_dir=self.checkpoint_dir, ) # Validate features if self.features_generator is not None and 'rdkit_2d_normalized' in self.features_generator and self.features_scaling: raise ValueError( 'When using rdkit_2d_normalized features, --no_features_scaling must be specified.' ) if self.smiles_columns is None: self.smiles_columns = [None] * self.number_of_molecules elif len(self.smiles_columns) != self.number_of_molecules: raise ValueError( 'Length of smiles_columns must match number_of_molecules.') # Validate atom descriptors if (self.atom_descriptors is None) != (self.atom_descriptors_path is None): raise ValueError( 'If atom_descriptors is specified, then an atom_descriptors_path must be provided ' 'and vice versa.') if self.atom_descriptors is not None and self.number_of_molecules > 1: raise NotImplementedError( 'Atom descriptors are currently only supported with one molecule ' 'per input (i.e., number_of_molecules = 1).') set_cache_mol(not self.no_cache_mol)
def process_args(self) -> None: # Load checkpoint paths self.checkpoint_paths = get_checkpoint_paths( checkpoint_path=self.checkpoint_path, checkpoint_paths=self.checkpoint_paths, checkpoint_dir=self.checkpoint_dir, ) # Validate features if (self.features_generator is not None and "rdkit_2d_normalized" in self.features_generator and self.features_scaling): raise ValueError( "When using rdkit_2d_normalized features, --no_features_scaling must be specified." ) # Validate atom descriptors if (self.atom_descriptors is None) != (self.atom_descriptors_path is None): raise ValueError( "If atom_descriptors is specified, then an atom_descriptors_path must be provided " "and vice versa.") if self.atom_descriptors is not None and self.number_of_molecules > 1: raise NotImplementedError( "Atom descriptors are currently only supported with one molecule " "per input (i.e., number_of_molecules = 1).") # Validate bond descriptors if self.bond_features_path is not None and self.number_of_molecules > 1: raise NotImplementedError( "Bond descriptors are currently only supported with one molecule " "per input (i.e., number_of_molecules = 1).") set_cache_mol(not self.no_cache_mol)
def process_args(self) -> None: # Load checkpoint paths self.checkpoint_paths = get_checkpoint_paths( checkpoint_path=self.checkpoint_path, checkpoint_paths=self.checkpoint_paths, checkpoint_dir=self.checkpoint_dir, ) # Validate features if self.features_generator is not None and 'rdkit_2d_normalized' in self.features_generator and self.features_scaling: raise ValueError('When using rdkit_2d_normalized features, --no_features_scaling must be specified.') # Validate atom descriptors if self.atom_descriptors is not None and self.atom_descriptors_path is None: raise ValueError('When using atom_descriptors, --atom_descriptors_path must be specified') set_cache_mol(not self.no_cache_mol)