class Bio::PDB::Record::ATOM
ATOM
record class
Attributes
ANISOU
record
residue the atom belongs to.
SIGATM record
TER record
Public Instance Methods
Source
# File lib/bio/db/pdb/pdb.rb 975 def <=>(other) 976 return serial <=> other.serial 977 end
Sorts based on serial numbers
Source
# File lib/bio/db/pdb/pdb.rb 979 def do_parse 980 return self if @parsed or !@str 981 self.serial = @str[6..10].to_i 982 self.name = @str[12..15].strip 983 self.altLoc = @str[16..16] 984 self.resName = @str[17..19].strip 985 self.chainID = @str[21..21] 986 self.resSeq = @str[22..25].to_i 987 self.iCode = @str[26..26].strip 988 self.x = @str[30..37].to_f 989 self.y = @str[38..45].to_f 990 self.z = @str[46..53].to_f 991 self.occupancy = @str[54..59].to_f 992 self.tempFactor = @str[60..65].to_f 993 self.segID = @str[72..75].to_s.rstrip 994 self.element = @str[76..77].to_s.lstrip 995 self.charge = @str[78..79].to_s.strip 996 @parsed = true 997 self 998 end
Source
# File lib/bio/db/pdb/pdb.rb 970 def to_a 971 [ x, y, z ] 972 end
Returns an array of the xyz positions
Source
# File lib/bio/db/pdb/pdb.rb 1047 def to_s 1048 atomname = justify_atomname 1049 sprintf("%-6s%5d %-4s%-1s%3s %-1s%4d%-1s %8.3f%8.3f%8.3f%6.2f%6.2f %-4s%2s%-2s\n", 1050 self.record_name, 1051 self.serial, 1052 atomname, 1053 self.altLoc, 1054 self.resName, 1055 self.chainID, 1056 self.resSeq, 1057 self.iCode, 1058 self.x, self.y, self.z, 1059 self.occupancy, 1060 self.tempFactor, 1061 self.segID, 1062 self.element, 1063 self.charge) 1064 end
Source
# File lib/bio/db/pdb/pdb.rb 965 def xyz 966 Coordinate[ x, y, z ] 967 end
Returns a Coordinate
class instance of the xyz positions