diff --git a/benchmarks/inference.py b/benchmarks/inference.py index f6508bc34..1fd271b3c 100644 --- a/benchmarks/inference.py +++ b/benchmarks/inference.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + """ Benchmark script for inference. This script compiles a model using torch.compile and measures the time it takes to run a forward and backward pass for a certain molecule. diff --git a/benchmarks/neighbors.py b/benchmarks/neighbors.py index d9ffc2298..d4e6d3ad0 100644 --- a/benchmarks/neighbors.py +++ b/benchmarks/neighbors.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import os import torch import numpy as np diff --git a/docs/source/conf.py b/docs/source/conf.py index a95087e39..8c701a687 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + # Configuration file for the Sphinx documentation builder. # -- Project information diff --git a/setup.py b/setup.py index 2f7e26303..81faa3d8d 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import subprocess from setuptools import setup, find_packages import torch diff --git a/tests/test_calculator.py b/tests/test_calculator.py index 4b98cea55..1c8e94371 100644 --- a/tests/test_calculator.py +++ b/tests/test_calculator.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from torch.testing import assert_allclose import pytest diff --git a/tests/test_cfconv.py b/tests/test_cfconv.py index 0081afa3e..20b3576a9 100644 --- a/tests/test_cfconv.py +++ b/tests/test_cfconv.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import pytest from pytest import mark import torch as pt diff --git a/tests/test_datamodule.py b/tests/test_datamodule.py index 502f47340..4ea9ea509 100644 --- a/tests/test_datamodule.py +++ b/tests/test_datamodule.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from pytest import mark import torch from torchmdnet.data import DataModule diff --git a/tests/test_dataset_comp6.py b/tests/test_dataset_comp6.py index bf6906402..85abaaf07 100644 --- a/tests/test_dataset_comp6.py +++ b/tests/test_dataset_comp6.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch as pt from tempfile import TemporaryDirectory from torch_geometric.loader import DataLoader diff --git a/tests/test_datasets.py b/tests/test_datasets.py index b8c7ce960..e7e330c8b 100644 --- a/tests/test_datasets.py +++ b/tests/test_datasets.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import pytest from pytest import mark, raises from os.path import join diff --git a/tests/test_equivariance.py b/tests/test_equivariance.py index 9381a62d7..1492a9f07 100644 --- a/tests/test_equivariance.py +++ b/tests/test_equivariance.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from torchmdnet.models.model import create_model from utils import load_example_args diff --git a/tests/test_examples.py b/tests/test_examples.py index 8f406566f..8cd5155e6 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from pytest import mark import yaml import glob diff --git a/tests/test_model.py b/tests/test_model.py index 1e6241b66..9dd68868c 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import pytest from pytest import mark import pickle diff --git a/tests/test_model_utils.py b/tests/test_model_utils.py index 2c36db0a9..43c46e648 100644 --- a/tests/test_model_utils.py +++ b/tests/test_model_utils.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from pytest import mark, raises import torch from torch.autograd import grad diff --git a/tests/test_module.py b/tests/test_module.py index 4e2f4c762..1f5532902 100644 --- a/tests/test_module.py +++ b/tests/test_module.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from pytest import mark from glob import glob from os.path import dirname, join diff --git a/tests/test_neighbors.py b/tests/test_neighbors.py index 8bff3e2b2..8bde86bbd 100644 --- a/tests/test_neighbors.py +++ b/tests/test_neighbors.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import os import pytest import torch diff --git a/tests/test_optimize.py b/tests/test_optimize.py index 2826dd98f..3645bfa56 100644 --- a/tests/test_optimize.py +++ b/tests/test_optimize.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import pytest from pytest import mark import torch as pt diff --git a/tests/test_prior_d2.py b/tests/test_prior_d2.py index 1549f2e9c..da76bd86a 100644 --- a/tests/test_prior_d2.py +++ b/tests/test_prior_d2.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from torchmdnet.priors import D2 import torch as pt from pytest import mark diff --git a/tests/test_priors.py b/tests/test_priors.py index beb52558b..8192fb722 100644 --- a/tests/test_priors.py +++ b/tests/test_priors.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import pytest from pytest import mark import torch diff --git a/tests/test_rbfs.py b/tests/test_rbfs.py index 2b9d8af1d..2e21b0c16 100644 --- a/tests/test_rbfs.py +++ b/tests/test_rbfs.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from pytest import mark import torch from torchmdnet.models.utils import rbf_class_mapping diff --git a/tests/test_utils.py b/tests/test_utils.py index a04a72142..5ad135cb6 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from os.path import join, exists from pytest import mark, raises import torch diff --git a/tests/test_wrappers.py b/tests/test_wrappers.py index e14a215c1..8f8aff2aa 100644 --- a/tests/test_wrappers.py +++ b/tests/test_wrappers.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import pytest from pytest import mark from torchmdnet import models diff --git a/tests/utils.py b/tests/utils.py index aa7588d6a..b96f0d7b1 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import yaml from os.path import dirname, join import torch diff --git a/torchmdnet/calculators.py b/torchmdnet/calculators.py index 735eefa4f..f17581eb0 100644 --- a/torchmdnet/calculators.py +++ b/torchmdnet/calculators.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from torchmdnet.models.model import load_model diff --git a/torchmdnet/data.py b/torchmdnet/data.py index 8a47962f3..20f393fcd 100644 --- a/torchmdnet/data.py +++ b/torchmdnet/data.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from os.path import join from tqdm import tqdm import torch diff --git a/torchmdnet/datasets/__init__.py b/torchmdnet/datasets/__init__.py index 253c7517f..9fbde213e 100644 --- a/torchmdnet/datasets/__init__.py +++ b/torchmdnet/datasets/__init__.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from .ace import Ace from .ani import ANI1, ANI1CCX, ANI1X from .comp6 import ANIMD, DrugBank, GDB07to09, GDB10to13, Tripeptides, S66X8, COMP6v1 diff --git a/torchmdnet/datasets/ace.py b/torchmdnet/datasets/ace.py index c2a2d1e84..700a16c94 100644 --- a/torchmdnet/datasets/ace.py +++ b/torchmdnet/datasets/ace.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import hashlib import h5py import numpy as np diff --git a/torchmdnet/datasets/ani.py b/torchmdnet/datasets/ani.py index ed62dd327..25e3df7bf 100644 --- a/torchmdnet/datasets/ani.py +++ b/torchmdnet/datasets/ani.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import h5py import numpy as np import os diff --git a/torchmdnet/datasets/comp6.py b/torchmdnet/datasets/comp6.py index 3d29665fa..e0aa1a109 100644 --- a/torchmdnet/datasets/comp6.py +++ b/torchmdnet/datasets/comp6.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import h5py import numpy as np import os diff --git a/torchmdnet/datasets/custom.py b/torchmdnet/datasets/custom.py index a039f6afa..9fb2eebe0 100644 --- a/torchmdnet/datasets/custom.py +++ b/torchmdnet/datasets/custom.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import glob import numpy as np import torch diff --git a/torchmdnet/datasets/hdf.py b/torchmdnet/datasets/hdf.py index 550c4410b..2bd1086a7 100644 --- a/torchmdnet/datasets/hdf.py +++ b/torchmdnet/datasets/hdf.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from torch_geometric.data import Dataset, Data import h5py diff --git a/torchmdnet/datasets/md17.py b/torchmdnet/datasets/md17.py index cb3200223..ecee51a0e 100644 --- a/torchmdnet/datasets/md17.py +++ b/torchmdnet/datasets/md17.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import os import os.path as osp from typing import Callable, List, Optional diff --git a/torchmdnet/datasets/md22.py b/torchmdnet/datasets/md22.py index aedd903ca..ce8adfb96 100644 --- a/torchmdnet/datasets/md22.py +++ b/torchmdnet/datasets/md22.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import os import os.path as osp from typing import Callable, List, Optional diff --git a/torchmdnet/datasets/qm9.py b/torchmdnet/datasets/qm9.py index 18bc5cd2a..79b78109f 100644 --- a/torchmdnet/datasets/qm9.py +++ b/torchmdnet/datasets/qm9.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from torch_geometric.transforms import Compose from torch_geometric.datasets import QM9 as QM9_geometric diff --git a/torchmdnet/datasets/qm9q.py b/torchmdnet/datasets/qm9q.py index b4d67c20b..6012d31af 100644 --- a/torchmdnet/datasets/qm9q.py +++ b/torchmdnet/datasets/qm9q.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import h5py import numpy as np import os diff --git a/torchmdnet/datasets/spice.py b/torchmdnet/datasets/spice.py index 02d214d55..9841b2709 100644 --- a/torchmdnet/datasets/spice.py +++ b/torchmdnet/datasets/spice.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import hashlib import h5py import numpy as np diff --git a/torchmdnet/extensions/__init__.py b/torchmdnet/extensions/__init__.py index 2ba936c1b..cf2b96161 100644 --- a/torchmdnet/extensions/__init__.py +++ b/torchmdnet/extensions/__init__.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + # Place here any short extensions to torch that you want to use in your code. # The extensions present in extensions.cpp will be automatically compiled in setup.py and loaded here. # The extensions will be available under torch.ops.torchmdnet_extensions, but you can add wrappers here to make them more convenient to use. diff --git a/torchmdnet/extensions/extensions.cpp b/torchmdnet/extensions/extensions.cpp index 4752cd1a4..1665010fe 100644 --- a/torchmdnet/extensions/extensions.cpp +++ b/torchmdnet/extensions/extensions.cpp @@ -1,4 +1,8 @@ -/* Raul P. Pelaez 2023. Torch extensions to the torchmdnet library. +/* + * Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org + * Distributed under the MIT License. + *(See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + * Raul P. Pelaez 2023. Torch extensions to the torchmdnet library. * You can expose functions to python here which will be compatible with TorchScript. * Add your exports to the TORCH_LIBRARY macro below, see __init__.py to see how to access them from python. * The WITH_CUDA macro will be defined when compiling with CUDA support. diff --git a/torchmdnet/extensions/neighbors/common.cuh b/torchmdnet/extensions/neighbors/common.cuh index db83b95d8..d1ec8049c 100644 --- a/torchmdnet/extensions/neighbors/common.cuh +++ b/torchmdnet/extensions/neighbors/common.cuh @@ -1,4 +1,7 @@ -/* Raul P. Pelaez 2023. Common utilities for the CUDA neighbor operation. +/* Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org + * Distributed under the MIT License. + *(See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + * Raul P. Pelaez 2023. Common utilities for the CUDA neighbor operation. */ #ifndef NEIGHBORS_COMMON_CUH #define NEIGHBORS_COMMON_CUH diff --git a/torchmdnet/extensions/neighbors/neighbors_cpu.cpp b/torchmdnet/extensions/neighbors/neighbors_cpu.cpp index 3665d00fd..ff467b183 100644 --- a/torchmdnet/extensions/neighbors/neighbors_cpu.cpp +++ b/torchmdnet/extensions/neighbors/neighbors_cpu.cpp @@ -1,3 +1,7 @@ +/* Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org + * Distributed under the MIT License. + *(See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) +*/ #include #include diff --git a/torchmdnet/extensions/neighbors/neighbors_cuda.cu b/torchmdnet/extensions/neighbors/neighbors_cuda.cu index 3391ade72..9dda1877d 100644 --- a/torchmdnet/extensions/neighbors/neighbors_cuda.cu +++ b/torchmdnet/extensions/neighbors/neighbors_cuda.cu @@ -1,5 +1,8 @@ -/* Raul P. Pelaez 2023 - Connection between the neighbor CUDA implementations and the torch extension. +/* + * Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org + * Distributed under the MIT License. + * (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + * Raul P. Pelaez 2023 */ #include "neighbors_cuda_brute.cuh" #include "neighbors_cuda_cell.cuh" diff --git a/torchmdnet/extensions/neighbors/neighbors_cuda_brute.cuh b/torchmdnet/extensions/neighbors/neighbors_cuda_brute.cuh index f123b490f..cdb571327 100644 --- a/torchmdnet/extensions/neighbors/neighbors_cuda_brute.cuh +++ b/torchmdnet/extensions/neighbors/neighbors_cuda_brute.cuh @@ -1,9 +1,13 @@ -/* Raul P. Pelaez 2023. Brute force neighbor list construction in CUDA. - - A brute force approach that assigns a thread per each possible pair of particles in the system. - Based on an implementation by Raimondas Galvelis. - Works fantastically for small (less than 10K atoms) systems, but cannot handle more than 32K - atoms. +/* Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org + * Distributed under the MIT License. + *(See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + * + * Raul P. Pelaez 2023. Brute force neighbor list construction in CUDA. + * + * A brute force approach that assigns a thread per each possible pair of particles in the system. + * Based on an implementation by Raimondas Galvelis. + * Works fantastically for small (less than 10K atoms) systems, but cannot handle more than 32K + * atoms. */ #ifndef NEIGHBORS_BRUTE_CUH #define NEIGHBORS_BRUTE_CUH diff --git a/torchmdnet/extensions/neighbors/neighbors_cuda_cell.cuh b/torchmdnet/extensions/neighbors/neighbors_cuda_cell.cuh index c2921ee7f..4534451b9 100644 --- a/torchmdnet/extensions/neighbors/neighbors_cuda_cell.cuh +++ b/torchmdnet/extensions/neighbors/neighbors_cuda_cell.cuh @@ -1,5 +1,7 @@ -/* Raul P. Pelaez 2023. Batched cell list neighbor list implementation for CUDA. - +/* Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org + * Distributed under the MIT License. + *(See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + * Raul P. Pelaez 2023. Batched cell list neighbor list implementation for CUDA. */ #ifndef NEIGHBOR_CUDA_CELL_H #define NEIGHBOR_CUDA_CELL_H diff --git a/torchmdnet/extensions/neighbors/neighbors_cuda_shared.cuh b/torchmdnet/extensions/neighbors/neighbors_cuda_shared.cuh index 58d13c558..85250583f 100644 --- a/torchmdnet/extensions/neighbors/neighbors_cuda_shared.cuh +++ b/torchmdnet/extensions/neighbors/neighbors_cuda_shared.cuh @@ -1,8 +1,11 @@ -/* Raul P. Pelaez 2023. Shared memory neighbor list construction for CUDA. - This brute force approach checks all pairs of atoms by collaborativelly loading and processing - tiles of atoms into shared memory. - This approach is tipically slower than the brute force approach, but can handle an arbitrarily - large number of atoms. +/* Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org + * Distributed under the MIT License. + *(See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + * Raul P. Pelaez 2023. Shared memory neighbor list construction for CUDA. + * This brute force approach checks all pairs of atoms by collaborativelly loading and processing + * tiles of atoms into shared memory. + * This approach is tipically slower than the brute force approach, but can handle an arbitrarily + * large number of atoms. */ #ifndef NEIGHBORS_SHARED_CUH #define NEIGHBORS_SHARED_CUH diff --git a/torchmdnet/models/__init__.py b/torchmdnet/models/__init__.py index 5f3e44053..41e00338b 100644 --- a/torchmdnet/models/__init__.py +++ b/torchmdnet/models/__init__.py @@ -1 +1,5 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + __all_models__ = ["graph-network", "transformer", "equivariant-transformer", "tensornet"] diff --git a/torchmdnet/models/model.py b/torchmdnet/models/model.py index f0d127b18..14679de55 100644 --- a/torchmdnet/models/model.py +++ b/torchmdnet/models/model.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import re from typing import Optional, List, Tuple, Dict import torch diff --git a/torchmdnet/models/output_modules.py b/torchmdnet/models/output_modules.py index b906fca1b..07271d132 100644 --- a/torchmdnet/models/output_modules.py +++ b/torchmdnet/models/output_modules.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from abc import abstractmethod, ABCMeta from typing import Optional import torch diff --git a/torchmdnet/models/tensornet.py b/torchmdnet/models/tensornet.py index 2e98bcc56..77364a4e9 100644 --- a/torchmdnet/models/tensornet.py +++ b/torchmdnet/models/tensornet.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from typing import Optional, Tuple from torch import Tensor, nn diff --git a/torchmdnet/models/torchmd_et.py b/torchmdnet/models/torchmd_et.py index 7dc2a5b7c..e381761b5 100644 --- a/torchmdnet/models/torchmd_et.py +++ b/torchmdnet/models/torchmd_et.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from typing import Optional, Tuple import torch from torch import Tensor, nn diff --git a/torchmdnet/models/torchmd_gn.py b/torchmdnet/models/torchmd_gn.py index 216ff563b..413c90cff 100644 --- a/torchmdnet/models/torchmd_gn.py +++ b/torchmdnet/models/torchmd_gn.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from typing import Optional, Tuple import torch from torch import Tensor, nn diff --git a/torchmdnet/models/torchmd_t.py b/torchmdnet/models/torchmd_t.py index 44993e817..893941864 100644 --- a/torchmdnet/models/torchmd_t.py +++ b/torchmdnet/models/torchmd_t.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from typing import Optional, Tuple import torch from torch import Tensor, nn diff --git a/torchmdnet/models/utils.py b/torchmdnet/models/utils.py index 35700467a..73bcc8f7e 100644 --- a/torchmdnet/models/utils.py +++ b/torchmdnet/models/utils.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import math from typing import Optional, Tuple import torch diff --git a/torchmdnet/models/wrappers.py b/torchmdnet/models/wrappers.py index 565e94556..444805e06 100644 --- a/torchmdnet/models/wrappers.py +++ b/torchmdnet/models/wrappers.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from abc import abstractmethod, ABCMeta from typing import Optional, Tuple from torch import nn, Tensor diff --git a/torchmdnet/module.py b/torchmdnet/module.py index e30a1e0ab..aa571820d 100644 --- a/torchmdnet/module.py +++ b/torchmdnet/module.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from collections import defaultdict import torch from torch.optim import AdamW diff --git a/torchmdnet/optimize.py b/torchmdnet/optimize.py index 568546265..3851f91c1 100644 --- a/torchmdnet/optimize.py +++ b/torchmdnet/optimize.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from typing import Optional, Tuple import torch as pt from NNPOps.CFConv import CFConv diff --git a/torchmdnet/priors/__init__.py b/torchmdnet/priors/__init__.py index e985fde5d..399588524 100644 --- a/torchmdnet/priors/__init__.py +++ b/torchmdnet/priors/__init__.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from torchmdnet.priors.atomref import Atomref from torchmdnet.priors.d2 import D2 from torchmdnet.priors.zbl import ZBL diff --git a/torchmdnet/priors/atomref.py b/torchmdnet/priors/atomref.py index c714d102f..d57cbb916 100644 --- a/torchmdnet/priors/atomref.py +++ b/torchmdnet/priors/atomref.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from torchmdnet.priors.base import BasePrior from typing import Optional, Dict import torch diff --git a/torchmdnet/priors/base.py b/torchmdnet/priors/base.py index e020dfd85..d355e7feb 100644 --- a/torchmdnet/priors/base.py +++ b/torchmdnet/priors/base.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from torch import nn, Tensor from typing import Optional, Dict diff --git a/torchmdnet/priors/coulomb.py b/torchmdnet/priors/coulomb.py index ab2f618ad..f90df5cde 100644 --- a/torchmdnet/priors/coulomb.py +++ b/torchmdnet/priors/coulomb.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from torchmdnet.priors.base import BasePrior from torchmdnet.models.utils import OptimizedDistance, scatter diff --git a/torchmdnet/priors/d2.py b/torchmdnet/priors/d2.py index 7585e7523..195cc62f9 100644 --- a/torchmdnet/priors/d2.py +++ b/torchmdnet/priors/d2.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + from torchmdnet.priors.base import BasePrior from torchmdnet.models.utils import OptimizedDistance, scatter import torch as pt diff --git a/torchmdnet/priors/zbl.py b/torchmdnet/priors/zbl.py index 038379887..a77675b87 100644 --- a/torchmdnet/priors/zbl.py +++ b/torchmdnet/priors/zbl.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import torch from torchmdnet.priors.base import BasePrior from torchmdnet.models.utils import OptimizedDistance, CosineCutoff, scatter diff --git a/torchmdnet/scripts/train.py b/torchmdnet/scripts/train.py index ca958fd73..38203e088 100644 --- a/torchmdnet/scripts/train.py +++ b/torchmdnet/scripts/train.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import sys import os import argparse diff --git a/torchmdnet/utils.py b/torchmdnet/utils.py index eacdb57f0..bda40a962 100644 --- a/torchmdnet/utils.py +++ b/torchmdnet/utils.py @@ -1,3 +1,7 @@ +# Copyright Universitat Pompeu Fabra 2020-2023 https://www.compscience.org +# Distributed under the MIT License. +# (See accompanying file README.md file or copy at http://opensource.org/licenses/MIT) + import yaml import argparse import numpy as np