Exemplo n.º 1
0
                            chiN.append(chi[itterlist[chi_loc]])
                        
                        WDIR_fieldpath = os.path.join(WDIR,fieldpath)
                        if p==0 or args.chainbool==False:
                            fieldsin_path = os.path.join(args.seed_path,f'{Phase}_fields.in')
                            shutil.copy(fieldsin_path,WDIR_fieldpath)
                        else:
                            shutil.copy(fieldsin_path,WDIR_fieldpath)

                        
                        #replace list for make input file
                        REPLACE_lIST = [fieldpath,chain_list,chiN,d,args.chain_label,args.contour_step,args.timestep,args.stressscale,\
                                args.forcescale,args.initial_box_size[q],[args.number_of_planewaves[q]],args.reference_length,\
                                    args.cell_updater,args.force_tol,args.stress_tol,args.field_updater]

                        make_input(Phase,REPLACE_lIST,WDIR)
                        #make submit file incase you want to run the simulation individually
                        make_submit(args,Phase)
                        if args.submitpolyfts:
                            os.chdir(WDIR)
                            cmd="qsub submit.sh"
                            subprocess.call(cmd.split())
                            os.chdir(IDIR)
                            time.sleep(1)

                        
                        
                        #runpolyfts for serial
                        if args.runpolyfts:
                            if args.NThreads[q]==1: 
                                os.chdir(WDIR)
Exemplo n.º 2
0
        print('Delete!')
        continue

    if reparam_itter_store_count[i] == len(param_full_order):
        break

    Box_initial = 10

    if reparam_itter_store_count[i] == 0:
        paramlist = [dS, DT, lambda_stress, lambda_force]
        replace_list.append([field_path,chain_list,chiN,npw,\
                             Box_initial,d,jobname,paramlist[0],\
                             paramlist[1],paramlist[2],paramlist[3]])

    else:
        DT = DT * tune
        paramlist = [dS, DT, lambda_stress, lambda_force]
        replace_list.append([field_path,chain_list,chiN,npw,\
                             Box_initial,d,jobname,paramlist[0],\
                             paramlist[1],paramlist[2],paramlist[3]])

    WDIR_NAME = 'L_' + str(Ssweep[i])
    WDIR = os.path.join(IDIR, WDIR_NAME)
    jobstatus = 0
    os.makedirs(WDIR)
    make_input(phase, replace_list[i], WDIR)
    past_field_dir.append(WDIR)
    print('pass')
    i += 1
    itter = +1
Exemplo n.º 3
0
                    chain_list+=sidechain_list
                #pass internal checks
                check_equality(len(chain_list)==0,False,"Need more than 0 chains")
                for l in range(0,len(chain_list),1):
                    check_equality(len(chain_list[l])>6,False,"Too many side chain inputs")
                    check_equality(len(chain_list)!=0,True,"Need more than 0 chains")
                    list_of_checks = [[len(chain_list[l][2]),len(chain_list[l][3]),'check chain species and composition'],\
                                        [np.isclose(np.sum(chain_list[l][3]),1),True,'backbone composition does not sum to 1']]
            
                    for checkchecks in list_of_checks:
                        check_equality(checkchecks[0],checkchecks[1],checkchecks[2])                 
    
                REPLACE_lIST = [fieldpath,chain_list,chiN,d,chain_label,dS,dt,stress_scale,\
                                force_scale,InitialL0Guess[k],SpaceGroup[k]]
                
                make_input(PhaseList[k],REPLACE_lIST,WDIR)
                
                
                if NThreads[k] == 1:
                    submitfile='SEEDS/submit.sh'
                elif NThreads[k] == -1:
                    if PhaseList[k] != 'SIGMA':
                        submitfile='SEEDS/submitGPU.sh'
                    else:
                        submitfile='SEEDS/submitGPU-P100.sh'
                else:
                    submitfile='SEEDS/submitPLL.sh'

                
                
                with open('%s/submit.sh' % WDIR, 'w') as fout: