Skip to main content

FlexAID in a Python Package

A Python package designed to prepare arguments and run FlexAID.


Example usage:

from flexaidpy import write_config_file, write_ga_file, run_flexaid


config_file_path = write_config_file(
    target_inp_path='/path/to/flexaid_target.inp.pdb',
    ligand_inp_path='/path/to/flexaid_ligand.inp',
    binding_site_path='/path/to/binding_site_sph_.pdb',
    config_file_folder_path='/path/to/folder/where/config/is/written'
    )

# Modifying config parameters for running in high throughput mode: 
# config_file_path = write_config_file(
#     target_inp_path='/path/to/flexaid_target.inp.pdb',
#     ligand_inp_path='/path/to/flexaid_ligand.inp',
#     binding_site_path='/path/to/binding_site_sph_.pdb',
#     config_file_folder_path='/path/to/folder/where/config/is/written',
#     HTPMOD=True, 
#     MAXRES=1
#     )

ga_file_path = write_ga_file(ga_file_folder_path='/path/to/folder/where/ga/is/written')
run_flexaid(config_file_path,
            ga_file_path,
            result_save_path='/path/to/save/results/RESULT_NAME')

The result_save_path must be an absolute path and include the name the result file will be given without the extension. In this case the results will be saved in the folder /path/to/save/results/ and they will be named RESULT_NAME_0.pdb, RESULT_NAME_1.pdb, etc.

If you wish to see the output of FlexAID live to keep track of the progress there the live_output flag that can be set to True

A full list of config and ga parameters is available here:

https://github.com/NRGlab/FlexAID/tree/flexaid-cpp


Args for run_flexaid():

Parameter Description
config_file_path Path to the configuration file that is returned by the write_config_file() function.
ga_file_path Path to the genetic algorithm (GA) file that is returned by the write_ga_file() function.
result_save_path Absolute path including the name for saving result files (without extension). Results will be saved as [result_save_path]_0.pdb, [result_save_path]_1.pdb, etc.
live_output Boolean flag (default: False). When set to True, FlexAID's output will be displayed in real-time to track progress.

Returns

Type Description
FlexAIDResult An object containing returncode, stdout and stderr.

Full run on a target and ligand using GetCleft, ProcessLigand and FlexAiD:

import os
from processligandpy import run_processligand
from flexaidpy import write_config_file, write_ga_file, run_flexaid
from getcleftpy import run_getcleft

file_save_path = '/path/to/folder/with/target_and_ligand'
target_file_path = os.path.join(file_save_path, '2ixd.pdb')
ligand_path = os.path.join(file_save_path, 'ATP_ideal.sdf')
result_save_folder = os.path.join(file_save_path, 'result')
if not os.path.exists(result_save_folder):
    os.makedirs(result_save_folder)
final_result_path = os.path.join(result_save_folder, 'RES')


gc_dictionary = run_getcleft(target_file_path, num_clefts=1)

result_target = run_processligand(file_path=target_file_path, target=True)
result_ligand = run_processligand(file_path=ligand_path, atom_index=90000)

config_file_path = write_config_file(
    target_inp_path=result_target.file_path_dict['INP_PDB'][0],
    ligand_inp_path=result_ligand.file_path_dict['INP'][0],
    binding_site_path=gc_dictionary.file_path_dict['SPH'][0],
    config_file_folder_path=file_save_path,
    MAXRES=1,
    HTPMOD=True
)
ga_file_path = write_ga_file(
    ga_file_folder_path=file_save_path,
    NUMCHROM=500,
    NUMGENER=500,
    PRINTCHR=1,
    PRINTINT=1
)
result = run_flexaid(
    config_file_path,
    ga_file_path,
    result_save_path=final_result_path
)

Metadata

Release files for flexaid-py 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flexaid-py 1.0.5
File Size Uploaded
flexaid_py-1.0.5.tar.gz 41.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for flexaid-py 1.0.5
File Interpreter ABI Platform
flexaid_py-1.0.5-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
flexaid_py-1.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details
flexaid_py-1.0.5-py3-none-macosx_10_9_universal2.whl Python 3 none macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 661.8 kB

Release files / flexaid_py-1.0.5.tar.gz

Download URL flexaid_py-1.0.5.tar.gz
Size 41.3 kB
Tags Source
SHA-256 checksum
How to use checksums
fdfc1fdf04ad755fa5aca096d7eabfe4e39cbad3e5d5e7480b428980683447c7
BLAKE2b-256 checksum
How to use checksums
3a9ff5a879a7ebe7dd5bd3443927217d92a2947b7657816e705abfd4934cb4f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2025.

Transparency log

Release files / flexaid_py-1.0.5-py3-none-win_amd64.whl

Download URL flexaid_py-1.0.5-py3-none-win_amd64.whl
Size 154.1 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
8fc2636a9c7e12ebf5d10e74a890b9ad42ca56566bc9bf1bac62ab2d167c8c9b
BLAKE2b-256 checksum
How to use checksums
b0db8a259f8393d6568b160415f0f1b90ec6186f2597563b7f26853facee778d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2025.

Transparency log

Release files / flexaid_py-1.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL flexaid_py-1.0.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 187.1 kB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6bebd286197042801bb05406d6d86f5b3aa80ebca10a8b4991c66ad7f55ba820
BLAKE2b-256 checksum
How to use checksums
f5def5852aa35e7c257444e389e8b9d6417393b1546ab565d4d6fbe3994d664c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2025.

Transparency log

Release files / flexaid_py-1.0.5-py3-none-macosx_10_9_universal2.whl

Download URL flexaid_py-1.0.5-py3-none-macosx_10_9_universal2.whl
Size 279.3 kB
Tags Python 3 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
647e02be05932569f2ca4e8c26b2f9e059dce0b2b5729c71b3312228c8965f0f
BLAKE2b-256 checksum
How to use checksums
76de2c1b164734239653f5df35ed24d4bb62a8fb2fff0358a1e631d81ab92db2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.5 This release

4 release files

1.0.3

4 release files

1.0.2

4 release files

1.0.1

4 release files

1.0.0

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page