Skip to main content

Python wheels and a wrapper for FlexAID, a tool for docking

Project description

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
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flexaid_py-1.0.1.tar.gz (41.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

flexaid_py-1.0.1-py3-none-win_amd64.whl (154.4 kB view details)

Uploaded Python 3Windows x86-64

flexaid_py-1.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (187.3 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

flexaid_py-1.0.1-py3-none-macosx_10_9_universal2.whl (279.5 kB view details)

Uploaded Python 3macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file flexaid_py-1.0.1.tar.gz.

File metadata

  • Download URL: flexaid_py-1.0.1.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for flexaid_py-1.0.1.tar.gz
Algorithm Hash digest
SHA256 16ef094c683cad8887f2f75d2a3b24424aee3fcb6ad6850c5d2172efb36d2450
MD5 70e4b3a0ed04fddf2ec017d4bd5a0d8a
BLAKE2b-256 b0fe60aa01b8bff7cb8d474f88c9c8306a553e87ad71ab7e05e773745e60a097

See more details on using hashes here.

Provenance

The following attestation bundles were made for flexaid_py-1.0.1.tar.gz:

Publisher: build.yaml on NRGlab/flexaid-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flexaid_py-1.0.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: flexaid_py-1.0.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 154.4 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for flexaid_py-1.0.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 86b220d19392b1326016419197fac659863f54cea5ac794a68d021229e2fca53
MD5 c54e583c0a13ce32bb5d6613e1386654
BLAKE2b-256 e023dac9495399f64b5238eaa748a81780ca87697376bae90d751a1a866535c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for flexaid_py-1.0.1-py3-none-win_amd64.whl:

Publisher: build.yaml on NRGlab/flexaid-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flexaid_py-1.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flexaid_py-1.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61118286b777ca987d8c0474d7a817eae94225616f909b1340a9c80f1fc5ba4e
MD5 255f25a89089283ce7cdab4b0e752a0e
BLAKE2b-256 c54449f576716847c34fb9dba1c1d4419028e21dd53e04a03a71d2b3b50d7ab0

See more details on using hashes here.

Provenance

The following attestation bundles were made for flexaid_py-1.0.1-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build.yaml on NRGlab/flexaid-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flexaid_py-1.0.1-py3-none-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flexaid_py-1.0.1-py3-none-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 36673522a7f7025a1a826a158ec23afa22ec3c09f133d0a364d2a607a21ce202
MD5 85cf34b01d9fcdcb7c46abdfe7b148a9
BLAKE2b-256 fa19b3ac6f2c2baa9d045f233fe40258238154d79b360113d2b169e3eb27bb04

See more details on using hashes here.

Provenance

The following attestation bundles were made for flexaid_py-1.0.1-py3-none-macosx_10_9_universal2.whl:

Publisher: build.yaml on NRGlab/flexaid-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page