Code for the paper "JANUS: Parallel Tempered Genetic Algorithm Guided by Deep Neural Networks for Inverse Molecular Design"

Related tags

Deep LearningJANUS
Overview

JANUS: Parallel Tempered Genetic Algorithm Guided by Deep Neural Networks for Inverse Molecular Design

This repository contains code for the paper: JANUS: Parallel Tempered Genetic Algorithm Guided by Deep Neural Networks for Inverse Molecular Design. By: AkshatKumar Nigam, Robert Pollice, Alán Aspuru-Guzik

Package Requirements:

Using The Code:

The code can be run using:

python ./JANUS.py

Within params_init.py, a user has the option to provide:

  1. A function for calculting property values (see function calc_prop).
  2. Input parameters that are to be used by JANUS (see function generate_params). Initial parameters are provided. These are picked based on prior experience by the authors of the paper.

Output Generation:

All results from running JANUS will be stored here. The following files will be created:

  1. fitness_explore.txt: Fitness values for all molecules from the exploration component of JANUS.
  2. fitness_local_search.txt: Fitness values for all molecules from the exploitation component of JANUS.
  3. generation_all_best.txt: Smiles and fitness value for the best molecule encountered in every generation (iteration).
  4. init_mols.txt: List of molecules used to initialte JANUS.
  5. population_explore.txt: SMILES for all molecules from the exploration component of JANUS.
  6. population_local_search.txt: SMILES for all molecules from the exploitation component of JANUS.

Paper Results/Reproducibility:

Our code and results for each experiment in the paper can be found here:

Questions, problems?

Make a github issue 😄 . Please be as clear and descriptive as possible. Please feel free to reach out in person: (akshat[DOT]nigam[AT]mail[DOT]utoronto[DOT]ca, rob[DOT]pollice[AT]utoronto[DOT]ca)

License

Apache License 2.0

