mjwen / bondnet Goto Github PK
View Code? Open in Web Editor NEWA graph neural network for the prediction of bond dissociation energies for molecules of any charge.
Home Page: https://doi.org/10.1039/D0SC05251E
License: Other
A graph neural network for the prediction of bond dissociation energies for molecules of any charge.
Home Page: https://doi.org/10.1039/D0SC05251E
License: Other
Hi
Firstly I would like to thank you for this magnificent package
I could fortunately install your package but I am struggling to load following functions!
from bondnet.prediction.predictor import predict_single_molecule from bondnet.data.dataset import ReactionNetworkDataset from bondnet.data.dataloader import DataLoaderReactionNetwork from bondnet.data.featurizer import AtomFeaturizerMinimum, BondAsNodeFeaturizerMinimum, GlobalFeaturizer from bondnet.data.grapher import HeteroMoleculeGraph from bondnet.data.dataset import train_validation_test_split from bondnet.model.gated_reaction_network import GatedGCNReactionNetwork from bondnet.scripts.create_label_file import read_input_files from bondnet.model.metric import WeightedL1Loss from bondnet.utils import seed_torch
I am waiting for you help
Thank you!
Regards
First of all, thank you for sharing your great research.
I have a question about GPU computation.
Does it right to set the bellow parameter to 0, if I want to use GPU for calculation?:
In train_bde_disbritubed.py
parser.add_argument(
"--gpu", type=int, default=None, help="GPU index. None to use CPU."
)
If I changed it like below:
parser.add_argument(
"--gpu", type=int, default=0, help="GPU index. None to use CPU."
)
It makes errors, and the error messages are like below:
Traceback (most recent call last):
File "C:/Users/Usr/PycharmProjects/bondnet-master/train_bde_distributed.py", line 496, in <module>
main()
File "C:/Users/Usr/PycharmProjects/bondnet-master/train_bde_distributed.py", line 492, in main
main_worker(args.gpu, None, args)
File "C:/Users/Usr/PycharmProjects/bondnet-master/train_bde_distributed.py", line 420, in main_worker
optimizer, model, feature_names, train_loader, loss_func, metric, args.gpu
File "C:/Users/Usr/PycharmProjects/bondnet-master/train_bde_distributed.py", line 174, in train
pred = model(bg, feats, label["reaction"], norm_atom, norm_bond)
File "C:\ProgramData\Anaconda3\envs\python3.7\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Usr\PycharmProjects\bondnet-master\bondnet\model\gated_reaction_network.py", line 29, in forward
feats = layer(graph, feats, norm_atom, norm_bond)
File "C:\ProgramData\Anaconda3\envs\python3.7\lib\site-packages\torch\nn\modules\module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "C:\Users\Usr\PycharmProjects\bondnet-master\bondnet\layer\gatedconv.py", line 151, in forward
g.nodes["atom"].data.update({"Ah": self.A(h), "Dh": self.D(h), "Eh": self.E(h)})
File "C:\ProgramData\Anaconda3\envs\python3.7\lib\_collections_abc.py", line 841, in update
self[key] = other[key]
File "C:\ProgramData\Anaconda3\envs\python3.7\lib\site-packages\dgl\view.py", line 81, in __setitem__
self._graph._set_n_repr(self._ntid, self._nodes, {key : val})
File "C:\ProgramData\Anaconda3\envs\python3.7\lib\site-packages\dgl\heterograph.py", line 3997, in _set_n_repr
' same device.'.format(key, F.context(val), self.device))
dgl._ffi.base.DGLError: Cannot assign node feature "Ah" on device cuda:0 to a graph on device cpu. Call DGLGraph.to() to copy the graph to the same device.
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.