%
% API Documentation for nMOLDYN
% Module nMOLDYN.Analysis.NMR
%
% 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.NMR \textit{(module)}|(}
\section{Module nMOLDYN.Analysis.NMR}

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

Classes:

    * OrderParameter             : sets up an order parameter analysis.
    * OrderParameterContactModel : sets up an order parameter analysis using the contact model approach.
\end{alltt}


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

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

    \label{nMOLDYN:Analysis:NMR:OrderParameter}
\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.NMR.OrderParameter}}
\end{tabular}

\begin{alltt}
Sets up an order parameter analysis.

A Subclass of nMOLDYN.Analysis.Analysis. 

Constructor: OrderParameter({\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.
        * group              -- a selection string specifying the groups of atoms that will define the vectors on which the 
                                analysis will be computed. Each group must contain two and only two atoms.
        * 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.
        * op                 -- 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 Vania Calandrini.
\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:NMR:OrderParameter:initialize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameter \textit{(class)}!nMOLDYN.Analysis.NMR.OrderParameter.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:NMR:OrderParameter:calc}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameter \textit{(class)}!nMOLDYN.Analysis.NMR.OrderParameter.calc \textit{(method)}}

    \vspace{0.5ex}

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

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

    \vspace{-1.5ex}

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

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

      \begin{quote}
        \begin{Ventry}{xxxxxxxxx}

          \item[bondIndex]

          the index of the group in {\textbar}self.bond{\textbar} list.

            {\it (type=integer.)}

          \item[trajname]

          the name of the trajectory file name.

            {\it (type=string)}

        \end{Ventry}

      \end{quote}

    \end{boxedminipage}

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

    \vspace{0.5ex}

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

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

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

    \label{nMOLDYN:Analysis:NMR:OrderParameter:finalize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameter \textit{(class)}!nMOLDYN.Analysis.NMR.OrderParameter.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', 'bond', 'atomorder', 'op', 'pyr\texttt{...}}&\\
\cline{1-2}
\raggedright s\-h\-o\-r\-t\-N\-a\-m\-e\- & \raggedright \textbf{Value:} 
{\tt 'OP'}&\\
\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.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameter \textit{(class)}|)}

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

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

    \label{nMOLDYN:Analysis:NMR:OrderParameterContactModel}
\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.NMR.OrderParameterContactModel}}
\end{tabular}

\begin{alltt}
Sets up an order parameter analysis using the contact model .

A Subclass of nMOLDYN.Analysis.Analysis. 

Constructor: OrderParameterContactModel({\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.
        * opcm       -- 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 adapted from the s2predict code developped by F. Zhang and R. Bruschweiler and available in:
      http://nmr.clarku.edu/software/S2/s2predict.html

    - For more details about the method: Zhang, F., Bruschweiler, R. J. AM. Chem. Soc. 2002, 124, 12654-12655.
\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:NMR:OrderParameterContactModel:initialize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel \textit{(class)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel.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:NMR:OrderParameterContactModel:calc}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel \textit{(class)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel.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 group.

\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:NMR:OrderParameterContactModel:combine}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel \textit{(class)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel.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:NMR:OrderParameterContactModel:finalize}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel \textit{(class)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel.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', 'opcm', 'pyroserver',}&\\
\cline{1-2}
\raggedright s\-h\-o\-r\-t\-N\-a\-m\-e\- & \raggedright \textbf{Value:} 
{\tt 'OPCM'}&\\
\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.NMR \textit{(module)}!nMOLDYN.Analysis.NMR.OrderParameterContactModel \textit{(class)}|)}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Analysis \textit{(package)}!nMOLDYN.Analysis.NMR \textit{(module)}|)}
