def _perform_common_init_tasks(): from hoomd_script import update from hoomd_script import group from hoomd_script import compute # create the sorter globals.sorter = update.sort() # create the default compute.thermo on the all group util._disable_status_lines = True all = group.all() compute._get_unique_thermo(group=all) util._disable_status_lines = False # set up Communicator, and register it with the System if hoomd.is_MPI_available(): cpp_decomposition = globals.system_definition.getParticleData( ).getDomainDecomposition() if cpp_decomposition is not None: # create the c++ Communicator if not globals.exec_conf.isCUDAEnabled(): cpp_communicator = hoomd.Communicator( globals.system_definition, cpp_decomposition) else: cpp_communicator = hoomd.CommunicatorGPU( globals.system_definition, cpp_decomposition) # set Communicator in C++ System globals.system.setCommunicator(cpp_communicator)
def __init__(self, filename, period, group=None, overwrite=False, unwrap_full=False, unwrap_rigid=False, angle_z=False, phase=-1): util.print_status_line(); # initialize base class analyze._analyzer.__init__(self); # create the c++ mirror class reported_period = period; try: reported_period = int(period); except TypeError: reported_period = 1; if group is None: util._disable_status_lines = True; group = hs_group.all(); util._disable_status_lines = False; self.cpp_analyzer = hoomd.DCDDumpWriter(globals.system_definition, filename, int(reported_period), group.cpp_group, overwrite); self.cpp_analyzer.setUnwrapFull(unwrap_full); self.cpp_analyzer.setUnwrapRigid(unwrap_rigid); self.cpp_analyzer.setAngleZ(angle_z); self.setupAnalyzer(period, phase); # store metadata self.filename = filename self.period = period self.group = group self.metadata_fields = ['filename','period','group']
def _perform_common_init_tasks(): from hoomd_script import update; from hoomd_script import group; from hoomd_script import compute; # create the sorter, using the evil import __main__ trick to provide the user with a default variable import __main__; __main__.sorter = update.sort(); # create the default compute.thermo on the all group util._disable_status_lines = True; all = group.all(); compute._get_unique_thermo(group=all); util._disable_status_lines = False; # set up Communicator, and register it with the System if hoomd.is_MPI_available(): cpp_decomposition = globals.system_definition.getParticleData().getDomainDecomposition(); if cpp_decomposition is not None: # create the c++ Communicator if not globals.exec_conf.isCUDAEnabled(): cpp_communicator = hoomd.Communicator(globals.system_definition, cpp_decomposition) else: cpp_communicator = hoomd.CommunicatorGPU(globals.system_definition, cpp_decomposition) # set Communicator in C++ System globals.system.setCommunicator(cpp_communicator)
def __init__(self, filename, period, group=None, overwrite=False, unwrap_full=False, unwrap_rigid=False, angle_z=False): util.print_status_line() # initialize base class analyze._analyzer.__init__(self) # create the c++ mirror class reported_period = period try: reported_period = int(period) except TypeError: reported_period = 1 if group is None: util._disable_status_lines = True group = hs_group.all() util._disable_status_lines = False self.cpp_analyzer = hoomd.DCDDumpWriter(globals.system_definition, filename, int(reported_period), group.cpp_group, overwrite) self.cpp_analyzer.setUnwrapFull(unwrap_full) self.cpp_analyzer.setUnwrapRigid(unwrap_rigid) self.cpp_analyzer.setAngleZ(angle_z) self.setupAnalyzer(period)
def _perform_common_init_tasks(): from hoomd_script import update from hoomd_script import group from hoomd_script import compute # create the sorter globals.sorter = update.sort() # create the default compute.thermo on the all group util._disable_status_lines = True all = group.all() compute._get_unique_thermo(group=all) util._disable_status_lines = False # set up Communicator, and register it with the System if hoomd.is_MPI_available(): cpp_decomposition = globals.system_definition.getParticleData().getDomainDecomposition() if cpp_decomposition is not None: # create the c++ Communicator if not globals.exec_conf.isCUDAEnabled(): cpp_communicator = hoomd.Communicator(globals.system_definition, cpp_decomposition) else: cpp_communicator = hoomd.CommunicatorGPU(globals.system_definition, cpp_decomposition) # set Communicator in C++ System globals.system.setCommunicator(cpp_communicator)
def __init__(self, filename, period, group=None, overwrite=False, offdiag=False): util.print_status_line() # initialize base class analyze._analyzer.__init__(self) # Find the dcd extension and construct new file names end = filename.find('.dcd') file_diag = filename[:end] + '.diag.dcd' file_off = filename[:end] + '.off.dcd' # create the c++ mirror class reported_period = period if type(period) != type(1): reported_period = 1000 if group is None: util._disable_status_lines = True group = hs_group.all() util._disable_status_lines = False self.cpp_analyzer = _custom_analyzers_plugin.StressPerAtomDumpWriter( globals.system_definition, file_diag, file_off, int(reported_period), group.cpp_group, overwrite, offdiag) self.setupAnalyzer(period)
def __init__(self, filename, period, group=None, overwrite=False, unwrap_full=False, unwrap_rigid=False): util.print_status_line(); # initialize base class analyze._analyzer.__init__(self); # create the c++ mirror class reported_period = period; if type(period) != type(1): reported_period = 1000; if group is None: util._disable_status_lines = True; group = hs_group.all(); util._disable_status_lines = False; self.cpp_analyzer = hoomd.DCDDumpWriter(globals.system_definition, filename, int(reported_period), group.cpp_group, overwrite); self.cpp_analyzer.setUnwrapFull(unwrap_full); self.cpp_analyzer.setUnwrapRigid(unwrap_rigid); self.setupAnalyzer(period);
def __init__(self, filename, period, group=None, overwrite=False): util.print_status_line() # initialize base class analyze._analyzer.__init__(self) # create the c++ mirror class reported_period = period if type(period) != type(1): reported_period = 1000 if group is None: util._disable_status_lines = True group = hs_group.all() util._disable_status_lines = False self.cpp_analyzer = _custom_analyzers_plugin.DCDVELDumpWriter( globals.system_definition, filename, int(reported_period), group.cpp_group, overwrite) self.setupAnalyzer(period)