module
Chem::JDFTx
Defined in:
chem/formats/jdftx.crClass Method Summary
-
.read(io : IO, guess_bonds : Bool = false, guess_names : Bool = false) : Structure
Reads the structure from io.
-
.read(path : Path | String, guess_bonds : Bool = false, guess_names : Bool = false) : Structure
Reads the structure from path.
-
.write(io : IO, structure : Structure, fractional : Bool = false, wrap : Bool = false, single_file : Bool = true) : Nil
Writes a structure to io.
-
.write(path : Path | String, structure : Structure, fractional : Bool = false, wrap : Bool = false, single_file : Bool = true) : Nil
Writes a structure to path.
Class Method Detail
Reads the structure from io.
If io is a file, a sibling .lattice file is read for the unit cell.
Reads the structure from path.
If path is a file, a sibling .lattice file is read for the unit cell.
Writes a structure to io.
Atom positions are written in fractional coordinates if fractional is true, Cartesian otherwise.
Additionally, atom positions may be wrapped into the unit cell during writing if wrap is true (original positions are not modified).
Raises Spatial::NotPeriodicError if fractional is true and the structure is not periodic.
Unit cell and atoms are written to the same file if single_file is true, otherwise the lattice is written to a sibling .lattice file.
Writes a structure to path.
Atom positions are written in fractional coordinates if fractional is true, Cartesian otherwise.
Additionally, atom positions may be wrapped into the unit cell during writing if wrap is true (original positions are not modified).
Raises Spatial::NotPeriodicError if fractional is true and the structure is not periodic.
Unit cell and atoms are written to the same file if single_file is true, otherwise the lattice is written to a sibling .lattice file.