2 from __future__
import print_function
12 def get_basic_config():
13 config = Configuration()
14 IMP.npctransport.set_default_configuration(config)
15 config.statistics_fraction.lower=0.9
17 config.interaction_k.lower=10
18 config.interaction_range.lower=1
20 config.backbone_k.lower=1
22 config.time_step_factor.lower=3
24 config.excluded_volume_k.lower=20
25 config.nonspecific_range.lower=2
26 config.nonspecific_k.lower=0.01
27 config.slack.lower = 8
28 config.number_of_trials=1
29 config.dump_interval_ns=0.1
30 config.simulation_time_ns=500
31 config.angular_D_factor.lower=0.3
32 config.statistics_interval_ns=0.05
35 config.box_is_on.lower=1
36 config.box_side.lower=400
37 config.slab_is_on.lower=0
38 config.slab_thickness.lower=150
39 config.tunnel_radius.lower=75
43 def add_interactions_for_fg(fg_name,
47 interactionFG_KAP= IMP.npctransport.add_interaction(config,
50 interaction_k=k_kap_lower,
53 create_range(interactionFG_KAP.interaction_k,
54 k_kap_lower, k_kap_upper,
56 interactionFG_CRAP= IMP.npctransport.add_interaction(config,
64 import google.protobuf
66 print(
'npctransport python module requires the python protobuf package.\n'
67 'One way to install the protobuf python package is using pip - "pip install protobuf" on a local'
68 ' python installation, see documentation of pip.')
70 config= get_basic_config()
71 config.dump_interval_ns=1
72 config.simulation_time_ns=0.01
73 config.box_is_on.lower=1
74 config.box_side.lower=200
75 config.slab_is_on.lower=0
76 config.slab_thickness.lower=150
77 config.tunnel_radius.lower=90
79 fg= IMP.npctransport.add_fg_type(config,
85 rest_length_factor = 1.5)
86 kap= IMP.npctransport.add_float_type(config,
91 nonspecifics= IMP.npctransport.add_float_type(config,
98 add_interactions_for_fg(
"my_fg",
105 config.nonspecific_range.lower= 1.0
106 config.nonspecific_k.lower= 1.5
111 interactionFG_FG= IMP.npctransport.add_interaction(config,
115 interaction_range= 2)
117 create_range(interactionFG_FG.interaction_k,
122 f=open(outfile,
"wb")
123 f.write(config.SerializeToString())
std::string create_temporary_file_name(std::string prefix="imp_temp", std::string suffix="")
Create a temporary file.