Giter Club home page Giter Club logo

deepdft's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

deepdft's Issues

PBCs not accounted for in neighbor lists?

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!

GPU

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?

CPU version not working

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...

About Datasets

This is a very excellent work!

A few questions about the datasets:

  • Are the datasets for training the model available publicly? Where can I download/access the QM9 dataset that is augmented with the electron density information (qm9vasp perhaps)?
  • If the datasets are not publicly available, could you provide some instructions on running Gaussian/VASP on QM9 to obtain the required data?
  • What is the rough compute/time cost for data collection?

Thanks in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.