%
% API Documentation for nMOLDYN
% Module nMOLDYN.Analysis.Structure
%
% Generated by epydoc 3.0.1
% [Thu Oct  8 16:59:58 2009]
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                          Module Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}|(}
\section{Module nMOLDYN.Analysis.Structure}

    \label{nMOLDYN:Analysis:Structure}
\begin{alltt}
Collections of classes for the determination of structure-related properties.

Classes:

    * PairDistributionFunction : sets up a Pair Distribution Function Analysis.
    * CoordinationNumber       : sets up a Coordination Number Analysis.
    * SpatialDensity           : sets up a Spatial Density Analysis.
    * ScrewFit                 : sets up a Screw Fit Analysis.
\end{alltt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.PairDistributionFunction \textit{(class)}|(}
\subsection{Class PairDistributionFunction}

    \label{nMOLDYN:Analysis:Structure:PairDistributionFunction}
\begin{tabular}{cccccc}
% Line for nMOLDYN.Analysis.Analysis.Analysis, linespec=[False]
\multicolumn{2}{r}{\settowidth{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}\multirow{2}{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}}
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
  \\
&&\multicolumn{2}{l}{\textbf{nMOLDYN.Analysis.Structure.PairDistributionFunction}}
\end{tabular}

\begin{alltt}
Sets up a Pair Distribution Function analysis.

A Subclass of nMOLDYN.Analysis.Analysis. 

Constructor: PairDistributionFunction({\textbar}parameters{\textbar} = None)

Arguments:

    - {\textbar}parameters{\textbar} -- a dictionnary of the input parameters, or 'None' to set up the analysis without parameters.
        * trajectory  -- a trajectory file name or an instance of MMTK.Trajectory.Trajectory class.
        * timeinfo    -- a string of the form 'first:last:step' where 'first' is an integer specifying the first frame 
                         number to consider, 'last' is an integer specifying the last frame number to consider and 
                         'step' is an integer specifying the step number between two frames.
        * rvalues     -- a string of the form 'rmin:rmax:dr' where 'rmin' is a float specifying the minimum distance to 
                         consider, 'rmax' is a float specifying the maximum distance value to consider and 'dr' is a float
                         specifying the distance increment. 
        * subset      -- a selection string specifying the atoms to consider for the analysis.
        * deuteration -- a selection string specifying the hydrogen atoms whose atomic parameters will be those of the deuterium.
        * weights     -- a string equal to 'equal', 'mass', 'coherent' , 'incoherent' or 'atomicNumber' that specifies the weighting
                         scheme to use.
        * pdf         -- the output NetCDF file name. A CDL version of this file will also be generated with the '.cdl' extension
                         instead of the '.nc' extension.
        * pyroserver  -- a string specifying if Pyro will be used and how to run the analysis.
    
Running modes:

    - To run the analysis do: a.runAnalysis() where a is the analysis object.
    - To estimate the analysis do: a.estimateAnalysis() where a is the analysis object.
    - To save the analysis to 'file' file name do: a.saveAnalysis(file) where a is the analysis object.

Comments:        
    
    - This code contains a pyrex function for the distance histogram calculation that is based on a FORTRAN code 
      written by Miguel Gonzalez, Insitut Laue Langevin, Grenoble, France.
\end{alltt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    The constructor. Insures that the class can not be instanciated 
    directly from here.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[parameters]

          a dictionnary that contains parameters of the selected analysis.

          \item[statusBar]

          if not None, an instance of nMOLDYN.GUI.Widgets.StatusBar. Will 
          attach a status bar to the selected analysis.

        \end{Ventry}

      \end{quote}

      Overrides: nMOLDYN.Analysis.Analysis.Analysis.\_\_init\_\_

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:PairDistributionFunction:initialize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.PairDistributionFunction \textit{(class)}!nMOLDYN.Analysis.Structure.PairDistributionFunction.initialize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{initialize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Initializes the analysis (e.g. parses and checks input parameters, set 
    some variables ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:PairDistributionFunction:calc}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.PairDistributionFunction \textit{(class)}!nMOLDYN.Analysis.Structure.PairDistributionFunction.calc \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{calc}(\textit{self}, \textit{frameIndex}, \textit{trajname})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Calculates the contribution for one frame.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[frameIndex]

          the index of the frame in {\textbar}self.frameIndexes{\textbar} 
          array.

            {\it (type=integer.)}

          \item[trajname]

          the name of the trajectory file name.

            {\it (type=string)}

        \end{Ventry}

      \end{quote}

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:PairDistributionFunction:combine}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.PairDistributionFunction \textit{(class)}!nMOLDYN.Analysis.Structure.PairDistributionFunction.combine \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{combine}(\textit{self}, \textit{frameIndex}, \textit{x})

\setlength{\parskip}{2ex}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:PairDistributionFunction:finalize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.PairDistributionFunction \textit{(class)}!nMOLDYN.Analysis.Structure.PairDistributionFunction.finalize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{finalize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Finalizes the calculations (e.g. averaging the total term, output files
    creations ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}


\large{\textbf{\textit{Inherited from nMOLDYN.Analysis.Analysis.Analysis\textit{(Section \ref{nMOLDYN:Analysis:Analysis:Analysis})}}}}

\begin{quote}
analysisTime(), buildJobInfo(), buildTimeInfo(), deuterationSelection(), groupSelection(), parseInputParameters(), preLoadTrajectory(), runAnalysis(), saveAnalysis(), setInputParameters(), subsetSelection(), updateJobProgress(), weightingScheme()
\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                            Class Variables                            %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Class Variables}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright i\-n\-p\-u\-t\-P\-a\-r\-a\-m\-e\-t\-e\-r\-s\-N\-a\-m\-e\-s\- & \raggedright \textbf{Value:} 
{\tt 'trajectory', 'timeinfo', 'rvalues', 'subset', 'deuterati\texttt{...}}&\\
\cline{1-2}
\raggedright s\-h\-o\-r\-t\-N\-a\-m\-e\- & \raggedright \textbf{Value:} 
{\tt 'PDF'}&\\
\cline{1-2}
\raggedright c\-a\-n\-B\-e\-E\-s\-t\-i\-m\-a\-t\-e\-d\- & \raggedright \textbf{Value:} 
{\tt True}&\\
\cline{1-2}
\end{longtable}

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.PairDistributionFunction \textit{(class)}|)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.CoordinationNumber \textit{(class)}|(}
\subsection{Class CoordinationNumber}

    \label{nMOLDYN:Analysis:Structure:CoordinationNumber}
\begin{tabular}{cccccc}
% Line for nMOLDYN.Analysis.Analysis.Analysis, linespec=[False]
\multicolumn{2}{r}{\settowidth{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}\multirow{2}{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}}
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
  \\
&&\multicolumn{2}{l}{\textbf{nMOLDYN.Analysis.Structure.CoordinationNumber}}
\end{tabular}

\begin{alltt}
Sets up a Coordination Number analysis.

A Subclass of nMOLDYN.Analysis.Analysis. 

Constructor: CoordinationNumber({\textbar}parameters{\textbar} = None)

Arguments:

    - {\textbar}parameters{\textbar} -- a dictionnary of the input parameters, or 'None' to set up the analysis without parameters.
        * trajectory  -- a trajectory file name or an instance of MMTK.Trajectory.Trajectory class.
        * timeinfo    -- a string of the form 'first:last:step' where 'first' is an integer specifying the first frame 
                         number to consider, 'last' is an integer specifying the last frame number to consider and 
                         'step' is an integer specifying the step number between two frames.
        * rvalues     -- a string of the form 'rmin:rmax:dr' where 'rmin' is a float specifying the minimum distance to 
                         consider, 'rmax' is a float specifying the maximum distance value to consider and 'dr' is a float
                         specifying the distance increment. 
        * group       -- a selection string specifying the groups of atoms that will be used to define the points around which 
                         the coordination number will be computed. For each group, there is one point defined as the center of 
                         gravity of the group.
        * subset      -- a selection string specifying the atoms to consider for the analysis.
        * deuteration -- a selection string specifying the hydrogen atoms whose atomic parameters will be those of the deuterium.
        * cn          -- the output NetCDF file name. A CDL version of this file will also be generated with the '.cdl' extension
                         instead of the '.nc' extension.
        * pyroserver  -- a string specifying if Pyro will be used and how to run the analysis.

Running modes:

    - To run the analysis do: a.runAnalysis() where a is the analysis object.
    - To estimate the analysis do: a.estimateAnalysis() where a is the analysis object.
    - To save the analysis to 'file' file name do: a.saveAnalysis(file) where a is the analysis object.

Comments:        
    
    - This code contains a pyrex function for the distance histogram calculation than enhances significantly its 
      performance.
\end{alltt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    The constructor. Insures that the class can not be instanciated 
    directly from here.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[parameters]

          a dictionnary that contains parameters of the selected analysis.

          \item[statusBar]

          if not None, an instance of nMOLDYN.GUI.Widgets.StatusBar. Will 
          attach a status bar to the selected analysis.

        \end{Ventry}

      \end{quote}

      Overrides: nMOLDYN.Analysis.Analysis.Analysis.\_\_init\_\_

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:CoordinationNumber:initialize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.CoordinationNumber \textit{(class)}!nMOLDYN.Analysis.Structure.CoordinationNumber.initialize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{initialize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Initializes the analysis (e.g. parses and checks input parameters, set 
    some variables ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:CoordinationNumber:calc}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.CoordinationNumber \textit{(class)}!nMOLDYN.Analysis.Structure.CoordinationNumber.calc \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{calc}(\textit{self}, \textit{frameIndex}, \textit{trajname})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Calculates the contribution for one frame.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[frameIndex]

          the index of the frame in {\textbar}self.frameIndexes{\textbar} 
          array.

            {\it (type=integer.)}

          \item[trajname]

          the name of the trajectory file name.

            {\it (type=string)}

        \end{Ventry}

      \end{quote}

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:CoordinationNumber:combine}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.CoordinationNumber \textit{(class)}!nMOLDYN.Analysis.Structure.CoordinationNumber.combine \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{combine}(\textit{self}, \textit{frameIndex}, \textit{x})

\setlength{\parskip}{2ex}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:CoordinationNumber:finalize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.CoordinationNumber \textit{(class)}!nMOLDYN.Analysis.Structure.CoordinationNumber.finalize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{finalize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Finalizes the calculations (e.g. averaging the total term, output files
    creations ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}


\large{\textbf{\textit{Inherited from nMOLDYN.Analysis.Analysis.Analysis\textit{(Section \ref{nMOLDYN:Analysis:Analysis:Analysis})}}}}

\begin{quote}
analysisTime(), buildJobInfo(), buildTimeInfo(), deuterationSelection(), groupSelection(), parseInputParameters(), preLoadTrajectory(), runAnalysis(), saveAnalysis(), setInputParameters(), subsetSelection(), updateJobProgress(), weightingScheme()
\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                            Class Variables                            %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Class Variables}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright i\-n\-p\-u\-t\-P\-a\-r\-a\-m\-e\-t\-e\-r\-s\-N\-a\-m\-e\-s\- & \raggedright \textbf{Value:} 
{\tt 'trajectory', 'timeinfo', 'rvalues', 'group', 'subset', '\texttt{...}}&\\
\cline{1-2}
\raggedright s\-h\-o\-r\-t\-N\-a\-m\-e\- & \raggedright \textbf{Value:} 
{\tt 'CN'}&\\
\cline{1-2}
\raggedright c\-a\-n\-B\-e\-E\-s\-t\-i\-m\-a\-t\-e\-d\- & \raggedright \textbf{Value:} 
{\tt True}&\\
\cline{1-2}
\end{longtable}

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.CoordinationNumber \textit{(class)}|)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}|(}
\subsection{Class ScrewFitAnalysis}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis}
\begin{tabular}{cccccc}
% Line for nMOLDYN.Analysis.Analysis.Analysis, linespec=[False]
\multicolumn{2}{r}{\settowidth{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}\multirow{2}{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}}
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
  \\
&&\multicolumn{2}{l}{\textbf{nMOLDYN.Analysis.Structure.ScrewFitAnalysis}}
\end{tabular}

\begin{alltt}
Set up a Screw Fit analysis.

A Subclass of nMOLDYN.Analysis.Analysis. 

Constructor: ScrewFit({\textbar}parameters{\textbar} = None)

Arguments:

    - {\textbar}parameters{\textbar} -- a dictionnary of the input parameters, or 'None' to set up the analysis without parameters.
        * trajectory  -- a trajectory file name or an instance of MMTK.Trajectory.Trajectory class.
        * timeinfo    -- a string of the form 'first:last:step' where 'first' is an integer specifying the first frame 
                         number to consider, 'last' is an integer specifying the last frame number to consider and 
                         'step' is an integer specifying the step number between two frames.
        * sfa         -- the output NetCDF file name. A CDL version of this file will also be generated with the '.cdl' extension
                         instead of the '.nc' extension.
        * pyroserver  -- a string specifying if Pyro will be used and how to run the analysis.

Running modes:

    - To run the analysis do: a.runAnalysis() where a is the analysis object.
    - To estimate the analysis do: a.estimateAnalysis() where a is the analysis object.
    - To save the analysis to 'file' file name do: a.saveAnalysis(file) where a is the analysis object.
    
Comments:
                                          
    - This code is based on a first implementation made by Paolo Calligari.
    
    - For more details: Kneller, G.R., Calligari, P. Acta Crystallographica , D62, 302-311
\end{alltt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    The constructor. Insures that the class can not be instanciated 
    directly from here.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[parameters]

          a dictionnary that contains parameters of the selected analysis.

          \item[statusBar]

          if not None, an instance of nMOLDYN.GUI.Widgets.StatusBar. Will 
          attach a status bar to the selected analysis.

        \end{Ventry}

      \end{quote}

      Overrides: nMOLDYN.Analysis.Analysis.Analysis.\_\_init\_\_

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:initialize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.initialize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{initialize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Initializes the analysis (e.g. parses and checks input parameters, set 
    some variables ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:calc}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.calc \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{calc}(\textit{self}, \textit{frameIndex}, \textit{trajname})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Calculates the contribution for one frame.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[frameIndex]

          the index of the frame in {\textbar}self.frameIndexes{\textbar} 
          array.

            {\it (type=integer.)}

          \item[trajname]

          the name of the trajectory file name.

            {\it (type=string)}

        \end{Ventry}

      \end{quote}

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:combine}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.combine \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{combine}(\textit{self}, \textit{frameIndex}, \textit{x})

\setlength{\parskip}{2ex}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:finalize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.finalize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{finalize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Finalizes the calculations (e.g. averaging the total term, output files
    creations ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:findQuaternionMatrix}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.findQuaternionMatrix \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{findQuaternionMatrix}(\textit{self}, \textit{peptide}, \textit{point\_ref}, \textit{conf1}, \textit{conf2}={\tt None}, \textit{matrix}={\tt True})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Returns the complete matrix of quaternions compatibles with linear 
    trasformation.{\textbar}conf1{\textbar} is the reference configuration.
    {\textbar}point\_ref{\textbar} is the reference point about which the 
    fit is calculated

\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:findGenericTransformation}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.findGenericTransformation \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{findGenericTransformation}(\textit{self}, \textit{peptide}, \textit{point\_ref}, \textit{conf1}, \textit{conf2}={\tt None})

\setlength{\parskip}{2ex}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:angularDistance}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.angularDistance \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{angularDistance}(\textit{self}, \textit{chain})

\setlength{\parskip}{2ex}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:ScrewFitAnalysis:screwMotionAnalysis}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis.screwMotionAnalysis \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{screwMotionAnalysis}(\textit{self}, \textit{chain})

