Write a python script to perform trajectory analysis using {选用的python library,如 mdanalysis to load the trajectory, numpy to do numerical calculation, scipy for clustering}. {根据经验要给的指示,如 Only load the trajectory once. Improve the code efficiency by minimizing the use of for-loops. Clean up any unnecessary repeating actions. Optimize the analysis on a large dataset.} {个人偏好的输出文件格式,如 For the data files to save, use spaces instead of comma or tab as separater.} {计算用的单位, 如Use kJ/mol as the free energy unit, nanometer as distance unit, degree as angle unit.}
{确保脚本与python environment的Library相容} Refer to the attached conda environment for library versions, ensure compatibility of the script with the environment.
If there is anything uncertain, ask me first before you proceed.
**What the script should do**
1. Estimate memory usage of the run using {用来测memory usage的library}.
2. get the filename of {必要的输入文件,例如 topology (e.g. topology.pdb)), trajectory (e.g. trajectory.xtc), and weight (e.g. weights.xvg)}; also {必要的参数如residue ID to be analyzed, temperature in K}, and {optional的输入文件和参数} from command line option. {个人喜好所有预设参数放一起置顶方便修改}All the default variables should be defined at the beginning of the script.