How to use get_cc method in autotest

Best Python code snippet using autotest_python Github


Full Screen

...31ATOM 18 CA PHE A 2 8.874 10.605 8.831 1.00 10.00 C32TER33END34"""35def get_cc(mc1, mc2, xrs):36 crystal_gridding = mc1.crystal_gridding(37 d_min = mc1.d_min(),38 symmetry_flags = maptbx.use_space_group_symmetry,39 resolution_factor = 0.25)40 fft_map = miller.fft_map(41 crystal_gridding = crystal_gridding,42 fourier_coefficients = mc1)43 fft_map.apply_sigma_scaling()44 m1 = fft_map.real_map_unpadded()45 fft_map = miller.fft_map(46 crystal_gridding = crystal_gridding,47 fourier_coefficients = mc2)48 fft_map.apply_sigma_scaling()49 m2 = fft_map.real_map_unpadded()50 assert m1.focus()==m2.focus()51 assert m1.all()==m2.all()52 sel = maptbx.grid_indices_around_sites(53 unit_cell = mc1.unit_cell(),54 fft_n_real = m1.focus(),55 fft_m_real = m1.all(),56 sites_cart = flex.vec3_double(xrs.sites_cart()),57 site_radii = flex.double([1.5]*xrs.scatterers().size()))58 cc = flex.linear_correlation(, def md(m, xrs):60 r = flex.double()61 for sf in xrs.sites_frac():62 r.append(m.eight_point_interpolation(sf))63 return flex.mean(r)64 return cc, md(m=m1, xrs=xrs), md(m=m2, xrs=xrs)65def run(args):66 pdb_inp = iotbx.pdb.input(source_info=None, lines=pdb_str)67 ph = pdb_inp.construct_hierarchy()68 ph.write_pdb_file(file_name="m.pdb")69 xrs = pdb_inp.xray_structure_simple()70 sel = ph.atom_selection_cache().selection("resseq 1")71 xrs1 = sel)72 xrs2 = #74 F = xrs.structure_factors(d_min=1.5).f_calc()75 FB = xrs1.structure_factors(d_min=1.5).f_calc()76 FC = FB.phase_transfer(phase_source=F)77 #78 mtz_dataset = abs(FB).as_mtz_dataset(column_root_label="F-obs")79 mtz_dataset.add_miller_array(miller_array=FB.generate_r_free_flags(),80 column_root_label="R-free-flags")81 mtz_object = mtz_dataset.mtz_object()82 mtz_object.write(file_name = "data.mtz")83 #84 mtz_dataset = F.as_mtz_dataset(column_root_label="f")85 mtz_dataset.add_miller_array(miller_array=FB, column_root_label="FB")86 mtz_dataset.add_miller_array(miller_array=FC, column_root_label="FC")87 mtz_dataset.add_miller_array(miller_array=abs(FB), column_root_label="FOBS")88 #89 fmodel = mmtbx.f_model.manager(f_obs = abs(FB), xray_structure = xrs)90 # mc is model biased: one should not see any density for resseq 291 mc = fmodel.electron_density_map().map_coefficients(92 map_type = "Fo",93 isotropize = False,94 fill_missing = False)95 #96 print(get_cc(mc1=mc, mc2=F, xrs=xrs1), get_cc(mc1=mc, mc2=F, xrs=xrs2))97 print(get_cc(mc1=mc, mc2=FB, xrs=xrs1), get_cc(mc1=mc, mc2=FB, xrs=xrs2))98 print(get_cc(mc1=mc, mc2=FC, xrs=xrs1), get_cc(mc1=mc, mc2=FC, xrs=xrs2))99 print()100 #101 crystal_gridding = fmodel.f_obs().crystal_gridding(102 d_min = fmodel.f_obs().d_min(),103 symmetry_flags = maptbx.use_space_group_symmetry,104 resolution_factor = 0.25)105 #106 oo = crystal_gridding = crystal_gridding,108 full_resolution_map = False,109 fmodel = fmodel.deep_copy(),110 box_size_as_fraction = 0.2)111 mco = oo.map_coefficients(filter_noise=False)112 print(get_cc(mc1=mco, mc2=F, xrs=xrs1), get_cc(mc1=mco, mc2=F, xrs=xrs2))113 #114 mtz_dataset.add_miller_array(miller_array=mco, column_root_label="O")115 mtz_dataset.add_miller_array(miller_array=mc, column_root_label="mc")116 #117 mtz_object = mtz_dataset.mtz_object()118 mtz_object.write(file_name = "m.mtz")119if (__name__ == "__main__"):...

Full Screen

Full Screen Github


Full Screen

...10d = None11character().create_cc_nx(cc, 0, constitution*6, 'long', reset_to="0")12#return f'''embed -title "Test" -desc "{character().resistances}" '''13if help:14 return f'''embed -title "{name} considers getting another drink" -desc "What's one more, right?\n\n**Intoxication**\n{character().get_cc(cc)}/{character().get_cc_max(cc)}\n\n**Stage**\n{floor(character().get_cc(cc)/constitution)}/6"'''15else:16 for x in drinks:17 if args[0].lower() in x.lower():18 au += drinks[x]19 d = x20 if not d:21 return f'''embed -title "{name} drinks...something we don't sell here" -desc "Check your spelling of the drink!" '''22 au = int(au/2) if "poison" in str(character().resistances.resist) else au23 #return f'''embed -title "Test" -desc "{au}" '''24 au = int(au*2) if get('size','Medium') == "Small" or get('size','Medium') == "Tiny" else au25 #return f'''embed -title "Test" -desc "{au}" '''26 character().mod_cc(cc, au)27 cs = floor(character().get_cc(cc)/constitution)28 drunk = statlist[cs]29 if d == "Phoenix Fire":30 beakRoll = roll("1d4")31 beakd = this["Beak"][str(beakRoll)]32 if beakRoll == 1:33 dmg = vroll("1d4[fire]")34 totaldmg = dmg.total35 character().modify_hp(-totaldmg)36 return f'''embed -title "{name} drinks {d} and is {drunk}!" -desc "{status[drunk]}\n\n**Talon of the Phoenix**\nYou take {dmg} fire damage as the drink burns your stomach internally\n\n**Intoxication**\n{character().get_cc(cc)}/{character().get_cc_max(cc)}\n\n**Stage**\n{cs}/6\n\n**{name}**\n{character().hp_str()}" '''37 return f'''embed -title "{name} drinks {d} and is {drunk}!" -desc "{status[drunk]}\n\n**Talon of the Phoenix**\n{beakd}\n\n**Intoxication**\n{character().get_cc(cc)}/{character().get_cc_max(cc)}\n\n**Stage**\n{cs}/6" '''38 return f'''embed -title "{name} drinks {d} and is {drunk}!" -desc "{status[drunk]}\n\n**Intoxication**\n{character().get_cc(cc)}/{character().get_cc_max(cc)}\n\n**Stage**\n{cs}/6" '''39</drac2>40-thumb "<image>"...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:


You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?