Method: Bio::PDB#remark

Defined in:
lib/bio/db/pdb/pdb.rb

#remark(nn = nil) ⇒ Object

Gets REMARK records. If no arguments, it returns all REMARK records as a hash. If remark number is specified, returns only corresponding REMARK records. If number == 1 or 2 (“REMARK 1” or “REMARK 2”), returns an array of Bio::PDB::Record instances. Otherwise, returns an array of strings.



1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
# File 'lib/bio/db/pdb/pdb.rb', line 1712

def remark(nn = nil)
  unless defined?(@remark)
    h = make_hash(self.record('REMARK'), :remarkNum)
    h.each do |i, a|
        a.shift # remove first record (= space only)
      if i != 1 and i != 2 then
        a.collect! { |f| f.text.gsub(/\s+\z/, '') }
      end
    end
    @remark = h
  end
  nn ? @remark[nn] : @remark
end