\setlength{\parskip}{2ex}
\setlength{\parskip}{1ex}
    \end{boxedminipage}


\large{\textbf{\textit{Inherited from nMOLDYN.Analysis.Analysis.Analysis\textit{(Section \ref{nMOLDYN:Analysis:Analysis:Analysis})}}}}

\begin{quote}
analysisTime(), buildJobInfo(), buildTimeInfo(), deuterationSelection(), groupSelection(), parseInputParameters(), preLoadTrajectory(), runAnalysis(), saveAnalysis(), setInputParameters(), subsetSelection(), updateJobProgress(), weightingScheme()
\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                            Class Variables                            %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Class Variables}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright i\-n\-p\-u\-t\-P\-a\-r\-a\-m\-e\-t\-e\-r\-s\-N\-a\-m\-e\-s\- & \raggedright \textbf{Value:} 
{\tt 'trajectory', 'timeinfo', 'sfa', 'pyroserver',}&\\
\cline{1-2}
\raggedright s\-h\-o\-r\-t\-N\-a\-m\-e\- & \raggedright \textbf{Value:} 
{\tt 'SFA'}&\\
\cline{1-2}
\raggedright c\-a\-n\-B\-e\-E\-s\-t\-i\-m\-a\-t\-e\-d\- & \raggedright \textbf{Value:} 
{\tt True}&\\
\cline{1-2}
\end{longtable}

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.ScrewFitAnalysis \textit{(class)}|)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.SpatialDensity \textit{(class)}|(}
\subsection{Class SpatialDensity}

    \label{nMOLDYN:Analysis:Structure:SpatialDensity}
