def test_process_pdb(file_name, group_solvent, num_atom, num_res):
    base_location = os.path.dirname(os.path.realpath(__file__))
    pdb_path = os.path.join(base_location, '..', '..', 'test', 'pytest_data', file_name)
    residues = util.process_pdb(pdb_path, group_solvent=group_solvent)[0]

    assert len(residues) == num_atom
    assert residues[-1] == num_res
Beispiel #2
0
    mdi.MDI_Init(args.mdi, mpi_world)

    if use_mpi4py:
        mpi_world = mdi.MDI_Get_Intra_Code_MPI_Comm()
        world_rank = mpi_world.Get_rank()

    snapshot_filename = args.snap
    probes = [int(x) for x in args.probes.split()]

    if args.byres and args.bymol:
        parser.error(
            "--byres and --bymol cannot be used together. Please only use one."
        )

    if args.byres:
        residues = process_pdb(args.byres)[0]

    engine_comm = mdi_checks(mdi, nengines)

    # Print the probe atoms
    print(F"Probes: {probes}")

    elapsed = time.time() - start
    print(F'Setup:\t {elapsed}')

    ###########################################################################
    #
    #   Get Information from Tinker
    #
    ###########################################################################