示例#1
0
def test_lores2d(phi):
  from sasModeling.pointsmodelpy import pointsmodelpy 
  from sasModeling.iqPy import iqPy
  from sasModeling.geoshapespy import geoshapespy

  #lores model is to hold several geometric objects
  lm = pointsmodelpy.new_loresmodel(0.1)

  #generate single geometry shape
  c = geoshapespy.new_cylinder(10,40)
  geoshapespy.set_center(c,1,1,1)
  geoshapespy.set_orientation(c,0,0,0)

  #add single geometry shape to lores model
  pointsmodelpy.lores_add(lm,c,3.0)

  #retrieve the points from lores model for sas calculation
  vp = pointsmodelpy.new_point3dvec()
  pointsmodelpy.get_lorespoints(lm,vp)

  #Calculate I(Q) and P(r) 2D
  pointsmodelpy.distdistribution_xy(lm,vp)
  pointsmodelpy.outputPR_xy(lm,"out_xy.pr")
  iq = iqPy.new_iq(100,0.001, 0.3)
  pointsmodelpy.calculateIQ_2D(lm,iq,phi)
  iqPy.OutputIQ(iq, "out_xy.iq")
示例#2
0
def test_lores2d(phi):
    from sasModeling.pointsmodelpy import pointsmodelpy
    from sasModeling.iqPy import iqPy
    from sasModeling.geoshapespy import geoshapespy

    #lores model is to hold several geometric objects
    lm = pointsmodelpy.new_loresmodel(0.1)

    #generate single geometry shape
    c = geoshapespy.new_cylinder(10, 40)
    geoshapespy.set_center(c, 1, 1, 1)
    geoshapespy.set_orientation(c, 0, 0, 0)

    #add single geometry shape to lores model
    pointsmodelpy.lores_add(lm, c, 3.0)

    #retrieve the points from lores model for sas calculation
    vp = pointsmodelpy.new_point3dvec()
    pointsmodelpy.get_lorespoints(lm, vp)

    #Calculate I(Q) and P(r) 2D
    pointsmodelpy.distdistribution_xy(lm, vp)
    pointsmodelpy.outputPR_xy(lm, "out_xy.pr")
    iq = iqPy.new_iq(100, 0.001, 0.3)
    pointsmodelpy.calculateIQ_2D(lm, iq, phi)
    iqPy.OutputIQ(iq, "out_xy.iq")
示例#3
0
    #a = geoshapespy.new_sphere(20)
    
    iq = iqPy.new_iq(100,0.001, 0.3)

#    geoshapespy.set_orientation(a,20,40,60)
#    geoshapespy.set_center(a,0,0,0)
    lm = pointsmodelpy.new_loresmodel(0.1)
#    pointsmodelpy.lores_add(lm,a,1.0)

#    b = geoshapespy.new_sphere(15)
#    geoshapespy.set_center(b,15,15,15)
#    pointsmodelpy.lores_add(lm,b,2.0)

    
    c = geoshapespy.new_cylinder(10,40)
    geoshapespy.set_center(c,1,1,1)
    geoshapespy.set_orientation(c,0,0,0)
    pointsmodelpy.lores_add(lm,c,3.0)
    
#    d = geoshapespy.new_ellipsoid(10,8,6)
#    geoshapespy.set_center(d,3,3,3)
#    geoshapespy.set_orientation(c,30,30,30)
#    pointsmodelpy.lores_add(lm,d,1.0)

    vp = pointsmodelpy.new_point3dvec()
    pointsmodelpy.get_lorespoints(lm,vp)
    pointsmodelpy.outputPDB(lm,vp,"modelpy.pseudo.pdb")

    print "calculating distance distribution"
    rmax = pointsmodelpy.get_lores_pr(lm,vp)
    print "finish calculating get_lores_pr, and rmax is:", rmax
示例#4
0
if __name__ == "__main__":
    from sasModeling.pointsmodelpy import pointsmodelpy
    from sasModeling.iqPy import iqPy
    from sasModeling.geoshapespy import geoshapespy

    a = geoshapespy.new_sphere(10)
    lm = pointsmodelpy.new_loresmodel(0.0005)
    pointsmodelpy.lores_add(lm, a, 1.0)
    b = geoshapespy.new_sphere(20)
    geoshapespy.set_center(b, 20, 20, 20)
    pointsmodelpy.lores_add(lm, b, -1.0)

    vp = pointsmodelpy.new_point3dvec()
    pointsmodelpy.get_lorespoints(lm, vp)

    pointsmodelpy.get_lores_pr(lm, vp)
示例#5
0
if __name__ == "__main__":
  from sasModeling.pointsmodelpy import pointsmodelpy
  from sasModeling.iqPy import iqPy
  from sasModeling.geoshapespy import geoshapespy

  a = geoshapespy.new_sphere(10)
  lm = pointsmodelpy.new_loresmodel(0.0005)
  pointsmodelpy.lores_add(lm,a,1.0)
  b = geoshapespy.new_sphere(20)
  geoshapespy.set_center(b,20,20,20)
  pointsmodelpy.lores_add(lm,b,-1.0)

  vp = pointsmodelpy.new_point3dvec()
  pointsmodelpy.get_lorespoints(lm,vp)

  pointsmodelpy.get_lores_pr(lm,vp)
示例#6
0
    #    a = geoshapespy.new_singlehelix(10,2,30,2)
    #a = geoshapespy.new_sphere(20)

    iq = iqPy.new_iq(100, 0.001, 0.3)

    #    geoshapespy.set_orientation(a,20,40,60)
    #    geoshapespy.set_center(a,0,0,0)
    lm = pointsmodelpy.new_loresmodel(0.1)
    #    pointsmodelpy.lores_add(lm,a,1.0)

    #    b = geoshapespy.new_sphere(15)
    #    geoshapespy.set_center(b,15,15,15)
    #    pointsmodelpy.lores_add(lm,b,2.0)

    c = geoshapespy.new_cylinder(10, 40)
    geoshapespy.set_center(c, 1, 1, 1)
    geoshapespy.set_orientation(c, 0, 0, 0)
    pointsmodelpy.lores_add(lm, c, 3.0)

    #    d = geoshapespy.new_ellipsoid(10,8,6)
    #    geoshapespy.set_center(d,3,3,3)
    #    geoshapespy.set_orientation(c,30,30,30)
    #    pointsmodelpy.lores_add(lm,d,1.0)

    vp = pointsmodelpy.new_point3dvec()
    pointsmodelpy.get_lorespoints(lm, vp)
    pointsmodelpy.outputPDB(lm, vp, "modelpy.pseudo.pdb")

    print("calculating distance distribution")
    rmax = pointsmodelpy.get_lores_pr(lm, vp)
    print("finish calculating get_lores_pr, and rmax is:", rmax)