PyMOL Open-Source Documentation

repository·master·Indexed 23 days ago

https://github.com/schrodinger/pymol-open-source

The open-source foundation of PyMOL, a molecular visualization system. This repository provides the core codebase, including the CHAMP module for chemical atom manipulation with patterns, lighting settings GUI tools, and support for OpenVR visualization with HTC Vive hardware.

Tokens
1.2K
Snippets
3
Records
8
Agent score
83%

What's inside PyMOL Open-Source

  1. Overview of Open-Source PyMOL

    master
    Open-Source PyMOL is the open-source foundation of the user-sponsored PyMOL molecular visualization system. While this repository provides the open-source version, the commercial version, known as "Incentive PyMOL," which includes maintenance and support, is available through the official PyMOL website.
  2. Requirements for using the OpenVR extension in PyMOL

    master

    To use the OpenVR extension for VR visualization in PyMOL, you must meet the following hardware and software requirements:

    Hardware Requirements

    • VR System: Currently supports HTC Vive only. Ensure your VR system is installed and configured via the VIVE Setup site.
    • Recommended PC Specs:
      • Processor: Intel™ Core™ i5-4590 or AMD FX™ 8350 (or better).
      • Graphics: NVIDIA GeForce™ GTX 1060 or AMD Radeon™ RX 480 (or better).
      • Memory: 4 GB RAM or more.
      • Video Output: 1x HDMI 1.4 port, or DisplayPort 1.2 or newer.
      • USB: 1x USB 2.0 port or newer.
      • Operating System: Windows™ 7 SP1, Windows™ 8.1, or Windows™ 10.
    • Performance Check: It is recommended to run the ViveCheck.exe tool to ensure your PC meets performance standards.

    Software Requirements

    • SteamVR: At least version 1533664367 (from August 7, 2018) is required, though the most recent Steam version is recommended to ensure API compatibility.

    Note: You can still run PyMOL on systems without VR hardware. While the OpenVR stereo mode will be unavailable, all other PyMOL features will function normally.

  3. Overview of CHAMP (CHemical Atom Manipulation with Patterns)

    master
    CHAMP is a module designed for chemical atom manipulation using patterns. While it is a component of the PyMOL molecular graphics system, the CHAMP code is built as a separate entity. This separation allows developers to use the CHAMP module in environments outside of the standard PyMOL interpreter.
  4. Launch PyMOL from within Python

    master

    If PyMOL has been built as a module, you can launch it from within a Python script. To do this, ensure the following module directories are in your Python search path (sys.path or PYTHONPATH):

    • pymol
    • chempy
    • pmg_tk
    • Pmw

    You must also set the PYMOL_PATH environment variable to the root directory of your PyMOL installation.

    Note: If you have built external dependencies separately, you may also need to set the LD_LIBRARY_PATH environment variable to include the paths to those dependencies.

    # Example using csh on unix
    setenv PYMOL_PATH $HOME/pymol
    setenv PYTHONPATH $PYMOL_PATH/modules
    python launch.py
  5. Use Lighting Presets

    master

    The Lighting Settings plugin provides several built-in presets to quickly adjust the visual appearance of molecular models. These can be triggered via the GUI buttons or by calling the following functions directly in the PyMOL command line:

    • preset_default(): Resets lighting to standard default values.
    • preset_metal(): Configures settings for a metallic appearance.
    • preset_plastic(): Configures settings for a plastic appearance.
    • preset_rubber(): Configures settings for a rubber appearance.
    • preset_xray(): Configures settings for an X-ray visual style.
    preset_metal()
    preset_plastic()
    preset_rubber()
    preset_xray()
  6. Reference: Lighting Setting Keys

    master

    The plugin manipulates PyMOL settings using cmd.set(). The following keys are managed by the Lighting Settings GUI and its presets:

    # Diffuse Reflection
    'ambient'
    'reflect'
    'direct (+reflect)' # maps to 'direct'
    'spec_direct'
    'spec_direct_power'
    
    # Free placeable directed Lights
    'light_count'
    'edit_light'
    
    # Specular Reflection
    'spec_count'
    'shininess' # same as spec_power
    'spec_reflect'
    'specular'
    'specular_intensity' # same as specular
    
    # Ambient Occlusion (Surface only)
    'ambient_occlusion_mode'
    'ambient_occlusion_scale'
    'ambient_occlusion_smooth'
    
    # Ray trace only
    'power'
    'reflect_power'