The converters module

This module contains some high-level utility functions to interconvert between different file formats. When installed it also creates the following standalone executable scripts:

oxDNA_LAMMPS

Convert an oxDNA configuration into a LAMMPS data file.

oxDNA_LAMMPS_command_line

Convert the command-line supplied oxDNA configuration into a LAMMPS data file.

oxDNA_cogli

Convert an oxDNA configuration into a cogli file.

oxDNA_cogli_command_line

Convert the command-line supplied oxDNA configuration into a cogli file.

LAMMPS_cogli

Convert a LAMMPS data/dump file into a cogli file.

LAMMPS_cogli_command_line

Convert the command-line supplied LAMMPS data/dump file into a cogli file.

baggianalysis.converters.oxDNA_LAMMPS(input_file, output_file, bond_file=None, datafile_type=None)

Convert an oxDNA configuration into a LAMMPS data file.

Parameters
  • input_file (str) – The name of the input oxDNA configuration

  • output_file (str) – The name of the output LAMMPS data file

  • bond_file (str) – The name of the bond file that contains the system’s topology

  • datafile_type (str) – The type of the LAMMPS data file, which by default is “atomic”

baggianalysis.converters.oxDNA_LAMMPS_command_line()

Convert the command-line supplied oxDNA configuration into a LAMMPS data file.

The name of the output file is the same as the input file plus ‘.lammps’.

baggianalysis.converters.oxDNA_cogli(input_file, output_file)

Convert an oxDNA configuration into a cogli file.

Parameters
  • input_file (str) – The name of the input oxDNA configuration

  • output_file (str) – The name of the output cogli file

baggianalysis.converters.oxDNA_cogli_command_line()

Convert the command-line supplied oxDNA configuration into a cogli file.

The name of the output file is the same as the input file plus ‘.mgl’.

baggianalysis.converters.LAMMPS_cogli(input_file, output_file)

Convert a LAMMPS data/dump file into a cogli file.

Parameters
  • input_file (str) – The name of the LAMMPS data file

  • output_file (str) – The name of the output cogli file

baggianalysis.converters.LAMMPS_cogli_command_line()

Convert the command-line supplied LAMMPS data/dump file into a cogli file.

The name of the output file is the same as the input file plus ‘.mgl’.