# `inputgen`

Create an APBS input file using `psize` data.

Code author: Todd Dolinsky

Code author: Nathan Baker

class pdb2pqr.inputgen.Elec(pqrpath, size, method, asyncflag, istrng=0, potdx=False)

  An object for the ELEC section of an APBS input file.

  __init__(pqrpath, size, method, asyncflag, istrng=0, potdx=False)

    Initialize object.

    Todo

    Remove hard-coded parameters.

    Parameters:

      - pqrpath (str) – path to PQR file

      - size (Psize) – parameter sizing object

      - method (str) – solution method (e.g., mg-para, mg-auto, etc.)

      - asyncflag (bool) – perform an asynchronous parallel focusing calculation

      - istrng – ionic strength/concentration (M)

      - potdx (bool) – whether to write out potential information in DX format

class pdb2pqr.inputgen.Input(pqrpath, size, method, asyncflag, istrng=0, potdx=False)

  Each object of this class is one APBS input file.

  __init__(pqrpath, size, method, asyncflag, istrng=0, potdx=False)

    Initialize the input file class.

    Each input file contains a PQR name, a list of elec objects, and a list of strings containing print statements. For starters, assume two ELEC statements are needed, one for the inhomgenous and the other for the homogenous dielectric calculations.

    Note

    This assumes you have already run psize, either by `size.run_psize(...)()` or `size.parse_string(...)()` followed by `size.set_all()`.

    Parameters:

      - pqrpath (str) – path to PQR file

      - size (Psize) – parameter sizing object

      - method (str) – solution method (e.g., mg-para, mg-auto, etc.)

      - asyncflag (bool) – perform an asynchronous parallel focusing calculation

      - istrng – ionic strength/concentration (M)

      - potdx (bool) – whether to write out potential information in DX format

  dump_pickle()

    Make a Python pickle associated with the APBS input parameters.

    Todo

    is this function still useful?

  print_input_files(output_path)

    Generate the input file(s) associated with this object.

    Parameters:

      output_path (str) – location for generated files

pdb2pqr.inputgen.build_parser()

  Build argument parser.

pdb2pqr.inputgen.main()

  Main driver

pdb2pqr.inputgen.split_input(filename)

  Split the parallel input file into multiple async file names.

  Parameters:

    filename (str) – the path to the original parallel input file