Comments
  • freeze_support runtime error with provided example

    freeze_support runtime error with provided example

    Hello, I'm trying out JANUS and if I just run the example inside the tests as provided I get

      File "/Users/nsofroniew/opt/anaconda3/envs/chem/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
        raise RuntimeError('''
    RuntimeError:
            An attempt has been made to start a new process before the
            current process has finished its bootstrapping phase.
    
            This probably means that you are not using fork to start your
            child processes and you have forgotten to use the proper idiom
            in the main module:
    
                if __name__ == '__main__':
                    freeze_support()
                    ...
    
            The "freeze_support()" line can be omitted if the program
            is not going to be frozen to produce an executable.
    

    This can be fixed by wrapping the creation and running of the JANUS agent and inside

    if __name__ == '__main__':
        torch.multiprocessing.freeze_support()
    

    see for a similar fix https://github.com/pytorch/pytorch/issues/5858#issuecomment-373950687

    I'm happy to submit a PR to fix if you like - it will be very simple

    opened by sofroniewn 4
  • Enquiring on multi-objective fitness function

    Enquiring on multi-objective fitness function

    Hi, I would like to ask if there are multiple objectives which I want the fitness function to fulfil, how would I write out the function because the example on the README.md is only for one objective (logP)?

    Thank you! :D

    opened by yipy0005 3
  • error in numpy/ list multiplication inside mutate_smi_list

    error in numpy/ list multiplication inside mutate_smi_list

    Hello, I am trying to run the provided example, but get the following error

    $ python ./example.py
        Unique and valid fragments generated: 107308
        Unique and valid fragments generated: 107308
    On generation 0/200
    /Users/nsofroniew/opt/anaconda3/envs/chem/lib/python3.9/site-packages/janus/janus.py:457: RuntimeWarning: overflow encountered in power
      prob_ = 1.0 / (3.0 ** ((F_50_val - fitness) / (F_50_val - F_25_val)) + 1)
        (Explr) Top Fitness: 15.811199999999957
        (Explr) Top Smile: CCCCCCCCCCCCCCCCOP(=O)(O)Oc1ccc(C=Cc2ccc(OP(=O)(O)OCCCCCCCCCCCCCCCC)cc2)cc1
    Traceback (most recent call last):
      File "/Users/nsofroniew/Documents/code/chem/janus/tests/./example.py", line 81, in <module>
      File "/Users/nsofroniew/opt/anaconda3/envs/chem/lib/python3.9/site-packages/janus/janus.py", line 317, in run
        mut_smi_loc = self.mutate_smi_list(smiles_local_search, "local")
      File "/Users/nsofroniew/opt/anaconda3/envs/chem/lib/python3.9/site-packages/janus/janus.py", line 137, in mutate_smi_list
        smi_list = smi_list * num_random_samples
    numpy.core._exceptions._UFuncNoLoopError: ufunc 'multiply' did not contain a loop with signature matching types (dtype('<U98'), dtype('int64')) -> None
    

    It looks like smi_list has become a numpy array, which is unintended and it should be a list. This can be fixed by making this line https://github.com/aspuru-guzik-group/JANUS/blob/a52e5994a108063e3fc1d692752cea0ff0240120/src/janus/janus.py#L137 be

        smi_list = list(smi_list) * num_random_samples
    

    There could be other, more desirable fixes that avoid this problem altogether. I am happy to submit a PR if this fix is desired though.

    opened by sofroniewn 2
  • Unhandled exceptions and KeyError

    Unhandled exceptions and KeyError

    I tried running JANUS.py but got a number of exceptions. In addition, the script terminated with a KeyError.

    Initial population obtained!
    Forming Fragments!
        Fragment creation: 0/10000
        Fragment creation: 1000/10000
        Fragment creation: 2000/10000
        Fragment creation: 3000/10000
        Fragment creation: 4000/10000
        Fragment creation: 5000/10000
        Fragment creation: 6000/10000
        Fragment creation: 7000/10000
        Fragment creation: 8000/10000
        Fragment creation: 9000/10000
    Process Process-5:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch3_1]'
    	SELFIES: [S][C][=N][N][=C][Branch1][Ring1][C][C][C][Branch1][#Branch1][O][C][Branch1][C][C][=O][C][Branch1][C][C][Branch1][C][C][C][N][N][N][Branch3_1][C][C][=C][=C][Branch1][C][N][C][=C][Ring1][#Branch1][C][#Branch1][N]
    Process Process-7:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 124, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Expl=Ring3]'
    	SELFIES: [C][Expl=Ring3][=C][Branch2][Ring1][=Branch1][C][=C][C][=C][Branch1][#C][C][=C][Ring1][=Branch1][C][=C][C][=C][C][=C][Ring1][=Branch1][Ring1][=C][F][C][Branch1][C][C][C][C][C][N][Branch1][=Branch2][S][Branch1][C][C][=Branch1][C][=O][=O][C][C][Ring1][#Branch2][C][N][Branch1][Branch1][C][C][C][C][C][C][C][C]
    Process Process-4:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch1_3]'
    	SELFIES: [C][C][=C][Branch1][=Branch1][C][C][=Ring1][=Branch1][Branch1_3][C][C][=C][C][=C][Branch1][C][C][=C][C][=C][Branch1][C][N][C][=N][Ring1][#Branch1][#Branch2][C][N][C][O][C][C][Ring1][=Branch1][C][Branch1][C][O][=C][C][=C][Ring1][=C][O][Ring1][P]
    Process Process-6:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch3_2]'
    	SELFIES: [C][C][=Branch1][#C][=C][C][=C][C][=Ring1][=Branch1][C][Branch1][C][F][Branch1][C][F][F][C][C][Branch1][C][C][=N][N][C][=Branch1][C][C][C][N][C][C][C][Branch1][C][N][C][C][Ring1][#Branch1][C][O][=C][C][Branch1][O][C][Branch3_2][C][N][C][C][O][C][C][Ring1][=Branch1][=O]
    Process Process-8:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch2_1]'
    	SELFIES: [C][=Branch1][C][=O][Branch1][C][O][C][N][C][=Branch1][C][=O][C][Branch2][Ring1][=Branch1][N][C][=Branch1][C][=O][C][Branch1][N][C][=C][C][=C][C][Branch2_1][Ring2][=N][Ring1][=Branch1][N][=N][O][C][Ring2][Ring1][C][S][C][C][=Ring2][Ring1][=Branch1][S][C][S][N][=C][Branch1][Ring2][N][=Ring1][Branch1][S][C][C][N]
    Process Process-11:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch2_3]'
    	SELFIES: [C][C][=C][C][Branch1][=C][C][N][Branch1][C][C][N][C][=Branch1][C][=O][C][S][C][C][C][Ring1][#Branch1][=C][C][=Ring1][O][C][=C][C][=C][C][=C][Ring1][=Branch1][O][C][=C][Branch2_3][Branch1]
    Process Process-10:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch3_3]'
    	SELFIES: [F][C][=C][C][=C][Branch2][Ring2][O][C][N][C][Branch2][Ring2][Ring2][C][Branch1][#C][C][C][=C][Branch1][=Branch2][C][=C][C][=C][C][=Branch1][C][=O][N][Branch1][C][C][Branch3_3][C][Branch1][C][F][C][=Ring1][#Branch1][F][=N][C][C][Ring1][C][N][C][C][N][C][C][Ring1][=Branch1][=C][=N][C][=Branch1][Branch1][=N][C][=Ring1][=Branch1][N][Branch1][C][C][C][=O][C][=C][Ring2][Ring1][=N]
    Process Process-9:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 116, in _derive_mol_from_symbols
        init_state=binit_state, root_atom=prev_atom, rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch3_3]'
    	SELFIES: [C][C][Branch1][#Branch2][C][=C][C][=Branch1][Ring2][=C][=Branch1][F][=N][C][=C][Branch2][Ring2][Branch1][N][Branch1][Branch2][C][=N][C][Ring1][=Branch1][=Ring1][=C][N][=C][C][=C][C][=C][Branch1][P][C][=Branch1][Ring2][=C][Ring1][=Branch1][C][Branch3_3][C][N][=C][C][=C][C][=Ring1][=Branch1][O][C][O]
    On generation 0/200
        (Explr) Top Fitness: 1.0
        (Explr) Top Smile: C=C1N=CC=C(N=CNc2ccc(N)cc2)N=C(C)[SH]1C
    Process Process-27:
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/multiprocessing/process.py", line 99, in run
        self._target(*self._args, **self._kwargs)
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 205, in calc_parr_prop
        props_collect[property_name][smile] = get_prop_material(smile, alphabet=alphabet, num_random_samples=num_random_samples, num_mutations=num_mutations)  # TODO: TESTING
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in get_prop_material
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/software/JANUS/mutate_parr.py", line 129, in 
        mutated_smiles = [decoder(x) for x in mutated_sf]
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 59, in decoder
        rings=rings
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 147, in _derive_mol_from_symbols
        _raise_decoder_error(selfies, symbol)
      File "/home/ubuntu/anaconda3/envs/reinvent.v3.2/lib/python3.7/site-packages/selfies/decoder.py", line 179, in _raise_decoder_error
        raise DecoderError(err_msg)
    selfies.exceptions.DecoderError: invalid symbol '[Branch3_2]'
    	SELFIES: [C][O][=C][N][C][N][C][=Branch1][C][=O][N][Branch1][=Branch1][N+1][=Branch1][C][=O][O-1][C][Ring1][=Branch2][N][Ring1][N][O][C][=C][C][C][N][C][N][C][N][C][=C][C][=C][Branch1][C][F][C][Branch1][C][F][=C][Ring1][Branch2][=N][C][Branch1][C][C][Branch3_2][Branch1][=Branch1][C][Branch1][C][C][=O][S][Ring1][=Branch2][=C][C][=Ring1][#Branch1][N][C][N][C][C][=C][C][=C][C][=C][Ring1][=Branch1][C][N][=C][Branch1][=C][SH1][Branch1][C][C][C][=C][C][=C][C][=C][Ring1][=Branch1][=Branch1][C][=C][N][=C][C][=Ring1][#Branch2][C]
    Traceback (most recent call last):
      File "./JANUS.py", line 308, in 
        mut_smi_dict_local  = mut_smi_dict_local[population[top_idx]]
    KeyError: 'C=C1N=CC=C(N=CNc2ccc(N)cc2)N=C(C)[SH]1C'
    
    opened by PatWalters 2
  • multiprocessing in windows

    multiprocessing in windows

    Hi. I was run the code, but I met errors in all codes that used multiprocessing. As I know these errors came from the difference of OS.

    Since I use Windows, I wonder how to correct the code for Windows.

    Thanks.

    opened by gunwook12 1
  • "aux" folder name should be changed to make the repository compatible with Windows.

    It looks like "aux" is a reserved word in Windows and directory of this name cannot be used. This is causing error, when I try to clone the repository.

    opened by sptiwari 1
  • Question: How sensitive is the model to molecule initialization?

    Question: How sensitive is the model to molecule initialization?

    Hello, great work! I'm excited to try this out for a chemical design project I'm working on. One question that I had after reading the pre-print— how sensitive is the model to molecule initialization?

    I read that you can start JANUS with random molecules or provide it with defined molecules. Did you perform any tests on what happens if the best molecule's scaffold was ablated from the initial bank of molecules? And how much, if at all, does rational initialization improve over random molecular initialization? Does this relate back to being trapped in local minima, and would the choice of initialization help explore more chemical space?

    Thank you!

    question 
    opened by jrhorne 1
Releases(v1)
Owner
Aspuru-Guzik group repo
Aspuru-Guzik group repo
1st-in-MICCAI2020-CPM - Combined Radiology and Pathology Classification

Combined Radiology and Pathology Classification MICCAI 2020 Combined Radiology a

22 Dec 08, 2022
Diverse Image Captioning with Context-Object Split Latent Spaces (NeurIPS 2020)

Diverse Image Captioning with Context-Object Split Latent Spaces This repository is the PyTorch implementation of the paper: Diverse Image Captioning

Visual Inference Lab @TU Darmstadt 34 Nov 21, 2022
Code for the Lovász-Softmax loss (CVPR 2018)

The Lovász-Softmax loss: A tractable surrogate for the optimization of the intersection-over-union measure in neural networks Maxim Berman, Amal Ranne

Maxim Berman 1.3k Jan 04, 2023
Automatically Build Multiple ML Models with a Single Line of Code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.

Auto-ViML Automatically Build Variant Interpretable ML models fast! Auto_ViML is pronounced "auto vimal" (autovimal logo created by Sanket Ghanmare) N

AutoViz and Auto_ViML 397 Dec 30, 2022
.NET bindings for the Pytorch engine

TorchSharp TorchSharp is a .NET library that provides access to the library that powers PyTorch. It is a work in progress, but already provides a .NET

Matteo Interlandi 17 Aug 30, 2021
BboxToolkit is a tiny library of special bounding boxes.

BboxToolkit is a light codebase collecting some practical functions for the special-shape detection, such as oriented detection

jbwang1997 73 Jan 01, 2023
GRaNDPapA: Generator of Rad Names from Decent Paper Acronyms

GRaNDPapA: Generator of Rad Names from Decent Paper Acronyms Trying to publish a new machine learning model and can't write a decent title for your pa

264 Nov 08, 2022
All the essential resources and template code needed to understand and practice data structures and algorithms in python with few small projects to demonstrate their practical application.

Data Structures and Algorithms Python INDEX 1. Resources - Books Data Structures - Reema Thareja competitiveCoding Big-O Cheat Sheet DAA Syllabus Inte

Shushrut Kumar 129 Dec 15, 2022
A collection of papers about Transformer in the field of medical image analysis.

A collection of papers about Transformer in the field of medical image analysis.

Junyu Chen 377 Jan 05, 2023
9th place solution

AllDataAreExt-Galixir-Kaggle-HPA-2021-Solution Team Members Qishen Ha is Master of Engineering from the University of Tokyo. Machine Learning Engineer

daishu 5 Nov 18, 2021
LIVECell - A large-scale dataset for label-free live cell segmentation

LIVECell dataset This document contains instructions of how to access the data associated with the submitted manuscript "LIVECell - A large-scale data

Sartorius Corporate Research 112 Jan 07, 2023
Good Semi-Supervised Learning That Requires a Bad GAN

Good Semi-Supervised Learning that Requires a Bad GAN This is the code we used in our paper Good Semi-supervised Learning that Requires a Bad GAN Ziha

Zhilin Yang 177 Dec 12, 2022
Dense Prediction Transformers

Vision Transformers for Dense Prediction This repository contains code and models for our paper: Vision Transformers for Dense Prediction René Ranftl,

Intelligent Systems Lab Org 1.3k Jan 02, 2023
PyTorch implementation of Weak-shot Fine-grained Classification via Similarity Transfer

SimTrans-Weak-Shot-Classification This repository contains the official PyTorch implementation of the following paper: Weak-shot Fine-grained Classifi

BCMI 60 Dec 02, 2022
Source code for Zalo AI 2021 submission

zalo_ltr_2021 Source code for Zalo AI 2021 submission Solution: Pipeline We use the pipepline in the picture below: Our pipeline is combination of BM2

128 Dec 27, 2022
Official repository of DeMFI (arXiv.)

DeMFI This is the official repository of DeMFI (Deep Joint Deblurring and Multi-Frame Interpolation). [ArXiv_ver.] Coming Soon. Reference Jihyong Oh a

Jihyong Oh 56 Dec 14, 2022
Easy-to-use library to boost AI inference leveraging state-of-the-art optimization techniques.

NEW RELEASE How Nebullvm Works • Tutorials • Benchmarks • Installation • Get Started • Optimization Examples Discord | Website | LinkedIn | Twitter Ne

Nebuly 1.7k Dec 31, 2022
Fast and exact ILP-based solvers for the Minimum Flow Decomposition (MFD) problem, and variants of it.

MFD-ILP Fast and exact ILP-based solvers for the Minimum Flow Decomposition (MFD) problem, and variants of it. The solvers are implemented using Pytho

Algorithmic Bioinformatics Group @ University of Helsinki 4 Oct 23, 2022
Official implementation of "Articulation Aware Canonical Surface Mapping"

Articulation-Aware Canonical Surface Mapping Nilesh Kulkarni, Abhinav Gupta, David F. Fouhey, Shubham Tulsiani Paper Project Page Requirements Python

Nilesh Kulkarni 56 Dec 16, 2022
Code release for Convolutional Two-Stream Network Fusion for Video Action Recognition

Convolutional Two-Stream Network Fusion for Video Action Recognition

Christoph Feichtenhofer 676 Dec 31, 2022