Beispiel #1
0
 def __init__(O, mersenne_twister, n_sites):
   if (n_sites > 0):
     O.sites = [matrix.col(mersenne_twister.random_double_point_on_sphere())]
   while (len(O.sites) != n_sites):
     O.sites.append(O.sites[0]
       + matrix.col(mersenne_twister.random_double_point_on_sphere()))
   O.A = joint_lib.spherical_alignment(sites=O.sites)
   O.I = spatial_inertia_from_sites(sites=O.sites, alignment_T=O.A.T0b)
   #
   O.wells = create_wells(sites=O.sites, mersenne_twister=mersenne_twister)
   #
   qE = matrix.col(mersenne_twister.random_double(size=4)).normalize()
   O.J = joint_lib.spherical(type="euler_params", qE=qE)
   O.qd = matrix.col(mersenne_twister.random_double(size=3)*2-1)
Beispiel #2
0
 def __init__(O, mersenne_twister, n_sites):
   if (n_sites > 0):
     O.sites = [matrix.col(mersenne_twister.random_double_point_on_sphere())]
   while (len(O.sites) != n_sites):
     O.sites.append(O.sites[0]
       + matrix.col(mersenne_twister.random_double_point_on_sphere()))
   O.A = joint_lib.spherical_alignment(sites=O.sites)
   O.I = spatial_inertia_from_sites(sites=O.sites, alignment_T=O.A.T0b)
   #
   O.wells = create_wells(sites=O.sites, mersenne_twister=mersenne_twister)
   #
   qE = matrix.col(mersenne_twister.random_double(size=4)).normalize()
   O.J = joint_lib.spherical(type="euler_params", qE=qE)
   O.qd = matrix.col(mersenne_twister.random_double(size=3)*2-1)
 def __init__(O, sites, wells, spherical_type):
   O.sites = sites
   O.A = joint_lib.spherical_alignment(sites=O.sites)
   O.wells = wells
   O.spherical_type = spherical_type
   O.J = spherical_type(qE=None)
 def __init__(O, sites, wells, spherical_type):
     O.sites = sites
     O.A = joint_lib.spherical_alignment(sites=O.sites)
     O.wells = wells
     O.spherical_type = spherical_type
     O.J = spherical_type(qE=None)