The Occluded Surface (OS) algorithm is a widely used approach for analyzing atomic packing in biomolecules. Here, we introduce FIBOS, an R and Python package that extends the OS methodology with enhancements. It integrates efficient Fortran code from the original OS implementation and introduces an innovation: the use of Fibonacci spirals for surface point distribution. This modification reduces anisotropy and ensures a more uniform and even distribution of surface dots, improving the accuracy of the algorithm.
Python fibos version: https://github.com/insilico-unifei/fibos-py.git.
FIBOS was designed to be multiplatform and run on Linux, Windows and
Mac.
Tested on:
Tested on: 4.4.1, 4.4.2
Some preliminary actions according to OS:
Install gfortran:
$ sudo apt install gfortran
Install RTools from:
https://cran.r-project.org/bin/windows/Rtools
Install gfortran from (version \(\geq\) 13.2):
http://www.equation.com/servlet/equation.cmd?fa=fortran
Set the PATH to the R bin folder as an administrator:
$ setx PATH "%PATH%;C:\Program Files\R\R-x.x.x\bin"
where x.x.x is the actual version number of your R installation.
Install Homebrew:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/
HEAD/install.sh)”
In your shell, set the PATH to include the Homebrew bin folder by adding it into the .zshrc file
export PATH= "/path/to/homebrew/bin:$PATH"
where “/path/to/homebrew/bin” is the actual homebrew path in your system. So, reload it:
$ source ~/.zshrc
Some Mac versions (with Apple Silicon) may require Rosetta:
$ softwareupdate --install-rosetta --agree-to-license
Install xcode and gfortran from:
https://cran.r-project.org/bin/macosx/tools/
install.packages("devtools")
library("devtools")
install_github("https://github.com/insilico-unifei/fibos-R.git")
occluded_surface(pdb, method = "FIBOS")
:
Implements the Occluded Surface algorithm, generating points, areas, and
normals for each atom. As parameters it accepts a PDB id (or the path to
a local PDB file) and a method selection — either the classic ‘OS’ or
the default ‘FIBOS’. The function returns the results as a table and
creates a file named prot_PDBid.srf
in the
fibos_file
directory.
osp(file)
: Implements the Occluded
Surface Packing (OSP) metric for each residue. Accepts a path to an .srf
file generated by occluded_surface
as a parameter and
returns the results as a table summarized by residue.
library(fibos)
# Calculate FIBOS per atom and create .srf files in fibos_files folder
<- occluded_surface("1fib", method = "FIBOS")
pdb_fibos
# Show first 3 rows of pdb_fibos table
|> utils::head(3) |> print()
pdb_fibos
# A tibble: 3 × 6
# ATOM NUMBER_POINTS AREA RAYLENGTH DISTANCE
# <chr> <int> <dbl> <dbl> <dbl>
# 1 GLN 1@N___>HIS 3@NE2_ 6 1.29 0.791 5.49
# 2 GLN 1@N___>HIS 3@CE1_ 1 0.2 0.894 6.06
# 3 GLN 1@N___>HIS 3@CG__ 1 0.16 0.991 6.27
# Calculate OSP metric per residue from .srf file in fibos_files folder
<- osp(fs::path("fibos_files","prot_1fib.srf"))
pdb_osp
# Show first 3 rows of pdb_osp table
|> utils::head(3) |> print()
pdb_osp
# A tibble: 3 × 5
# Resnum Resname OS `os*[1-raylen]` OSP
# <dbl> <chr> <dbl> <dbl> <dbl>
# 1 1 GLN 36.8 22.0 0.157
# 2 2 ILE 49.4 36.2 0.317
# 3 3 HIS 64.2 43.2 0.335
library(fibos)
library(furrr)
# source of PDB files
<- "PDB"
pdb_folder
# fibos folder output
<- "fibos_files"
fibos_folder
# Create PDB folder if it does not exist
if (!fs::dir_exists(pdb_folder)) fs::dir_create(pdb_folder)
# PDB ids list
= c("8RXN","1ROP") |> tolower()
pdb_ids
# Get PDB files from RCSB and put them into the PDB folder
<- pdb_ids |> bio3d::get.pdb(path = pdb_folder)
pdb_paths |> print()
pdb_paths
# Save default environment variable "mc.cores" to recover later
<- getOption("mc.cores")
default_cores
# Detect number of physical cores and update "mc.cores" according to pdb_ids size
<- min(parallel::detectCores(), length(pdb_ids))
ideal_cores if (ideal_cores > 0) options(mc.cores = ideal_cores)
# Calculate in parallel FIBOS per PDBid
# Create .srf files in fibos_files folder
# Return FIBOS tables in pdb_fibos list
if (ideal_cores > 1) future::plan(multisession, workers = ideal_cores)
<- pdb_paths |> furrr::future_map(\(x) occluded_surface(x, method = "FIBOS"),
pdb_fibos .options = furrr_options(seed = 123))
# Recover default "mc.cores"
if (ideal_cores > 0) options(mc.cores = default_cores)
# Show first 3 rows of first pdb_fibos table
1]] |> utils::head(3) |> print()
pdb_fibos[[
# Prepare paths for the generated .srf files in folder fibos_files
<- pdb_ids |> purrr::map(\(x) fs::path(fibos_folder, paste0("prot_",x), ext = "srf")) |>
srf_paths unlist()
|> print()
srf_paths
# Calculate OSP metric by residue
# Return OSP tables in pdb_osp list
<- srf_paths |> purrr::map(\(x) osp(x))
pdb_osp
# Show first 3 rows of the first pdb_osp table
1]] |> utils::head(3) |> print() pdb_osp[[
Here we show a case study (currently only in R), aiming to compare the packing density between experimentally determined structures and the same structures predicted by AlphaFold (AF).
Carlos Silveira
(carlos.silveira@unifei.edu.br)
Herson Soares
(d2020102075@unifei.edu.br)
Institute of Technological Sciences,
Federal University of Itajubá,
Campus Itabira, Brazil.
João Romanelli
(joaoromanelli@unifei.edu.br)
Institute of Applied and Pure Sciences,
Federal University of Itajubá,
Campus Itabira, Brazil.
Patrick Fleming
(Pat.Fleming@jhu.edu)
Thomas C. Jenkins Department of Biophysics,
Johns Hopkins University,
Baltimore, MD, USA
Fleming PJ, Richards FM. Protein packing: Dependence on protein size, secondary structure and amino acid composition. J Mol Biol 2000;299:487–98.
Pattabiraman N, Ward KB, Fleming PJ. Occluded molecular surface: Analysis of protein packing. J Mol Recognit 1995;8:334–44.
In Progress.