Skip to content

Commit f9a3547

Browse files
authored
Update ProteinChainsExt.jl
1 parent a0faf8a commit f9a3547

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/ProteinChainsExt.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ using PyBoltz
44
using ProteinChains: ProteinStructure
55
using ProteinChains.BioStructures: MolecularStructure
66

7+
to_structure(x) = ProteinStructure(x)
8+
to_structure(::Missing) = missing
9+
710
function PyBoltz.predict(input, ::Type{ProteinStructure}; options...)
8-
return PyBoltz.predict(input, MolecularStructure; options...) .|> ProteinStructure
11+
return PyBoltz.predict(input, MolecularStructure; options...) .|> to_structure
912
end
1013

1114
function PyBoltz.predict(input::PyBoltz.Schema.MolecularInput, ::Type{ProteinStructure}; options...)
12-
return PyBoltz.predict(input, MolecularStructure; options...) |> ProteinStructure
15+
return PyBoltz.predict(input, MolecularStructure; options...) |> to_structure
1316
end
1417

1518
end

0 commit comments

Comments
 (0)