peterbjorgensen / deepdft Goto Github PK
View Code? Open in Web Editor NEWOfficial implementation of DeepDFT model
License: MIT License
Official implementation of DeepDFT model
License: MIT License
This is a very excellent work!
A few questions about the datasets:
qm9vasp
perhaps)?Thanks in advance!
This is an excellent work.
Here is a question.
If I want to train this model using ethylene carbonate dataset.,What model GPU do I need for training?
Hi there, when playing around with the code, I noticed that when I load a cube using the _read_cube function and check atoms.get_pbc(), I get [False False False]. Never is this set to True in the rest of the code, so it seems the resulting connectivity table does not account for PBCs (specifically in the CollateFuncAtoms and CollateFuncRandSample classes). Does this have to do with some specific cube formatting in the ase.io.cube class? Is it supposed to recognize pbc's automatically? I'm wondering if PBCs should automatically be turned on in these custom collatefn classes. I suspect so... since the source code for the ase io.cube class only sets atoms.pbc = True if the argument program == "castep" (which is not the case for enabled PBCs in this code).
Thanks for any clarification here!
Edit: I suppose it is handled properly by asap3 after looking through the docs (and thus the wrapper code you wrote is only use for the cases with no PBCs). Please disregard if that is the case!
I tried to run an instance to predict the density of a given molecule, but it failed because I don't have a GPU. I'm not trying to train the network, just to use the DeepDFT qm9 pretrained model to predict something. This is not working despite selecting --device cpu:
$ python predict_with_model.py --device cpu qm9_pretrained_model tst.xyz
Traceback (most recent call last):
File "predict_with_model.py", line 168, in <module>
main()
File "predict_with_model.py", line 121, in main
model, cutoff = load_model(args.model_dir, args.device)
File "predict_with_model.py", line 45, in load_model
state_dict = torch.load(os.path.join(model_dir, "best_model.pth"))
File "/home/peve/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 608, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/peve/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 787, in _legacy_load
result = unpickler.load()
File "/home/peve/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 743, in persistent_load
deserialized_objects[root_key] = restore_location(obj, location)
File "/home/peve/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 175, in default_restore_location
result = fn(storage, location)
File "/home/peve/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 151, in _cuda_deserialize
device = validate_cuda_device(location)
File "/home/peve/anaconda3/lib/python3.8/site-packages/torch/serialization.py", line 135, in validate_cuda_device
raise RuntimeError('Attempting to deserialize object on a CUDA '
RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.
After adding 'map_location=torch.device('cpu')' ot the torch.load portion of the script, I can get past this first error, but yet there's another issue related to no GPU:
$ python predict_with_model.py --device cpu qm9_pretrained_model tst.xyz
/home/peve/anaconda3/lib/python3.8/site-packages/ase/utils/__init__.py:62: FutureWarning: Please use atoms.cell.cellpar() instead
warnings.warn(warning)
2021-08-31 15:21:22,284 [DEBUG] Computing atom-to-atom graph
Traceback (most recent call last):
File "predict_with_model.py", line 168, in <module>
main()
File "predict_with_model.py", line 143, in main
graph_dict = collate_fn([density_dict])
File "/home/peve/DeepDFT/dataset.py", line 468, in __call__
return collate_list_of_dicts(graphs, pin_memory=self.pin_memory)
File "/home/peve/DeepDFT/dataset.py", line 419, in collate_list_of_dicts
collated = {k: pin(pad_and_stack(dict_of_lists[k])) for k in dict_of_lists}
File "/home/peve/DeepDFT/dataset.py", line 419, in <dictcomp>
collated = {k: pin(pad_and_stack(dict_of_lists[k])) for k in dict_of_lists}
File "/home/peve/DeepDFT/dataset.py", line 415, in <lambda>
pin = lambda x: x.pin_memory()
RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.aspx
Maybe it is really not possible to run on CPU, but then perhaps you should take the cpu flag out and specify it in the readme...
I am very impressed by this excellent model and technical solution.
Could you provide the datasplits.json
files for the pre-trained models?
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.