Function to parse PDB data and build a molecule