In parse_molecules, there is
# Skip this molecule if any required field is missing or empty
if not mol_type_val or not mol_chain_val or not mol_seq_val:
idx += 1
continue
That means if a user has a bad row, it will still silently create an input file, but it's almost certainly not the input file they want.
I think when this happens, the generator should skip writing an input file for this row of data and print a warning that it was skipped. That will require
- changing the
parse_molecules function to return an error or exception
- changing the
main function to catch the exception: print an error and continue to the next for loop
In
parse_molecules, there isThat means if a user has a bad row, it will still silently create an input file, but it's almost certainly not the input file they want.
I think when this happens, the generator should skip writing an input file for this row of data and print a warning that it was skipped. That will require
parse_moleculesfunction to return an error or exceptionmainfunction to catch the exception: print an error and continue to the next for loop