Example #1
0
def to_openmm_Context(item,
                      selection='all',
                      structure_indices='all',
                      syntaxis='MolSysMT'):

    from molsysmt.tools.openmm_Simulation import is_openmm_Simulation
    from molsysmt.basic import convert

    if not is_openmm_Simulation(item):
        raise ValueError

    tmp_item = convert(item,
                       to_form='openmm.Context',
                       selection=selection,
                       structure_indices=structure_indices,
                       syntaxis=syntaxis)

    return tmp_item
Example #2
0
def to_file_pdb(item,
                selection='all',
                structure_indices='all',
                output_filename=None,
                syntaxis='MolSysMT'):

    from molsysmt.tools.openmm_Simulation import is_openmm_Simulation
    from molsysmt.basic import convert

    if not is_openmm_Simulation(item):
        raise ValueError

    if output_filename is None:
        raise ValueError

    tmp_item = convert(item,
                       to_form=output_filename,
                       selection=selection,
                       structure_indices=structure_indices,
                       syntaxis=syntaxis)

    return tmp_item