Show
Ignore:
Timestamp:
09/06/10 16:55:55 (21 months ago)
Author:
farhi
Message:

samples: updated headers, fixed usage of nb_toms = multiplicity of chemical formula within unit cell

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/nlib/samples/PowderN.comp

    r2923 r2927  
    4949*   transparently, so that it can be used like a regular sample object. 
    5050*   It supports the OFF and NOFF file format but not COFF (colored faces).  
    51 *   Such files may be generated from XYZ data using qhull/powercrust, and  
    52 *   viewed with geomview 
     51*   Such files may be generated from XYZ data using: 
     52*     qhull < coordinates.xyz Qx Qv Tv o > geomview.off  
     53*   and viewed with geomview or java -jar jroff.jar (see below). 
    5354*   The default size of the object depends of the OFF file data, but its  
    5455*   bounding box may be resized using xwidth,yheight and zdepth. 
     
    158159* weight:   Atomic/molecular weight of material [g/mol] 
    159160* density:  Density of material. rho=density/weight/1e24*N_A. [g/cm^3] 
    160 * nb_atoms: Number of atoms per unit cell [1] 
     161* nb_atoms: Number of sub-unit per unit cell, that is ratio of sigma for chemical formula to sigma per unit cell [1] 
    161162* 
    162163* %L 
     
    171172* Cross sections for compounds:       http://www.ncnr.nist.gov/resources/sldcalc.html 
    172173* %L 
    173 * Fullprof powder refinement:         http://www-llb.cea.fr/fullweb/fp2k/fp2k.htm 
    174 * %L 
    175174* Web Elements                        http://www.webelements.com/ 
    176175* %L 
    177 * Geomview and Object File Format (OFF) <http|://www.geomview.org> 
    178 * %L 
    179 * Powercrust/qhull <http://www.cs.utexas.edu/users/amenta/powercrust> 
     176* Fullprof powder refinement:         http://www.ill.eu/sites/fullprof/index.html 
     177* %L 
     178* Crystallographica software:         http://www.crystallographica.com/ 
     179* %L 
     180* Geomview and Object File Format (OFF) <http://www.geomview.org> 
     181* %L 
     182* Java version of Geomview (display only) jroff.jar <http://www.holmes3d.net/graphics/roffview/>  
     183* %L 
     184* Powercrust/qhull <http://qhull.org> 
    180185* 
    181186* %E 
     
    276281      "density", 
    277282      "weight", 
    278       "nb_atoms", 
     283      "nb_atoms","multiplicity", 
    279284      NULL); 
    280285 
     
    303308      if (parsing[21] && !info->at_weight)     info->at_weight    =atof(parsing[21]); 
    304309      if (parsing[22] && info->at_nb <= 1)  info->at_nb    =atof(parsing[22]); 
    305       for (i=0; i<=22; i++) if (parsing[i]) free(parsing[i]); 
     310      if (parsing[23] && info->at_nb <= 1)  info->at_nb    =atof(parsing[23]); 
     311      for (i=0; i<=23; i++) if (parsing[i]) free(parsing[i]); 
    306312      free(parsing); 
    307313    } 
     
    535541  } 
    536542 
     543  /* compute the scattering unit density from material weight and density */ 
     544  /* the weight of the scattering element is the chemical formula molecular weight  
     545   * times the nb of chemical formulae in the scattering element (nb_atoms) */ 
    537546  if (!line_info.V_0 && line_info.at_nb > 0 
    538547    && line_info.at_weight > 0 && line_info.rho > 0) { 
     
    541550    line_info.V_0 = line_info.at_nb 
    542551      /(line_info.rho/line_info.at_weight/1e24*6.02214199e23); 
     552  } 
     553   
     554  /* the scattering unit cross sections are the chemical formula onces  
     555   * times the nb of chemical formulae in the scattering element */ 
     556  if (line_info.at_nb > 0) {  
     557    line_info.sigma_a *= line_info.at_nb; line_info.sigma_i *= line_info.at_nb; 
    543558  } 
    544559