#!/usr/bin/env python
#* **************************************************************************
#*
#* CDTK, Chemical Dynamics Toolkit
#* A modular system for chemical dynamics applications and more
#*
#* Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016
#* Oriol Vendrell, DESY, <oriol.vendrell@desy.de>
#*
#* Copyright (C) 2017
#* Ralph Welsch, DESY, <ralph.welsch@desy.de>
#*
#* Copyright (C) 2020, 2021, 2022, 2023
#* Ludger Inhester, DESY, ludger.inhester@cfel.de
#*
#* This file is part of CDTK.
#*
#* CDTK is free software: you can redistribute it and/or modify
#* it under the terms of the GNU General Public License as published by
#* the Free Software Foundation, either version 3 of the License, or
#* (at your option) any later version.
#*
#* This program is distributed in the hope that it will be useful,
#* but WITHOUT ANY WARRANTY; without even the implied warranty of
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#* GNU General Public License for more details.
#*
#* You should have received a copy of the GNU General Public License
#* along with this program. If not, see <http://www.gnu.org/licenses/>.
#*
#* **************************************************************************
import sys
from optparse import OptionParser
import CDTK.Tools.Utils as uti
[docs]
def start():
def get_parser():
""" Return parser object to parse command line arguments.
Returns
-------
parser : OptionParser object
"""
parser=OptionParser()
parser.add_option('--n_atoms',
dest='n_atoms',
type='int',
default=None,
help='Number of atoms to print out. This can be useful to truncate the number of atoms for large systems.')
return parser
parser = get_parser()
opts, args = parser.parse_args(sys.argv[1:])
uti.traj2vtf('atomlist','R.log','traj',mmlist='MM_atomlist', disp_n_atoms=opts.n_atoms)
if __name__ == "__main__":
start()