DATAReader

class sknano.io.DATAReader(fpath, atom_style='full', bond_style=None, angle_style=None, dihedral_style=None, improper_style=None, pair_style=None, formatter=None, **kwargs)[source] [edit on github][source]

Bases: sknano.io.StructureIO

StructureData class for reading LAMMPS data file format.

Parameters:
  • fpath (str) – LAMMPS data file path
  • atom_style ({'full', 'atomic'}, optional) –
  • bond_style ({None, 'class2', 'fene', 'fene/expand', 'harmonic', 'morse', 'nonlinear', 'quartic'}) –
  • angle_style (str, optional) –
  • dihedral_style (str, optional) –
  • improper_style (str, optional) –
  • pair_style (str, optional) –
domain

sknano.core.crystallography.Domain

Attributes

atoms Structure Atoms.
basis Structure BasisAtoms.
comment_line Comment line.
crystal_cell Structure CrystalCell.
fmtstr Format string.
headers Alias for header_data.
lattice Structure Crystal3DLattice.
lattice_shift Lattice displacement vector.
scaling_matrix CrystalCell.scaling_matrix.
sections Alias for section_data.
structure An alias to self.
unit_cell Structure UnitCell.

Methods

clear() Clear list of StructureMixin.atoms.
get(section[, colnum, colname, colindex]) Return section with section.
make_supercell(scaling_matrix[, wrap_coords]) Make supercell.
read() Read data file.
read_data(*args, **kwargs) Read LAMMPS Data file.
read_dump(*args, **kwargs) Read LAMMPS Dump file.
read_pdb(*args, **kwargs) Read PDB file.
read_xyz(*args, **kwargs) Read XYZ file.
rotate(**kwargs) Rotate crystal cell lattice, basis, and unit cell.
todict() Return dict of constructor parameters.
transform_lattice(scaling_matrix[, ...]) Transform structure lattice.
translate(t[, fix_anchor_points]) Translate crystal cell lattice, basis, and unit cell.
write(*args, **kwargs) Write structure data to file.
write_data(**kwargs) Write LAMMPS data file.
write_dump(**kwargs) Write LAMMPS dump file.
write_pdb(**kwargs) Write pdb file.
write_xyz(**kwargs) Write xyz file.

Attributes Summary

headers Alias for header_data.
sections Alias for section_data.

Methods Summary

get(section[, colnum, colname, colindex]) Return section with section.
read() Read data file.
todict() Return dict of constructor parameters.

Attributes Documentation

headers

Alias for header_data.

Returns:dict of dump file header values
Return type:dict
sections

Alias for section_data.

Returns:dict of dump file section data
Return type:dict

Methods Documentation

get(section, colnum=None, colname=None, colindex=None)[source] [edit on github][source]

Return section with section.

Parameters:
  • section (str) –
  • colnum (int, optional) –
  • colname (str, optional) –
  • colindex (int, optional) –
Returns:

Return type:

sequence

read()[source] [edit on github][source]

Read data file.

todict()[source] [edit on github][source]

Return dict of constructor parameters.