lightdock / lightdock

Protein-protein, protein-peptide and protein-DNA docking framework based on the GSO algorithm
https://lightdock.org/
GNU General Public License v3.0
308 stars 40 forks source link

Membrane atoms not being recognised (BJ) #81

Closed wjs20 closed 5 months ago

wjs20 commented 6 months ago

The lightdock setup command does not recognise the element names in the lipid bilayer (BJ).

| lightdock3_setup.py 3x29_receptor_membrane.pdb 3x29_ligand.pdb --noxt --noh --membrane
[lightdock3_setup] INFO: Ignoring OXT atoms
[lightdock3_setup] INFO: Ignoring Hydrogen atoms
[lightdock3_setup] INFO: Reading structure from 3x29_receptor_membrane.pdb PDB file...
[lightdock3_setup] ERROR: LightDock setup failed. Please see:
[lightdock3_setup] ERROR: [AtomError] Not recognized element 'B' for atom BJ

To Reproduce Run the membrane docking protocol as written

Portion of membrane with BJ atom label

ATOM   1594 BJ   MMB   704      14.901  43.356  16.652  1.00  0.00          Bj  
ATOM   1595 BJ   MMB   705       9.984  56.277 -23.107  1.00  0.00          Bj  
ATOM   1596 BJ   MMB   706      52.047  26.081  19.949  1.00  0.00          Bj  
ATOM   1597 BJ   MMB   707      21.913   8.418 -22.156  1.00  0.00          Bj  
ATOM   1598 BJ   MMB   708       5.827  40.414  17.307  1.00  0.00          Bj  
ATOM   1599 BJ   MMB   709      48.872  23.623 -20.271  1.00  0.00          Bj  
ATOM   1600 BJ   MMB   710     -31.674  56.582 -19.588  1.00  0.00          Bj  
ATOM   1601 BJ   MMB   711     -53.123  17.882 -19.534  1.00  0.00          Bj  
ATOM   1602 BJ   MMB   712     -21.161  48.138  17.007  1.00  0.00          Bj  
ATOM   1603 BJ   MMB   713      55.140  52.568  18.495  1.00  0.00          Bj  
ATOM   1604 BJ   MMB   714     -34.891 -27.058 -19.636  1.00  0.00          Bj  
ATOM   1605 BJ   MMB   715      28.792 -24.187 -20.296  1.00  0.00          Bj  
ATOM   1606 BJ   MMB   716      10.404  10.347 -23.675  1.00  0.00          Bj  
ATOM   1607 BJ   MMB   717      34.374   1.271  17.691  1.00  0.00          Bj  
ATOM   1608 BJ   MMB   718      28.482  42.826 -27.271  1.00  0.00          Bj  
END

Additional context lightdock version == 0.9.4

JorgeRoel commented 6 months ago

Hi @wjs20

Problem arises from the last column (Bj). If you replace it by P (or any other real atom I believe C,N,O ), it should work.

wjs20 commented 6 months ago
| lightdock3_setup.py 3x29_receptor_membrane.pdb 3x29_ligand.pdb --noxt --noh --membrane
[lightdock3_setup] INFO: Ignoring OXT atoms
[lightdock3_setup] INFO: Ignoring Hydrogen atoms
[lightdock3_setup] INFO: Reading structure from 3x29_receptor_membrane.pdb PDB file...
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue GLN.61
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue GLN.63
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue LYS.65
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue LEU.66
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue ASP.68
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue HIS.76
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue MET.95
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue MET.102
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue LYS.103
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue LYS.115
[pdb] WARNING: Possible problem: [SideChainError] Incomplete sidechain for residue ARG.117
[lightdock3_setup] INFO: 1608 atoms, 601 residues read.
[lightdock3_setup] INFO: Ignoring OXT atoms
[lightdock3_setup] INFO: Ignoring Hydrogen atoms
[lightdock3_setup] INFO: Reading structure from 3x29_ligand.pdb PDB file...
[lightdock3_setup] INFO: 933 atoms, 117 residues read.
[lightdock3_setup] INFO: Calculating reference points for receptor 3x29_receptor_membrane.pdb...
[lightdock3_setup] INFO: Reference points for receptor found, skipping
[lightdock3_setup] INFO: Done.
[lightdock3_setup] INFO: Calculating reference points for ligand 3x29_ligand.pdb...
[lightdock3_setup] INFO: Reference points for ligand found, skipping
[lightdock3_setup] INFO: Done.
[lightdock3_setup] INFO: Saving processed structure to PDB file...
[lightdock3_setup] INFO: Done.
[lightdock3_setup] INFO: Saving processed structure to PDB file...
[lightdock3_setup] INFO: Done.
[lightdock3_setup] INFO: Calculating starting positions...
[lightdock3_setup] INFO:   * Surface density: TotalSASA/50.00
[lightdock3_setup] INFO:   * Swarm radius: 10.00 Å
[lightdock3_setup] INFO:   * 180° flip of 50% of starting poses: False
[lightdock3_setup] INFO:   * Ligand Max Diameter: 44.55 Å
[lightdock3_setup] INFO:   * Surface distance: 11.14 Å
[lightdock3_setup] INFO: Swarms after incompatible filter: 840
[lightdock3_setup] INFO: Swarms after interior points filter: 839
Traceback (most recent call last):
  File "/home/ws/projects/lightdock-py/venv/bin/lightdock3_setup.py", line 142, in <module>
    starting_points_files = calculate_starting_positions(
  File "/home/ws/projects/lightdock-py/venv/lib/python3.10/site-packages/lightdock/prep/simulation.py", line 191, in calculate_starting_positions
    starting_points_files = calculate_initial_poses(
  File "/home/ws/projects/lightdock-py/venv/lib/python3.10/site-packages/lightdock/prep/poses.py", line 523, in calculate_initial_poses
    swarm_centers = apply_membrane(
  File "/home/ws/projects/lightdock-py/venv/lib/python3.10/site-packages/lightdock/prep/poses.py", line 418, in apply_membrane
    bead_z_coordinates = [residue.get_atom("BJ").z for residue in membrane_beads]
  File "/home/ws/projects/lightdock-py/venv/lib/python3.10/site-packages/lightdock/prep/poses.py", line 418, in <listcomp>
    bead_z_coordinates = [residue.get_atom("BJ").z for residue in membrane_beads]
AttributeError: 'NoneType' object has no attribute 'z'
JorgeRoel commented 6 months ago

Looks like there's still an issue. Try to remove all lightdock* init/ and swarm*/ and try again the setup. If error persists, please upload your receptor and ligand pdbs and I will have a look at them

wjs20 commented 6 months ago

Yeah I removed the generated files and reran the setup and it seems to work OK. Thanks for looking at this.

I understand that the membrane helps lightdock place initial swarm centroids. Does it also participate in the simulation phase? I.e. preventing swarms converging on poses that clash with the membrane?

JorgeRoel commented 6 months ago

So it acts in 2 steps: First, as you mention, as a filter for the generation of the swarms so that only swarms at the region of interest will be simulated and second, during the optimization as a "barrier". We basically apply a penalty at the scoring level to those models overlapping with the membrane in order to guide the optimization process outside of it. This protocol is compatible with the use of extra residue restraints.