Package: mdlearn
mdlearnmdlearn is a Python library for analyzing molecular dynamics with machine learning. It containsPyTorchimplementations of several deep learning methods such as autoencoders, as well as preprocessing functions which include thekabsch alignmentalgorithm and higher-order statistical methods likequasi-anharmonic analysis.Currently supported models:Quasi-anharmonic analysisConvolutional Variational AutoencoderAutoencoderFor more details and specific examples of how to use mdlearn, please see ourdocumentation.Table of ContentsInstallationUsageContributingAcknowledgmentsLicenseInstallationInstall latest version with PyPIIf you have access to an NVIDIA GPU, we highly recommend installing mdlearn into a Conda environment which containsRAPIDSto accelerate t-SNE computations useful for visualizing the model results during training. For the latestRAPIDSversion, seehere. If you don't have GPU support, mdlearn will still work on CPU by using thescikit-learnimplementation.Run the following commands with updated versions to create a conda environment:conda create -p conda-env -c rapidsai -c nvidia -c conda-forge cuml=0.19 python=3.7 cudatoolkit=11.2
conda activate conda-env
export IBM_POWERAI_LICENSE_ACCEPT=yes
pip install -U scikit-learnThen install mdlearn via:pip install mdlearn.Some systems requirePyTorchto be built from source instead of installed via PyPI or Conda, for this reason we made torch an optional dependency. However, it can be installed with mdlearn by runningpip install 'mdlearn[torch]'for convenience. Installing this way will also install thewandbpackage. Please check thattorch version >= 1.7.UsageTrain an autoencoder model with only a few lines of code!frommdlearn.nn.models.ae.linearimportLinearAETrainer# Initialize autoencoder modeltrainer=LinearAETrainer(input_dim=40,latent_dim=3,hidden_neurons=[32,16,8],epochs=100)# Train autoencoder on (N, 40) dimensional datatrainer.fit(X,output_path="./run")# Generate latent embeddings in inference modez,loss=trainer.predict(X)ContributingPlease reportbugs,enhancement requests, orquestionsthrough theIssue Tracker.If you are looking to contribute, please seeCONTRIBUTING.md.AcknowledgmentsWe thankMatthias FeyfromPyTorch Geometricfor inspiring the design of our neural network base classes and otherPyTorchhelper functions.Licensemdlearn has a MIT license, as seen in theLICENSEfile.MIT LicenseCopyright (c) 2021 Alexander Brace, Heng Ma, Austin Clyde, Debsindhu Bhowmik, Chakra Chennubhotla, Arvind RamanathanPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.