Skip to content

Commit

Permalink
add test to show vector method
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Jan 23, 2024
1 parent b3b938c commit 76b45e7
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions src/Atom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,30 @@ Fields:
```jldoctest
julia> using PDBTools
julia> pdb = readPDB(PDBTools.TESTPDB); # testing PDB file
julia> printatom(pdb[1])
julia> atoms = readPDB(PDBTools.SMALLPDB)
Array{Atoms,1} with 35 atoms with fields:
index name resname chain resnum residue x y z occup beta model segname index_pdb
1 N ALA A 1 1 -9.229 -14.861 -5.481 0.00 0.00 1 PROT 1
julia> resname(pdb[1])
1 N ALA A 1 1 -9.229 -14.861 -5.481 0.00 0.00 1 - 1
2 HT1 ALA A 1 1 -10.048 -15.427 -5.569 0.00 0.00 1 - 2
3 HT2 ALA A 1 1 -9.488 -13.913 -5.295 0.00 0.00 1 - 3
33 OD2 ASP A 3 3 -6.974 -11.289 -9.300 1.00 0.00 1 - 33
34 C ASP A 3 3 -2.626 -10.480 -7.749 1.00 0.00 1 - 34
35 O ASP A 3 3 -1.940 -10.014 -8.658 1.00 0.00 1 - 35
julia> resname(atoms[1])
"ALA"
julia> chain(pdb[1])
julia> chain(atoms[1])
"A"
julia> element(pdb[1])
julia> element(atoms[1])
"N"
julia> mass(pdb[1])
julia> mass(atoms[1])
14.0067
julia> position(pdb[1])
julia> position(atoms[1])
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
-9.229
-14.861
Expand Down

2 comments on commit 76b45e7

@lmiq
Copy link
Member Author

@lmiq lmiq commented on 76b45e7 Jan 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register

Release notes:

Breaking changes:

  • The element field of the Atom structure is now called pdb_element. If element(::Atom) is called, the value of the pdb_element field will be retrieved if not empty and not "X".
  • The atomic_number(::String) was removed, as it was type-piracy because the function was defined in AtomsBase. Use atomic_number(Atom(name="NT3")) instead.

New features

  • select_with_vmd supports a AbstractVector{<:PDBTools.Atom} as input. It will write a temporary PDB file and run VMD.
  • pdb_element and charge are now exported.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/99399

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.0 -m "<description of version>" 76b45e73e44434251ba6154c61d65eb17ffc0874
git push origin v1.0.0

Please sign in to comment.