set_structure#

biotite.structure.io.mol.set_structure(mol_file, atoms, default_bond_type=BondType.ANY, version=None, record_name=None)[source]#

Set the AtomArray for the MOL file.

Ths function is a thin wrapper around MOLFile.set_structure().

Parameters:
mol_fileMOLFile

The MOL file.

atomsAtomArray

The array to be saved into this file. Must have an associated BondList. Bond type fallback for the Bond block, if a BondType has no CTAB counterpart. By default, each such bond is treated as BondType.ANY.

default_bond_typeBondType, optional

Bond type fallback for the Bond block, if a BondType has no CTAB counterpart. By default, each such bond is treated as BondType.ANY.

version{“V2000”, “V3000”}, optional

The version of the CTAB format. "V2000" uses the Atom and Bond block, while "V3000" uses the Properties block. By default, "V2000" is used, unless the number of atoms or bonds exceeds 999, in which case "V3000" is used.

record_namestr, optional

Has only an effect when mol_file is a SDFile. The name of the record. Default is the first record of the file. If the file is empty, a new record will be created.