\begin{tabular}{cccccc}
% Line for nMOLDYN.Analysis.Analysis.Analysis, linespec=[False]
\multicolumn{2}{r}{\settowidth{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}\multirow{2}{\BCL}{nMOLDYN.Analysis.Analysis.Analysis}}
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
  \\
&&\multicolumn{2}{l}{\textbf{nMOLDYN.Analysis.Structure.SpatialDensity}}
\end{tabular}

\begin{alltt}
Sets up a Spatial Density analysis.

A Subclass of nMOLDYN.Analysis.Analysis. 

Constructor: SpatialDensity({\textbar}parameters{\textbar} = None)

Arguments:

    - {\textbar}parameters{\textbar} -- a dictionnary of the input parameters, or 'None' to set up the analysis without parameters.
        * trajectory -- a trajectory file name or an instance of MMTK.Trajectory.Trajectory class.
        * timeinfo   -- a string of the form 'first:last:step' where 'first' is an integer specifying the first frame 
                        number to consider, 'last' is an integer specifying the last frame number to consider and 
                        'step' is an integer specifying the step number between two frames.
        * rvalues    -- a string of the form 'rmin:rmax:dr' where 'rmin' is a float specifying the minimum distance to 
                        consider, 'rmax' is a float specifying the maximum distance value to consider and 'dr' is a float
                        specifying the distance increment. 
        * group      -- a selection string specifying the groups of atoms that will be used to define the points around which 
                        the coordination number will be computed. For each group, there is one point defined as the center of 
                        gravity of the group.
        * atomorder  -- a string of the form 'atom1,atom2,atom3' where 'atom1', 'atom2' and 'atom3' are 
                        respectively the MMTK atom names of the atoms in the way they should be ordered.
        * target     -- a selection string specifying the groups of atoms that will be used to define the points around which 
                        the coordination number will be computed. For each group, there is one point defined as the center of 
                        gravity of the group.
        * sd         -- the output NetCDF file name. A CDL version of this file will also be generated with the '.cdl' extension
                        instead of the '.nc' extension.
        * pyroserver -- a string specifying if Pyro will be used and how to run the analysis.

