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