Exemple #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))
Exemple #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))
Exemple #3
0
        print "---------------------------------------------------------"
        print "COMMAND: python get_temperatures.py Np Pdes Tlow Thigh > temperatures.dat"
        print "---------------------------------------------------------"
        print "where: \n"
        print "Exchange probability: Pdes,"
        print "Lower temperature limit: Tlow,"
        print "Number of water molecules: Nw,"
        print "Number of protein atoms: Np,"
        print "Hydrogens in protein: Hff, Values: 0 (All H), 1 (Polar H),"
        print "Simulation type: Alg, Values: 0 (NPT), 1 (NVT),"
        print "Tolerance: Tol,"
        print "Upper temperature limit: Thigh,"
        print "Constraints in water: WC, Values: 0 (Fully flexible), 2 (Flexible Angle), 3 (Rigid)"
        print "Constraints in the protein: PC, Values: 0 (Fully flexible), 1 (Bonds to hydrogens only), 2 (All bonds)"
        print "Virtual sites in protein: Vs, Values: 0 (None), 1(Virtual hydrogen)"
        print "---------------------------------------------------------"
        quit()
    params = {
        'Np': sys.argv[1],
        'Pdes': sys.argv[2],
        'Tlow': sys.argv[3],
        'Thigh': sys.argv[4],
        'Hff': 0,
        'WC': 3,
        'Alg': 0,
        'PC': 0
    }
    print "\n".join([str(x) for x in get_temperatures(params)])

# python teste.py 200 > temperatures.dat