This project is focused on the development and implementation of chemical molecular models following MolSSI's best practices for version control and Python package management. The project is intended for beginners who are interested in working with chemical molecular simulations and applying machine learning to molecular modeling.
We follow the MolSSI (Molecular Sciences Software Institute) guidelines to ensure efficient and reproducible modeling workflows, code quality, and the best practices in computational chemistry. This project integrates tools such as Condas, Python, Prettier, Black, and Flake8 for code formatting, linting, and style enforcement.
- Project Overview
- Installation Instructions
- Conda and Python Environment Setup
- Usage
- Repository Structure
- Documentation Files
- Contributing
- License
- Acknowledgements
This repository contains code and tools for chemical molecular model development. By following MolSSI’s best practices, we aim to ensure that the project is structured, reproducible, and easy to collaborate on. The focus is on using Python for modeling, managing dependencies with Conda, and writing clean and efficient code.
To get started, clone the repository to your local machine:
git clone https://github.com/kbhalajiyadav/molssi.git
cd molssiWe recommend using Conda to manage project dependencies. To create and activate a Conda environment, follow these steps:
-
Create the Conda Environment:
conda create -n molssi python=3.8
-
Activate the Environment:
conda activate molssi
After activating the environment, you can install the required dependencies using the provided environment.yml file.
conda env create -f environment.yml-
List Conda Environments: To view all Conda environments:
conda list
-
Remove a Conda Environment: If you need to remove an environment, use:
conda env remove -n molssi
-
Verifying Installed Packages: To list installed packages in the Conda environment:
conda list
-
Create a Python Virtual Environment:
python -m venv myenv
-
Activate the Environment:
source myenv/bin/activate -
Install Dependencies using pip:
pip install -r requirements.txt
After setting up the environment and installing the dependencies, you can start working on the project:
-
Running Python Code: To run the main script, use:
python script_name.py
-
Code Formatting: To format Python files, use Black:
black script_name.py
For Markdown files, use Prettier:
npx prettier --write "*.md" -
Linting Code: Lint Python code with Flake8:
flake8 script_name.py
Lint Markdown files with Markdownlint:
npx markdownlint "**/*.md"
The project structure follows MolSSI’s best practices for Python package development, ensuring that the repository is well-organized and easy to navigate. Here’s a breakdown of the repository structure:
molssi/
├── environment.yml # Conda environment file for setting up dependencies
├── requirements.txt # Python packages for virtual environments
├── src/ # Source code for the project
│ └── main.py # Main Python script
├── tests/ # Directory for unit tests
│ └── test_model.py # Example unit test
├── docs/ # Documentation files
│ └── GuideForManagingCondaAndPython.md # Guide for managing Conda environments and Python dependencies
│ └── GuideForCleanCode.md # Guide for writing clean, efficient code
| └── GuideForMolssiCondaEnvironmentSetup.md # Guide for the conda setup
├── README.md # Project README
└── .gitignore # Gitignore to exclude unnecessary files
└── License # License file
This repository includes the following documentation files to help you manage your project, write clean code, and handle Conda and Python environments:
-
GuideForManagingCondaAndPython.md A detailed guide for managing Conda environments and Python dependencies. It covers how to create, remove, and update environments, as well as how to install and remove packages.
-
GuideForCleanCode.md A guide on writing clean, efficient code using best practices such as PEP 8 and MolSSI guidelines for Python. It provides tips on code readability, modularity, and organization.
-
GuideForMolssiCondaEnvironmentSetup.md A detailed guide for creating the current Conda environments. It covers how to create the environment file setup from scratch.
We welcome contributions to this project! To contribute, follow these steps:
-
Fork the repository to your own GitHub account.
-
Clone your forked repository to your local machine.
-
Create a new branch for your feature or fix:
git checkout -b feature/your-feature
-
Make your changes, test, and commit them:
git commit -m "Implement feature XYZ" -
Push your changes to GitHub:
git push origin feature/your-feature
-
Open a Pull Request to the original repository.
This project is licensed under the MIT License - see the LICENSE file for details.
- MolSSI Best Practices for providing guidelines on package development, version control, and best practices for software in computational science.
- Chemprop GitHub for serving as an example of good practices for managing Python packages and environments.
This README file covers the basic setup, usage, repository structure, and contributing guidelines for your MolSSI-based project. It provides an easy way for beginners to replicate the project environment, contribute to the repository, and maintain clean, efficient code.