text: user12686: What would be the total size of all PDB files in RCSB?
  Can I traverse/enumerate them one at a time using a Python script without downloading all of them to my local disk?
  If YES, what would be the Python script like?
  
  user6322: The page https://www.wwpdb.org/ftp/pdb-ftp-sites gives the addresses of interest. PDB has an FTP site downloadable via rsync and the latter has a dry run mode.
  rsync --port=33444 -rlpt -v -z --dry-run --stats rsync.rcsb.org::ftp_data/structures/divided/pdb/
  
  You get a bunch of folders names and the following:
  Number of files: 182479
  Number of files transferred: 0
  Total file size: 38382243431 bytes
  Total transferred file size: 0 bytes
  Literal data: 0 bytes
  Matched data: 0 bytes
  File list size: 3777395
  File list generation time: 52.909 seconds
  File list transfer time: 0.000 seconds
  Total bytes sent: 16
  Total bytes received: 3777651
  
  sent 16 bytes  received 3777651 bytes  66861.36 bytes/sec
  total size is 38382243431  speedup is 10160.30
  
  So there are 182,479 *.ent.gz in various folders. The total is 38,382,243,431 bytes, which is 38 GB, so not too much. In Python it is easy to iterate across gzip files with the gzip module, so uncompressing them is generally a thing to avoid as it will bloat up greatly. The problem arise when dealing with the density maps, which do take up a lot of space...
  Download without saving
  The PDBe is easier to for downloading things than the RCSB PDB and the API are much more comprehensive.
  Given a list of PDB codes one could
  pdbcode : str = ''
  
  import requests
  r = requests.get(f'https://www.ebi.ac.uk/pdbe/entry-files/download/pdb{pdbcode.lower()}.ent', stream=True)
  assert r.status_code == 200, f'something ({r.status_code} is wrong: {r.text}'
  pdb_code = r.text
  
  
original_text: 12686: <p>What would be the total size of all PDB files in RCSB?</p>
  <p>Can I traverse/enumerate them one at a time using a Python script without downloading all of them to my local disk?</p>
  <p>If YES, what would be the Python script like?</p>
   6322: <p>The page <a href="https://www.wwpdb.org/ftp/pdb-ftp-sites" rel="noreferrer">https://www.wwpdb.org/ftp/pdb-ftp-sites</a> gives the addresses of interest. PDB has an FTP site downloadable via rsync and the latter has a dry run mode.</p>
  <pre><code>rsync --port=33444 -rlpt -v -z --dry-run --stats rsync.rcsb.org::ftp_data/structures/divided/pdb/
  </code></pre>
  <p>You get a bunch of folders names and the following:</p>
  <pre><code>Number of files: 182479
  Number of files transferred: 0
  Total file size: 38382243431 bytes
  Total transferred file size: 0 bytes
  Literal data: 0 bytes
  Matched data: 0 bytes
  File list size: 3777395
  File list generation time: 52.909 seconds
  File list transfer time: 0.000 seconds
  Total bytes sent: 16
  Total bytes received: 3777651
  
  sent 16 bytes  received 3777651 bytes  66861.36 bytes/sec
  total size is 38382243431  speedup is 10160.30
  </code></pre>
  <p>So there are 182,479 *.ent.gz in various folders. The total is 38,382,243,431 bytes, which is 38 GB, so not too much. In Python it is easy to iterate across gzip files with the <a href="https://docs.python.org/3/library/gzip.html" rel="noreferrer">gzip module</a>, so uncompressing them is generally a thing to avoid as it will bloat up greatly. The problem arise when dealing with the density maps, which do take up a lot of space...</p>
  <h2>Download without saving</h2>
  <p>The PDBe is easier to for downloading things than the RCSB PDB and the API are much more comprehensive.</p>
  <p>Given a list of PDB codes one could</p>
  <pre><code>pdbcode : str = ''
  
  import requests
  r = requests.get(f'https://www.ebi.ac.uk/pdbe/entry-files/download/pdb{pdbcode.lower()}.ent', stream=True)
  assert r.status_code == 200, f'something ({r.status_code} is wrong: {r.text}'
  pdb_code = r.text
  </code></pre>
  