Running modes:

    - To run the analysis do: a.runAnalysis() where a is the analysis object.
    - To estimate the analysis do: a.estimateAnalysis() where a is the analysis object.
    - To save the analysis to 'file' file name do: a.saveAnalysis(file) where a is the analysis object.

Comments:        
    
    - This code contains a pyrex function for the distance histogram calculation than enhances significantly its 
      performance.
\end{alltt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    The constructor. Insures that the class can not be instanciated 
    directly from here.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[parameters]

          a dictionnary that contains parameters of the selected analysis.

          \item[statusBar]

          if not None, an instance of nMOLDYN.GUI.Widgets.StatusBar. Will 
          attach a status bar to the selected analysis.

        \end{Ventry}

      \end{quote}

      Overrides: nMOLDYN.Analysis.Analysis.Analysis.\_\_init\_\_

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:SpatialDensity:initialize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.SpatialDensity \textit{(class)}!nMOLDYN.Analysis.Structure.SpatialDensity.initialize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{initialize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Initializes the analysis (e.g. parses and checks input parameters, set 
    some variables ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:SpatialDensity:calc}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.SpatialDensity \textit{(class)}!nMOLDYN.Analysis.Structure.SpatialDensity.calc \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{calc}(\textit{self}, \textit{frameIndex}, \textit{trajname})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Calculates the contribution for one frame.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxxxx}

          \item[frameIndex]

          the index of the frame in {\textbar}self.frameIndexes{\textbar} 
          array.

            {\it (type=integer.)}

          \item[trajname]

          the name of the trajectory file name.

            {\it (type=string)}

        \end{Ventry}

      \end{quote}

    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:SpatialDensity:combine}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.SpatialDensity \textit{(class)}!nMOLDYN.Analysis.Structure.SpatialDensity.combine \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{combine}(\textit{self}, \textit{frameIndex}, \textit{x})

