Molecular modeling often involves intricate workflows that depend on various Python libraries for tasks like data analysis, simulations, and visualization. But keeping these dependencies organized within an integrated environment can sometimes feel like a daunting task. If you’re a molecular modeler or researcher using SAMSON, you might already know that integrating Python packages effectively can supercharge your productivity. Thankfully, SAMSON includes an intuitive Python Package Manager to make this process seamless.
Why Python Package Management Matters
Managing Python packages helps you customize your scripting environment, enabling you to extend SAMSON’s functionality to meet the unique demands of your projects. Whether you’re incorporating new machine learning tools or analytical libraries, the Python Package Manager in SAMSON simplifies handling extensions, updates, or package installations directly within its interface.
How to Manage Python Packages in SAMSON
Here’s how SAMSON streamlines package management:
Accessing the Python Package Manager
You can easily access the Python Package Manager in SAMSON by navigating to Edit > Manage Packages… in the Python Console. This opens the Package Manager window, which provides a user-friendly interface for viewing installed packages, installing new ones, or uninstalling those you no longer need. Here’s what it looks like:

Installing Python Packages
Installing a new Python package is straightforward. Simply type the name of the package you want to install and click Install. SAMSON uses the widely adopted pip tool in the background, ensuring consistency with Python standards. You can even specify the version of the package if required (e.g., numpy==1.21.2 or scipy>=1.8.0) or include additional pip flags (such as --upgrade for updates).

Installing Local Python Packages
If you have a package stored locally on your machine, SAMSON also accommodates its installation. All you need is the path to the package (ensuring it includes necessary files like setup.py). Additionally, you can opt to install the package in editable mode (pip install -e), allowing dynamic reflection of changes in your Python scripts—ideal for developers actively modifying package source code. Here’s what the local installation interface looks like:

Note
For static packages that don’t require modification, it’s recommended to avoid using the editable mode for better stability.
Uninstalling Python Packages
To uninstall a package, you only need to provide its name in the Package Manager and click Uninstall. This works for both PyPI packages and locally installed ones, giving you complete control over your Python environment in SAMSON.
Key Benefits
- Perform all package management tasks directly in SAMSON, without toggling between external tools.
- Enhance reproducibility in your workflows by ensuring package dependencies are well-organized.
- Quickly implement state-of-the-art tools, from deep learning frameworks to specialized visualization libraries, tailored to your molecular modeling project.
- Leverage the editable package mode to co-develop custom Python packages within your active projects.
With SAMSON’s integrated Python environment and robust package management capabilities, installing, updating, or uninstalling libraries becomes efficient and hassle-free.
Conclusion
The Python Package Manager in SAMSON embodies the platform’s commitment to flexibility and customization. By simplifying how you manage Python packages, SAMSON ensures that you can focus on what you do best—developing innovative molecular workflows and simulations. Learn more about these features by visiting the Scripting Documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
