Chemistry Reference
In-Depth Information
%Eric Barth
%Kalamazoo College, 2007
xc ¼ x(9:10,:) þ x(11:12,:);
xcn ¼ sum(xc.^2);
theta ¼ (acos(xc(1,:)./sqrt(xcn)));
%%%%%%%%%%end of script %%%%%%%%%%%%%%%%%%%%%%
function [freq,pp] ¼ powerspectrum(data,N,h);
%[freq,pp] ¼ powerspectrum(data,N,h);
% display data with
% plot(freq,pp)
%Compute power spectrum
%Input Arguments
% data time series data
% N number of steps in data
% h timestep of data
%
%Output Arguments
% freq vector of frequencies
% pp vector of power spectra
%
%Eric Barth
%Kalamazoo College, 2007
timfac ¼ 48.88826; %specific to akma MD model
T ¼ timfac*h*N;
freq ¼ [0:N/2-1]/T;
p ¼ abs(fft(data))/(N/2);
pp ¼ p(1:N/2).^2;
%%%%%%%%%%end of function %%%%%%%%%%%%%%%%%%%%%%
ACKNOWLEDGMENT
This chapter is based in part upon work supported by the National Science Foundation
under Grant No. 0447294 to A.E.C. The same author would like to acknowledge the use of the
services provided by Research Computing, University of South Florida, and the help of Shawn
Hamm and Adam Clarke with some of the figures.
REFERENCES
1. A. Rahman, Phys. Rev. A , 136 , 405 (1964). Correlations in the Motion of Atoms in Liquid
Argon.
2. L. Verlet, Phys. Rev. , 159 , 98 (1967). Computer ''Experiments'' on Classical Fluids, page 99.
3. A. Rahman and F. H. Stillinger, J. Chem. Phys. , 55 , 3336 (1971). Molecular Dynamics Study
of Liquid Water.
Search WWH ::




Custom Search