Skip to content

Commit

Permalink
NA backbone atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
clami66 committed Mar 25, 2024
1 parent b3790ce commit 8dcbef2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions run_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ else
binary="DockQ"
fi

$binary examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb > test
diff test testdata/1A2K.dockq
$binary examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb --no_align > test
diff test testdata/1A2K.dockq
$binary examples/1A2K_r_l_b.model.pdb examples/1A2K_r_l_b.pdb > test
diff test testdata/1A2K.dockq

# Multiple interfaces
$binary examples/dimer_dimer.model.pdb examples/dimer_dimer.pdb --short > test
Expand Down
12 changes: 7 additions & 5 deletions src/DockQ/DockQ.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ def calc_DockQ(
capri_peptide=False,
low_memory=False,
):
atom_for_sup = ("CA", "C", "N", "O", "P")
atom_for_sup = ("CA", "C", "N", "O",
"P", "OP1", "OP2",
"O2'", "O3'", "O4'", "O5'",
"C1'", "C2'", "C3'", "C4'", "C5'")
fnat_threshold = 4.0 if capri_peptide else 5.0
interface_threshold = 8.0 if capri_peptide else 10.0
clash_threshold = 2.0
Expand Down Expand Up @@ -304,7 +307,7 @@ def dockq_formula(fnat, irms, Lrms):


@lru_cache
def align_chains(model_chain, native_chain, use_numbering=False, verbose=False):
def align_chains(model_chain, native_chain, use_numbering=False):
"""
Function to align two PDB structures. This can be done by sequence (default) or by
numbering. If the numbering is used, then each residue number from the pdb structure
Expand Down Expand Up @@ -588,7 +591,7 @@ def group_chains(
chain_clusters = {chain: [] for chain in ref_chains}

for query_chain, ref_chain in alignment_targets:
aln = align_chains(query_structure[query_chain], ref_structure[ref_chain])
aln = align_chains(query_structure[query_chain], ref_structure[ref_chain], use_numbering=False)
alignment = format_alignment(aln)
n_mismatches = alignment["matches"].count(".")

Expand Down Expand Up @@ -645,13 +648,12 @@ def format_mapping_string(chain_mapping):
chain1 = ""
chain2 = ""

# mapping = sorted([(b, a) for a, b in chain_mapping.items()])
# Sorting might change LRMSD since the definition of receptor/ligand for equal length depends on order
mapping = [(b, a) for a, b in chain_mapping.items()]
for (
model_chain,
native_chain,
) in mapping: # sorted([(b,a) for a,b in chain_mapping.items()]):
) in mapping:
chain1 += model_chain
chain2 += native_chain

Expand Down

0 comments on commit 8dcbef2

Please sign in to comment.