\setlength{\parskip}{2ex}
\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:SpatialDensity:finalize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.SpatialDensity \textit{(class)}!nMOLDYN.Analysis.Structure.SpatialDensity.finalize \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{finalize}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Finalizes the calculations (e.g. averaging the total term, output files
    creations ...).

\setlength{\parskip}{1ex}
    \end{boxedminipage}

    \label{nMOLDYN:Analysis:Structure:SpatialDensity:constructBasisFromAtoms}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.SpatialDensity \textit{(class)}!nMOLDYN.Analysis.Structure.SpatialDensity.constructBasisFromAtoms \textit{(method)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{constructBasisFromAtoms}(\textit{self}, \textit{triplet})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
\begin{alltt}
This method construct a set of three oriented orthonormal axes i, j, k from a triplet of atoms
such as (i,j,k) forms a clockwise orthonormal basis.
If a1, a2 and a3 stand respectively for the three atoms of the triplet then:
    vector1 = (vector(a1,a2)\_normalized + vector(a1,a3)\_normalized)\_normalized
    vector3 = (vector1 {\textasciicircum} vector(a1,a3))\_normalized and correclty oriented
    vector2 = (vector3 {\textasciicircum} vector1)\_normalized

@param triplet: the triplet of atoms.
@type triplet: a list of three MMTK Atoms

@return: the three axis.
@rtype: a list of three Scientific Vector   
\end{alltt}

\setlength{\parskip}{1ex}
    \end{boxedminipage}


\large{\textbf{\textit{Inherited from nMOLDYN.Analysis.Analysis.Analysis\textit{(Section \ref{nMOLDYN:Analysis:Analysis:Analysis})}}}}

\begin{quote}
analysisTime(), buildJobInfo(), buildTimeInfo(), deuterationSelection(), groupSelection(), parseInputParameters(), preLoadTrajectory(), runAnalysis(), saveAnalysis(), setInputParameters(), subsetSelection(), updateJobProgress(), weightingScheme()
\end{quote}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                            Class Variables                            %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Class Variables}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright i\-n\-p\-u\-t\-P\-a\-r\-a\-m\-e\-t\-e\-r\-s\-N\-a\-m\-e\-s\- & \raggedright \textbf{Value:} 
{\tt 'trajectory', 'timeinfo', 'rvalues', 'thetavalues', 'phiv\texttt{...}}&\\
\cline{1-2}
\raggedright s\-h\-o\-r\-t\-N\-a\-m\-e\- & \raggedright \textbf{Value:} 
{\tt 'SD'}&\\
\cline{1-2}
\raggedright c\-a\-n\-B\-e\-E\-s\-t\-i\-m\-a\-t\-e\-d\- & \raggedright \textbf{Value:} 
{\tt True}&\\
\cline{1-2}
\end{longtable}

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}!nMOLDYN.Analysis.Structure.SpatialDensity \textit{(class)}|)}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.Structure \textit{(module)}|)}
