text: user1847: I'm using R and I'm trying to import specific records from a PDB file (e.g. HETNAM, HETSYN). Unfortunately, it seems the read.pdb function of either biomaRt or Rpdb aren't capable of it.
  Any ideas?
  Thanks
  
  user1194: If your file is in PDB format as the one shown here in .pdb format then you can simply extract your desired fields using sed which is a programming language used to parse and transform text. As for this structure i.e 6C4A in .pdb format HETNAM and HETSYN can be extracted using sed as follows:
  sed  -n -e '/HETNAM/ p' -e '/HETSYN/ p'  6C4A.pdb
  
  HETNAM     EJA S-[(1Z)-2-CARBOXY-N-HYDROXYETHANIMIDOYL]-L-CYSTEINE              
  HETNAM     PYR PYRUVIC ACID                                                     
  HETNAM      MG MAGNESIUM ION                                                    
  HETNAM     3NP 3-NITROPROPANOIC ACID                                            
  HETNAM     PEG DI(HYDROXYETHYL)ETHER                                            
  HETNAM     EPE 4-(2-HYDROXYETHYL)-1-PIPERAZINE ETHANESULFONIC ACID              
  HETSYN     EPE HEPES
  
  
original_text: 1847: <p>I'm using R and I'm trying to import specific records from a PDB file (e.g. <code>HETNAM</code>, <code>HETSYN</code>). Unfortunately, it seems the <code>read.pdb</code> function of either <code>biomaRt</code> or <code>Rpdb</code> aren't capable of it.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks</p>
   1194: <p>If your file is in PDB format as the one shown <a href="https://files.rcsb.org/view/6C4A.pdb" rel="nofollow noreferrer">here</a> in .pdb format then you can simply extract your desired fields using <a href="https://www.gnu.org/software/sed/manual/sed.html" rel="nofollow noreferrer">sed</a> which is a programming language used to parse and transform text. As for this<a href="https://files.rcsb.org/view/6C4A.pdb" rel="nofollow noreferrer"> structure </a>i.e 6C4A in .pdb format HETNAM and HETSYN can be extracted using sed as follows:</p>
  
  <pre><code>sed  -n -e '/HETNAM/ p' -e '/HETSYN/ p'  6C4A.pdb
  
  HETNAM     EJA S-[(1Z)-2-CARBOXY-N-HYDROXYETHANIMIDOYL]-L-CYSTEINE              
  HETNAM     PYR PYRUVIC ACID                                                     
  HETNAM      MG MAGNESIUM ION                                                    
  HETNAM     3NP 3-NITROPROPANOIC ACID                                            
  HETNAM     PEG DI(HYDROXYETHYL)ETHER                                            
  HETNAM     EPE 4-(2-HYDROXYETHYL)-1-PIPERAZINE ETHANESULFONIC ACID              
  HETSYN     EPE HEPES
  </code></pre>
  