def string2mol2(filename, string):
    """
    Writes molecule to filename.mol2 file, input is a string of Mol2 blocks
    """
    block = string
    
    if filename[-4:] != '.mol2':
        filename += '.mol2'

    with open(filename, 'w') as file:
        file.write(block)

    return None