hildebrandtlab / BiochemicalAlgorithms.jl

The Biochemical Algorithms Library in Julia
MIT License
13 stars 11 forks source link

Inconsistent return values with table generators (`atoms()`, `bonds()`, ...) #114

Closed tkemmer closed 1 month ago

tkemmer commented 1 month ago

When called without keyword arguments, molecules(sys), chains(sys), and fragments(sys) return identical tables instead of copies, while atoms(sys), bonds(sys), and the variant versions of said functions do not:

julia> ct = atoms(sys); ct2 = atoms(sys); ct === ct2
false

julia> ct = bonds(sys); ct2 = bonds(sys); ct === ct2
false

julia> ct = molecules(sys); ct2 = molecules(sys); ct === ct2
true

julia> ct = proteins(sys); ct2 = proteins(sys); ct === ct2
false

julia> ct = chains(sys); ct2 = chains(sys); ct === ct2
true

julia> ct = fragments(sys); ct2 = fragments(sys); ct === ct2
true

julia> ct = nucleotides(sys); ct2 = nucleotides(sys); ct === ct2
false

julia> ct = residues(sys); ct2 = residues(sys); ct === ct2
false