Skip to content

Commit

Permalink
Merge pull request #622 from BioJulia/patch-1
Browse files Browse the repository at this point in the history
BioStructures.jl compat
  • Loading branch information
kool7d authored Jul 13, 2024
2 parents fc291e5 + 70060e1 commit 086059d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
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

0 comments on commit 086059d

Please sign in to comment.