Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CaviTracer tool for detecting channels, tunnels, pores #2018

Open
wants to merge 43 commits into
base: main
Choose a base branch
from

Conversation

karolamik13
Copy link
Contributor

@karolamik13 karolamik13 commented Dec 18, 2024

CaviTracer, created by Eryk Trzcinski, as his MSc work under my supervision.
Additional installation of open3D package is required:
pip install open3d

Test functions:
from prody import *

  1. Single PDB:
    p = parsePDB('1tqn.pdb')
    atoms = p.select("protein")
    channels, surface = calcChannels(atoms, output_path='channels_output.pdb')
    showCavities(surface)

To create 3D model to display it in ProDy
vmd_path = '/usr/local/bin/vmd'
model = getVmdModel(vmd_path, atoms)

To display channels (all or one by one):
showChannels(channels, surface=surface, model=model)
showChannels(channels, model=model)
getChannelParameters(channels)
showCavities(surface, show_surface=True)

Save all channels independently as PDB:
output = 'chanels_test'
channels, surface = calcChannels(atoms, output, separate=True)

Display channel 1:

showChannels(channels[1], model)

selected_channels = [channels[1], channels[8]]
showChannels(selected_channels, model)

selected_channels = channels[1:4]
lengths, bottlenecks, volumes = getChannelParameters(selected_channels)
selected_channels_atoms = getChannelAtoms(selected_channels)

atoms_protein = getChannelAtoms(channels, atoms)

Extracting residues that are forming channel[1]:
atoms_protein = getChannelAtoms(channels[1], atoms)
len(atoms_protein.getResnames())

distance = 4
residues = atoms_protein.select('same residue as exwithin '+str(distance)+' of resname FIL')
residues.select('name CA').getResnames(), residues.select('name CA').getResnums()
list(zip(residues.select('name CA').getResnames(), residues.select('name CA').getResnums()))

  1. Multiple frames:
    p2 = parsePDB('LXmulti.pdb')
    channels2, surfaces2 = calcChannelsMultipleFrames(p2)

To display particular channel:
channels2[4][1]

model2 = getVmdModel(vmd_path, p2)
showChannels(channels2[4][1], model2)
showChannels(channels2[4][2], model2)

  1. Trajectories:
    PDBfile = 'L_traj.pdb'
    DCDfile = 'L_traj.dcd'
    atoms = parsePDB(PDBfile)
    dcd = Trajectory(DCDfile)
    dcd.link(atoms)
    dcd.setCoords(atoms)

channels3, surfaces3 = calcChannelsMultipleFrames(atoms, dcd)
all_channels, all_surfaces=calcChannelsMultipleFrames(atoms, dcd, output_path = 'channels_dcd', separate=True)

karolamik13 and others added 30 commits August 16, 2024 16:43
recent changes in WatFinder from main ProDy
The first version of a tool for the detection of channels developed by Erykiusz Trzcinski
@karolamik13 karolamik13 changed the title CaviFinder tool for detecting channels, tunnels, pores CaviTracker tool for detecting channels, tunnels, pores Jan 20, 2025
@karolamik13
Copy link
Contributor Author

New features are added:
Python 3.9.21 | packaged by conda-forge | (main, Dec 5 2024, 13:51:40)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: from prody import *
In [2]: atoms = parsePDB('align__addH_7lafA.pdb')
In [3]: selectChannelBySelection(atoms, residue_sele='resid 373', residues_file=True, param_file=True)

selectChannelBySelection() selects channels based on the selection.

I still need to add a function that will return residues per channel into a file (the file is used here) and an additional option to return parameters into a file (also used here).
Those will be available in the next commits.

@karolamik13
Copy link
Contributor Author

getChannelParameters(channels, param_file_name='1tqnA') -> will save the parameters to file called
1tqnA_Parameters_All_channels.txt:
1tqnA_channel0: 56.945124331611794 1.1529255252365347 871.3272015249249
1tqnA_channel1: 48.534803029525044 1.1529255252365347 1113.9480417205011
1tqnA_channel2: 52.793238139469054 1.1529255252365347 1049.5320771190782
1tqnA_channel3: 69.76196724198059 1.1529255252365347 1342.2090130173915
1tqnA_channel4: 36.49901131352283 1.1529255252365347 626.6339281791867
1tqnA_channel5: 33.764800308315536 1.1529255252365347 417.4940800159774
1tqnA_channel6: 11.699064048139602 1.161672543421736 104.08765471789833
1tqnA_channel7: 16.154296930458283 1.3122081535867374 187.24450715204378
1tqnA_channel8: 22.42697614131529 1.2063476851586834 219.87584623622723

