This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cutoff_a = 2.5 | |
l_u_copy = deepcopy(all_residues_dict["l_u"]) | |
close_irmsds = [] | |
for score_rank in 1:length(top_scores) | |
rotation_idx, t, score = top_scores[score_rank] | |
translation = voxel_size * ([t[1],t[2],t[3]] - [center_val+1,center_val+1,center_val+1]) | |
all_residues_dict["l_u"] = apply_transformation(l_u_copy, get_rotation(rotation_vectors[rotation_idx,:]), translation) | |
i_rmsd = calc_interface_rmsd(all_residues_dict) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Rotations | |
using LinearAlgebra | |
using ImageTransformations | |
using CoordinateTransformations | |
using Interpolations | |
using FFTW | |
using StatsBase | |
function scan_6d(rotation_vectors::Matrix{Float64}, receptor_volume::Array{ComplexF64, 3}, ligand_volume::Array{ComplexF64, 3}) | |
top_scores = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
volume_dim = 128 | |
receptor_volume, ligand_volume = zeros(volume_dim, volume_dim, volume_dim), zeros(volume_dim, volume_dim, volume_dim) | |
vols = Dict('l' => ligand_volume, 'r' => receptor_volume) | |
asa_min = 1.0 | |
# receptor -- iteration 1: [core: sqrt(1.5)*r, surface: sqrt(0.8)*r], iteration 2: [core: 0.0 (skip), surface: r + 3.4] | |
rr_iter1 = [receptor_atoms_asa[i] < asa_min ? sqrt(1.5)*receptor_radius_list[i] : sqrt(0.8)*receptor_radius_list[i] for i in 1:length(receptor_atoms_asa)] | |
rr_iter2 = [receptor_atoms_asa[i] < asa_min ? 0.0 : receptor_radius_list[i]+3.4 for i in 1:length(receptor_atoms_asa)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_sphere_points(n::Int) | |
dl = pi * (3.0 - sqrt(5.0)) | |
dz = 2.0 / n | |
longitude = 0 | |
z = 1 - dz / 2 | |
coords = zeros(n, 3) | |
for k in 1:n | |
r = sqrt((1 - z * z)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# determine if each amino acid is part of the interface of the complex | |
interface_max_dist = 10.0 | |
for res_key_l in keys(all_residues_dict["l_b"]) | |
atom_l_coords = all_residues_dict["l_b"][res_key_l]["coords"] | |
for res_key_r in keys(all_residues_dict["r_b"]) | |
atom_r_coords = all_residues_dict["r_b"][res_key_r]["coords"] | |
is_interface = any([norm(coord2 - coord1) <= interface_max_dist for coord2 in atom_r_coords for coord1 in atom_l_coords]) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BioStructures | |
proteins_dict = Dict() | |
protein_complex_pdb_id = "3WD5" | |
figures_path = mkpath(string(protein_complex_pdb_id, "_figures")) | |
for designation in ("l_u", "r_u", "l_b", "r_b") | |
protein = read(string("./protein_data/", protein_complex_pdb_id, '_', designation, ".pdb"), PDBFormat) | |
length(protein.models) == 1 || throw(DomainError(protein.models), "pdb files should only contain one model") | |
proteins_dict[designation] = protein[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BioStructures | |
using LinearAlgebra | |
using PlotlyJS | |
using DataFrames | |
using StaticArrays | |
using Rotations | |
using ImageTransformations | |
using CoordinateTransformations | |
using Interpolations | |
using FFTW |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <CGAL/Simple_cartesian.h> | |
#include <CGAL/Surface_mesh.h> | |
#include <CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h> | |
#include <fstream> | |
#include <iostream> | |
#include <boost/foreach.hpp> | |
typedef CGAL::Simple_cartesian<double> Kernel; | |
typedef Kernel::Point_3 Point_3; |