Revision | 5feb556a0a6ec4a1f923650e35046a47ec72d4fe (tree) |
---|---|
Zeit | 2008-04-16 07:20:32 |
Autor | iselllo |
Commiter | iselllo |
Now diffusion_many_clusters.py also works out the trajectory-averaged
diffusion coefficient, but it does not seem very useful. I also
re-calculate the effective radius using the ensemble-averaged diffusion
coefficient.
@@ -964,6 +964,7 @@ | ||
964 | 964 | my_delta_r_sq=pos_results[:,6] |
965 | 965 | delta_r_sq_formed=my_delta_r_sq[cluster_formed] |
966 | 966 | |
967 | +p.save("delta_r_sq_time.dat",delta_r_sq_formed) | |
967 | 968 | |
968 | 969 | lin_fit=stats.linregress(time_formed,delta_r_sq_formed) |
969 | 970 |
@@ -1243,6 +1244,55 @@ | ||
1243 | 1244 | print "delta_v_sq_time_aver is, ", delta_v_sq_time_aver |
1244 | 1245 | |
1245 | 1246 | |
1247 | + | |
1248 | + | |
1249 | + | |
1250 | + | |
1251 | + | |
1252 | + | |
1253 | + | |
1254 | +def Diff(kT,mu,r_eff): | |
1255 | + D=kT/(6.*s.pi*mu*r_eff) | |
1256 | + return D | |
1257 | + | |
1258 | +def R_mob(kT,mu, D): | |
1259 | + r_eff=kT/(6.*s.pi*mu*D) | |
1260 | + | |
1261 | + return r_eff | |
1262 | + | |
1263 | + | |
1264 | + | |
1265 | + | |
1266 | +kT=0.5 | |
1267 | +mu=1./(3.*s.pi) | |
1268 | + | |
1269 | +Diff_R_h=Diff(kT,mu,R_h_mean) | |
1270 | + | |
1271 | + | |
1272 | +Diff_R_gyr=Diff(kT,mu,R_gyr_mean) | |
1273 | + | |
1274 | +print "D calculated with R_gyr is, ", Diff_R_gyr | |
1275 | + | |
1276 | +print "D calculated with R_h is, ", Diff_R_h | |
1277 | + | |
1278 | +R_mobility=R_mob(kT,mu,Diff_coeff) | |
1279 | + | |
1280 | +print "The effective mobility radius is ", R_mobility | |
1281 | + | |
1282 | +print "the ratio R_mobility/R_gyration is, ", R_mobility/R_gyr_mean | |
1283 | + | |
1284 | +print "the ratio R_mobility/R_hydro_mean is, ", R_mobility/R_h_mean | |
1285 | + | |
1286 | +# now I re-calculate the displacement for a given configuration as | |
1287 | + | |
1288 | + | |
1289 | + | |
1290 | + | |
1291 | + | |
1292 | + | |
1293 | + | |
1294 | + | |
1295 | + | |
1246 | 1296 | #Now I calculate the diffusion coefficient from the collected cluster positions |
1247 | 1297 | |
1248 | 1298 | print "s.shape(R_cm_arr) is, ", s.shape(R_cm_arr) |
@@ -1289,39 +1339,29 @@ | ||
1289 | 1339 | |
1290 | 1340 | |
1291 | 1341 | |
1342 | +#delta_r_sq_formed | |
1292 | 1343 | |
1293 | -def Diff(kT,mu,r_eff): | |
1294 | - D=kT/(6.*s.pi*mu*r_eff) | |
1295 | - return D | |
1344 | +i=70 | |
1296 | 1345 | |
1297 | -def R_mob(kT,mu, D): | |
1298 | - r_eff=kT/(6.*s.pi*mu*D) | |
1346 | +print "I select time configuration (numbered from 0!!!), ", i | |
1299 | 1347 | |
1300 | - return r_eff | |
1348 | +test_x_cm=R_cm_arr[:,(i*3)] | |
1349 | +test_y_cm=R_cm_arr[:,(i*3+1)] | |
1350 | +test_z_cm=R_cm_arr[:,(i*3+2)] | |
1351 | + | |
1352 | +delta_x_sq_test=test_x_cm.var() | |
1353 | +delta_y_sq_test=test_y_cm.var() | |
1354 | +delta_z_sq_test=test_z_cm.var() | |
1355 | + | |
1356 | +delta_r_sq_test=delta_x_sq_test+delta_y_sq_test+delta_z_sq_test | |
1357 | + | |
1358 | +print "delta_r_sq_test is, ", delta_r_sq_test | |
1301 | 1359 | |
1302 | 1360 | |
1303 | 1361 | |
1304 | 1362 | |
1305 | -kT=0.5 | |
1306 | -mu=1./(3.*s.pi) | |
1307 | - | |
1308 | -Diff_R_h=Diff(kT,mu,R_h_mean) | |
1309 | - | |
1310 | - | |
1311 | -Diff_R_gyr=Diff(kT,mu,R_gyr_mean) | |
1312 | - | |
1313 | -print "D calculated with R_gyr is, ", Diff_R_gyr | |
1314 | - | |
1315 | -print "D calculated with R_h is, ", Diff_R_h | |
1316 | - | |
1317 | -R_mobility=R_mob(kT,mu,D_mean) | |
1318 | - | |
1319 | -print "The effective mobility radius is ", R_mobility | |
1320 | - | |
1321 | -print "the ratio R_mobility/R_gyration is, ", R_mobility/R_gyr_mean | |
1322 | - | |
1323 | -print "the ratio R_mobility/R_hydro_mean is, ", R_mobility/R_h_mean | |
1324 | 1363 | |
1325 | 1364 | |
1326 | 1365 | |
1327 | 1366 | print "So far so good" |
1367 | + |