getChannelResidueNames(atoms, channels) -> Provide info about residues that are forming channels
['channel0: LYS173, SER180, VAL183, ILE184, ARG212, PHE302, ALA305, GLY306, THR309, THR310, SER312, SER315, PHE316, TYR319, GLU320, PHE367, ILE369, ALA370, CYS442, GLY444, PHE447, ASN451, LEU475, LEU482, LEU483, GLN484, PRO485, VAL489',
'channel1: ARG106, SER180, VAL183, ILE184, PHE215, THR224, PHE302, ALA305, GLY306, THR310, CYS442, GLY444, PHE447, ASN451',
'channel2: ILE50, LEU51, TYR53, HIS54, PHE57, SER180, VAL183, ILE184, PHE215, LEU216, LEU221, THR224, PHE302, ALA305, GLY306, THR310, CYS442, GLY444, PHE447, ASN451',
'channel3: PHE46, ASP76, GLY77, GLN78, GLN79, ARG106, SER180, VAL183, ILE184, PHE215, THR224, VAL225, PHE226, PRO227, PHE228, PHE302, ALA305, GLY306, THR310, CYS442, GLY444, PHE447, ASN451',
'channel4: SER180, VAL183, ILE184, ARG212, PHE302, ALA305, GLY306, GLU308, THR309, THR310, SER312, ILE369, ALA370, CYS442, GLY444, PHE447, ASN451, LEU482, GLN484',
'channel5: SER180, VAL183, ILE184, THR187, SER188, PHE203, PHE248, SER252, VAL253, ARG255, MET256, PHE271, SER299, PHE302, ILE303, GLY306, THR310, PHE447, ASN451',
'channel6: ILE149, ALA150, GLY153, ASP154, TYR179, PRO344, PRO345, MET450, ASN451, LEU454, ALA455, ARG458',
'channel7: TYR152, LEU156, ASN159, LEU160, GLU163, VAL175, ALA178, TYR179, ASP182, LEU196',
'channel8: LEU132, PRO135, THR136, LYS141, LEU274, MET275, SER278, GLN279, LEU290, LEU295']

To save it in a file:
getChannelResidueNames(atoms, channels, residues_file_name='1tqnA')

The file name is then 1tqnA_Residues_All_channels.txt and contains:
1tqnA_channel0: LYS173, SER180, VAL183, ILE184, ARG212, PHE302, ALA305, GLY306, THR309, THR310, SER312, S
1tqnA_channel1: ARG106, SER180, VAL183, ILE184, PHE215, THR224, PHE302, ALA305, GLY306, THR310, CYS442, G
1tqnA_channel2: ILE50, LEU51, TYR53, HIS54, PHE57, SER180, VAL183, ILE184, PHE215, LEU216, LEU221, THR224
1tqnA_channel3: PHE46, ASP76, GLY77, GLN78, GLN79, ARG106, SER180, VAL183, ILE184, PHE215, THR224, VAL225
1tqnA_channel4: SER180, VAL183, ILE184, ARG212, PHE302, ALA305, GLY306, GLU308, THR309, THR310, SER312, I
1tqnA_channel5: SER180, VAL183, ILE184, THR187, SER188, PHE203, PHE248, SER252, VAL253, ARG255, MET256, P
1tqnA_channel6: ILE149, ALA150, GLY153, ASP154, TYR179, PRO344, PRO345, MET450, ASN451, LEU454, ALA455, A
1tqnA_channel7: TYR152, LEU156, ASN159, LEU160, GLU163, VAL175, ALA178, TYR179, ASP182, LEU196
1tqnA_channel8: LEU132, PRO135, THR136, LYS141, LEU274, MET275, SER278, GLN279, LEU290, LEU295

@karolamik13 karolamik13 changed the title CaviTracker tool for detecting channels, tunnels, pores CaviTracer tool for detecting channels, tunnels, pores Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants