## sequence_db.convert() — convert a database to binary format

`convert(chains_list, seq_database_file, seq_database_format, outfile, clean_sequences=True, minmax_db_seq_len=(0, 999999))`

> This command will read a database of sequences, in `PIR` or `FASTA` format, and write it out in `BINARY` format. See sequence_db.read() for an explanation of the parameters used. outfile gives the name of the resulting binary file.

> The conversion process is done one sequence at a time, so this requires substantially less system memory than sequence_db.read() followed by sequence_db.write().

> Any existing data in the database is discarded by this routine, and the database is empty when the function finishes.

Example: examples/commands/convert_sequence_db.py

      from modeller import *
      log.verbose()
      env = environ()

      sdb = sequence_db(env)
      sdb.convert(seq_database_file='pdb95.fsa', seq_database_format='FASTA',
                  chains_list='ALL', minmax_db_seq_len=[1, 40000],
                  clean_sequences=True, outfile='pdb95.bin')