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

BioStructures.jl compat #622

Merged
merged 2 commits into from
Jul 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ TensorCast = "02d47bb6-7ce6-556a-be16-bb1710789e2b"

[compat]
BioAlignments = "2, 3"
BioStructures = "2, 3"
BioStructures = "4"
ColorSchemes = "3"
ColorTypes = "0.11"
Colors = "0.12"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ using GLMakie
using BioStructures
struc = retrievepdb("2vb1") |> Observable
## or
struc = read("2vb1.pdb", BioStructures.PDB) |> Observable
struc = read("2vb1.pdb", BioStructures.PDBFormat) |> Observable

fig = Figure()
plotstruc!(fig, struc; plottype = :ballandstick, gridposition = (1,1), atomcolors = aquacolors)
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ using GLMakie
using BioStructures
struc = retrievepdb("2vb1") |> Observable
## or
struc = read("2vb1.pdb", BioStructures.PDB) |> Observable
struc = read("2vb1.pdb", BioStructures.PDBFormat) |> Observable

fig = Figure()
plotstruc!(fig, struc; plottype = :ballandstick, gridposition = (1,1), atomcolors = aquacolors)
Expand Down
8 changes: 4 additions & 4 deletions src/bonds.jl
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ end
"""
getbonds( chn::BioStructures.Chain, selectors... ) -> BitMatrix
getbonds( modl::BioStructures.Model, selectors... ) -> BitMatrix
getbonds( struc::BioStructures.ProteinStructure, selectors... ) -> BitMatrix
getbonds( struc::BioStructures.MolecularStructure, selectors... ) -> BitMatrix

Returns a matrix of all bonds in `chn`, where Mat[i,j] = 1 if atoms i and j are bonded.

Expand Down Expand Up @@ -678,7 +678,7 @@ function getbonds(modl::BioStructures.Model, selectors...;

return nothing
end
function getbonds(struc::BioStructures.ProteinStructure, selectors...;
function getbonds(struc::BioStructures.MolecularStructure, selectors...;
algo = :knowledgebased,
H = true,
cutoff = 1.9,
Expand Down Expand Up @@ -1179,7 +1179,7 @@ function bondshapes(chn::BioStructures.Chain; algo = :knowledgebased, distance =

return bshapes
end
function bondshapes(struc::BioStructures.ProteinStructure; algo = :knowledgebased, distance = 1.9, bondwidth = 0.2)
function bondshapes(struc::BioStructures.MolecularStructure; algo = :knowledgebased, distance = 1.9, bondwidth = 0.2)
bshapes = Cylinder3{Float32}[]
bnds = getbonds(struc; algo = algo, cutoff = distance)
atms = BioStructures.collectatoms(struc)
Expand Down Expand Up @@ -1274,7 +1274,7 @@ function bondshapes(chn::BioStructures.Chain, bnds::AbstractMatrix; algo = nothi

return bshapes
end
function bondshapes(struc::BioStructures.ProteinStructure, bnds::AbstractMatrix; algo = nothing, cutoff = nothing, bondwidth = 0.2)
function bondshapes(struc::BioStructures.MolecularStructure, bnds::AbstractMatrix; algo = nothing, cutoff = nothing, bondwidth = 0.2)
bshapes = Cylinder3{Float32}[]
atms = BioStructures.collectatoms(struc)

Expand Down
4 changes: 2 additions & 2 deletions src/structure.jl
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ using BioStructures
struc = retrievepdb("2vb1", dir = "data/") |> Observable
strucplot = plotstruc!(fig, struc)

struc = read("data/2vb1_mutant1.pdb", BioStructures.PDB) |> Observable
struc = read("data/2vb1_mutant1.pdb", BioStructures.PDBFormat) |> Observable
strucplot = plotstruc!(fig, struc)

chain_A = retrievepdb("2vb1", dir = "data/")["A"] |> Observable
Expand Down Expand Up @@ -1150,7 +1150,7 @@ using BioStructures
struc = retrievepdb("2vb1", dir = "data/") |> Observable
strucplot = plotstruc(struc)

struc = read("data/2vb1_mutant1.pdb", BioStructures.PDB) |> Observable
struc = read("data/2vb1_mutant1.pdb", BioStructures.PDBFormat) |> Observable
strucplot = plotstruc(struc)

chain_A = retrievepdb("2hhb", dir = "data/")["A"] |> Observable
Expand Down
Loading