Streamlining Molecular Modeling: Managing Python Packages in SAMSON

For molecular modelers, streamlining workflows is key to devoting more time to science and less to technical overhead. One frequent pain for many researchers is managing Python packages efficiently within their modeling platform. Fortunately, SAMSON, an integrative molecular design platform, includes a powerful Python Package Manager that simplifies the entire process of installing, managing, and uninstalling Python packages.

Why Package Management Matters

Python is a go-to programming language in molecular modeling, thanks to its flexibility and expansive ecosystem of libraries for bioinformatics, deep learning, and visualization. However, manually setting up and managing packages through command-line tools such as pip can disrupt your workflow, especially if you’re juggling multiple projects with diverse dependencies.

SAMSON addresses this frustration by integrating a visual Python Package Manager directly into its interface. Here’s a look at how this feature works and how it can make your life easier.

Using the Python Package Manager

SAMSON’s Python Package Manager can be accessed through the Python Console by navigating to Edit > Manage packages…. This opens the “Python Package Manager” window, where you can manage installed Python packages efficiently. You’ll be greeted with an interface listing all currently installed packages and their respective versions, allowing you to easily view and edit your Python environment.

Manage packages...

Installing New Python Packages

Installing a new Python package is straightforward:

  • Enter the name of the desired package.
  • Optionally specify a version or add pip flags—for instance, numpy==1.21.0 to install a specific version, or numpy --upgrade for the latest version.
  • Click Install.

If needed, you can also install local Python packages directly. Just provide the package path (which should be a valid Python package containing setup.py or equivalent). For developers actively modifying packages, you can also choose to install in editable/develop mode, enabling immediate reflection of source code changes without reinstallation.

Package Manager: install a Python package

Uninstalling Python Packages

If you no longer need a Python package, simply provide its name and click Uninstall. Whether it’s a package from PyPI or a local package, the process is equally seamless.

Advanced Installation Notes

SAMSON’s Package Manager uses pip under the hood, enabling advanced features like:

  • Installing multiple packages in a single step.
  • Specifying version constraints (e.g., scipy>=1.7.0).
  • Adding custom flags for more control.

It’s worth noting that, on some macOS installations, packages installed in editable mode might not load in subsequent sessions. In such cases, reinstalling or switching to non-editable mode might solve the issue.

A Unified Environment for Molecular Research

By integrating such a feature-rich Python Package Manager, SAMSON allows you to maintain a clean and focused Python environment directly within the molecular design platform. Whether you’re running deep learning models, performing statistical analysis, or designing custom visuals, SAMSON’s simplified package management ensures that technical barriers won’t slow you down.

Ready to explore SAMSON’s Python Scripting capabilities? Learn more about managing Python packages and other scripting features by visiting the complete documentation at https://documentation.samson-connect.net/users/latest/scripting/.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON today at https://www.samson-connect.net.

Comments are closed.