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
Detecting Human-Object Interactions with Object-Guided Cross-Modal Calibrated Semantics

[AAAI2022] Detecting Human-Object Interactions with Object-Guided Cross-Modal Calibrated Semantics Overall pipeline of OCN. Paper Link: [arXiv] [AAAI

13 Nov 21, 2022
NeuroFind - A solution to the to the Task given by the Oberseminar of Messtechnik Institute of TU Dresden in 2021

NeuroFind A solution to the to the Task given by the Oberseminar of Messtechnik

1 Jan 20, 2022
Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library.

SymEngine Python Wrappers Python wrappers to the C++ library SymEngine, a fast C++ symbolic manipulation library. Installation Pip See License section

136 Dec 28, 2022
Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy.

Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy. Now with tensorflow 1.0 support. Evaluation usa

Marcel R. 349 Aug 06, 2022
EMNLP 2021 Findings' paper, SCICAP: Generating Captions for Scientific Figures

SCICAP: Scientific Figures Dataset This is the Github repo of the EMNLP 2021 Findings' paper, SCICAP: Generating Captions for Scientific Figures (Hsu

Edward 26 Nov 21, 2022
D2LV: A Data-Driven and Local-Verification Approach for Image Copy Detection

Facebook AI Image Similarity Challenge: Matching Track —— Team: imgFp This is the source code of our 3rd place solution to matching track of Image Sim

16 Dec 25, 2022
a grammar based feedback fuzzer

Nautilus NOTE: THIS IS AN OUTDATE REPOSITORY, THE CURRENT RELEASE IS AVAILABLE HERE. THIS REPO ONLY SERVES AS A REFERENCE FOR THE PAPER Nautilus is a

Chair for Sys­tems Se­cu­ri­ty 158 Dec 28, 2022
official implementation for the paper "Simplifying Graph Convolutional Networks"

Simplifying Graph Convolutional Networks Updates As pointed out by #23, there was a subtle bug in our preprocessing code for the reddit dataset. After

Tianyi 727 Jan 01, 2023
Using LSTM to detect spoofing attacks in an Air-Ground network

Using LSTM to detect spoofing attacks in an Air-Ground network Specifications IDE: Spider Packages: Tensorflow 2.1.0 Keras NumPy Scikit-learn Matplotl

Tiep M. H. 1 Nov 20, 2021
Research into Forex price prediction from price history using Deep Sequence Modeling with Stacked LSTMs.

Forex Data Prediction via Recurrent Neural Network Deep Sequence Modeling Research Paper Our research paper can be viewed here Installation Clone the

Alex Taradachuk 2 Aug 07, 2022
PEPit is a package enabling computer-assisted worst-case analyses of first-order optimization methods.

PEPit: Performance Estimation in Python This open source Python library provides a generic way to use PEP framework in Python. Performance estimation

Baptiste 53 Nov 16, 2022
学习 python3 以来写的一些垃圾玩具……

和东哥做兄弟 Author: chiupam 版权 未经本人同意,仓库内所有资源文件,禁止任何公众号、自媒体、开发者进行任何形式的转载、发布、搬运。 声明 这不是一个开源项目,只是把 GitHub 当作一个代码的存储空间,本项目不接受任何开源要求。 仅用于学习研究,禁止用于商业用途,不能保证其合法性

Chiupam 67 Mar 26, 2022
Gapmm2: gapped alignment using minimap2 (align transcripts to genome)

gapmm2: gapped alignment using minimap2 This tool is a wrapper for minimap2 to r

Jon Palmer 2 Jan 27, 2022
A pre-trained language model for social media text in Spanish

RoBERTuito A pre-trained language model for social media text in Spanish READ THE FULL PAPER Github Repository RoBERTuito is a pre-trained language mo

25 Dec 29, 2022
Repository for the AugmentedPCA Python package.

Overview This Python package provides implementations of Augmented Principal Component Analysis (AugmentedPCA) - a family of linear factor models that

Billy Carson 6 Dec 07, 2022
Half Instance Normalization Network for Image Restoration

HINet Half Instance Normalization Network for Image Restoration, based on https://github.com/megvii-model/HINet. Dependencies NumPy PyTorch, preferabl

Holy Wu 4 Jun 06, 2022
CT Based COVID 19 Diagnose by Image Processing and Deep Learning

This project proposed the deep learning and image processing method to undertake the diagnosis on 2D CT image and 3D CT volume.

1 Feb 08, 2022
Convolutional 2D Knowledge Graph Embeddings resources

ConvE Convolutional 2D Knowledge Graph Embeddings resources. Paper: Convolutional 2D Knowledge Graph Embeddings Used in the paper, but do not use thes

Tim Dettmers 586 Dec 24, 2022
HIVE: Evaluating the Human Interpretability of Visual Explanations

HIVE: Evaluating the Human Interpretability of Visual Explanations Project Page | Paper This repo provides the code for HIVE, a human evaluation frame

Princeton Visual AI Lab 16 Dec 13, 2022
Official implementation of DreamerPro: Reconstruction-Free Model-Based Reinforcement Learning with Prototypical Representations in TensorFlow 2

DreamerPro Official implementation of DreamerPro: Reconstruction-Free Model-Based Reinforcement Learning with Prototypical Representations in TensorFl

22 Nov 01, 2022