コード例 #1
0
    RE scheme 2:
    - Synchronous RE scheme: none of the replicas can start exchange before all replicas has finished MD run.
    Conversely, none of the replicas can start MD run before all replicas has finished exchange step. 
    In other words global barrier is present.   
    - Number of replicas is greater than number of allocated resources for both MD and exchange step.
    - Simulation cycle is defined by the fixed number of simulation time-steps for each replica.
    - Exchange probabilities are determined using Gibbs sampling.
    - Exchange step is performed in decentralized fashion on target resource.
    """

    print "*********************************************************************"
    print "*                 RepEx simulation: NAMD + RE scheme 2              *"
    print "*********************************************************************"

    work_dir_local = os.getcwd()
    params = parse_command_line()

    # get input file
    json_data = open(params.input_file)
    inp_file = json.load(json_data)
    json_data.close()

    # initializing kernels
    md_kernel = NamdKernelTexScheme2(inp_file, work_dir_local)
    pilot_kernel = PilotKernelScheme2(inp_file)

    # initializing replicas
    replicas = md_kernel.initialize_replicas()

    pilot_manager, pilot_object, session = pilot_kernel.launch_pilot()
コード例 #2
0
    RE scheme 2a:
    - Synchronous RE scheme: none of the replicas can start exchange before all replicas had finished MD run.
    Conversely, none of the replicas can start MD run before all replicas had finished exchange step. 
    In other words global barrier is present.   
    - Number of replicas is greater than number of allocated resources for both MD and exchange step.
    - Simulation cycle is defined by the fixed number of simulation time-steps for each replica.
    - Exchange probabilities are determined using Gibbs sampling.
    - Exchange step is performed locally.
    """
 
    print "*********************************************************************"
    print "*               RepEx simulation: AMBER + RE scheme 2a              *"
    print "*********************************************************************"

    work_dir_local = os.getcwd()
    params = parse_command_line()
    
    # get input file
    json_data=open(params.input_file)
    inp_file = json.load(json_data)
    json_data.close()

    # initializing kernels
    md_kernel = AmberKernelTexScheme2a( inp_file, work_dir_local )
    pilot_kernel = PilotKernelScheme2a( inp_file )

    # initializing replicas
    replicas = md_kernel.initialize_replicas()

    pilot_manager, pilot_object, session = pilot_kernel.launch_pilot()