bobbyjudd / rexgen_direct Goto Github PK
View Code? Open in Web Editor NEWThis project forked from connorcoley/rexgen_direct
Template-free prediction of organic reaction outcomes
License: GNU General Public License v3.0
This project forked from connorcoley/rexgen_direct
Template-free prediction of organic reaction outcomes
License: GNU General Public License v3.0
In rexgen_direct/core_wln_global/nntest_direct.py the line:
smiles2graph_batch = partial(_s2g, idxfunc=lambda x:x.GetIntProp('molAtomMapNumber') - 1)
The lambda body x.GetIntProp('molAtomMapNumber')
tries to reference an integer property for and Atom object. See the RDKit docs about this property: https://www.rdkit.org/docs/RDKit_Book.html?highlight=molatommapnumber#magic-property-values
When running the custom Patent DB dataset, this code generates a KeyError:
File "nntest_direct.py", line 191, in
bindex_to_o = {val:key for key, val in bo_to_index.iteritems()}
AttributeError: 'dict' object has no attribute 'iteritems'
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/bobby/anaconda3/envs/my-rdkit-env/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/home/bobby/anaconda3/envs/my-rdkit-env/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "nntest_direct.py", line 168, in read_data
src_tuple = smiles2graph_batch(src_batch)
File "/home/bobby/projects/ucla/cs260/final_proj/rexgen_direct/rexgen_direct/core_wln_global/mol_graph.py", line 143, in smiles2graph_list
res = list(map(lambda x:smiles2graph(x,idxfunc), smiles_list))
File "/home/bobby/projects/ucla/cs260/final_proj/rexgen_direct/rexgen_direct/core_wln_global/mol_graph.py", line 143, in
res = list(map(lambda x:smiles2graph(x,idxfunc), smiles_list))
File "/home/bobby/projects/ucla/cs260/final_proj/rexgen_direct/rexgen_direct/core_wln_global/mol_graph.py", line 81, in smiles2graph
idx = idxfunc(atom)
File "nntest_direct.py", line 52, in
smiles2graph_batch = partial(_s2g, idxfunc=lambda x:x.GetIntProp('molAtomMapNumber') - 1)
KeyError: 'molAtomMapNumber'
The included preprocessed datasets (train.txt.proc, test.txt.proc, valid.txt.proc) do not generate this error, however both datasets have been preprocessed by the prep_data.py script.
Need to determine what is unique to the custom dataset that is causing that is causing the error.
Upload .tex file for report that will be submitted for the class
Add another route to the Django app to host the visualization of the prediction output on the custom dataset. The route should be at http://localhost:8000/visualize/custom.
Start by adding the custom route here:
rexgen_direct/website/visualize/urls.py
Lines 5 to 8 in d40d382
Then add view functions (index and display) for custom here
rexgen_direct/website/visualize/views.py
Lines 8 to 29 in d40d382
The index and display functions will be pretty much the same but the display function needs to specify the correct dataset when calling do_index() and also need to add another html template to request the new custom display route.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.