Ejemplo n.º 1
0
def example_human_readable_params():
    """
    The human readable parameters are the labels of the inputs
    in the original web page

    See example_original_parameters (below)

    - It doesn't differentiate upper and lowercase
    - Any extraneous space is ignored
    """
    params = {
        'number of protein atoms': 50,
        # Example of case insensitivity and removal of spare spaces
        'constraints in the  PROTEIN  ': 'bonds to hydrogens only',
    }
    print '-' * 20
    print 'Example with 50 protein atoms, bonds to hydrogen only\n'
    print 'Temperatures only\n', get_temperatures(params), '\n'
    _print_temperatures_table(get_temperatures_energies(params))
Ejemplo n.º 2
0
def example_original_params():
    """
    The original web form parameters are the following

    Exchange probability: Pdes,
    Lower temperature limit: Tlow,
    Number of water molecules: Nw,
    Number of protein atoms: Np,
    Hydrogens in protein: Hff, Values: 0 (All H), 1 (Polar H),
    Simulation type: Alg,  Values: 0 (NPT), 1 (NVT),
    Tolerance: Tol,
    Upper temperature limit: Thigh,
    Constraints in water: WC, Values: 0 (Fully flexible), 2 (Flexible Angle),
        3 (Rigid)
    Constraints in the protein: PC, Values: 0 (Fully flexible),
        1 (Bonds to hydrogens only), 2 (All bonds)
    Virtual sites in protein: Vs, Values: 0 (None), 1( Virtual hydrogen)
    """
    # Use original variables interface
    params = {'Np': 20}  # Set number of protein atoms
    print '-' * 20
    print 'Example with  Np=20 (number of protein atoms)\n'
    print 'Temperatures only\n', get_temperatures(params), '\n'
    _print_temperatures_table(get_temperatures_energies(params))