nlread — Function for reading configurations and results from files. The following file types are supported: NetCDF (only from ATK 10.8 and later), GPAW, ASE, XYZ, Python scripts (also from ATK 2008.10 and earlier), CAR and TRAJ (ASE trajectories).
Function for reading configurations and results from files. The following file types are supported: NetCDF (only from ATK 10.8 and later), GPAW, ASE, XYZ, Python scripts (also from ATK 2008.10 and earlier), CAR and TRAJ (ASE trajectories). Returns: A list of the objects loaded from the NetCDF file.
The file that objects should be loaded from from.
Type: A string.
Only load objects of this type (NetCDF and GPAW only).
Type: A class.
Only load objects that match object_id (NetCDF and GPAW only).
Type: A string.
Read the full state of the object. If not, then enough is read that will support visualization of the configuration in the graphical user interface.
Type: True or False.
Default:
True
Restore the self-consistent state of a previous calculation (to save the state, see the Usage Examples for the nlsave function).
# Read self-consistent calculations
molecule_configuration_list = nlread(
'nh3_scf.nc',
MoleculeConfiguration
)
# Choose the first configuration in the list
molecule_configuration = molecule_configuration_list[0]
Restore the object with object_id = 0 from the NetCDF file
bandstructure.nc (to save the state, consult the nlsave function).
molecular_energy_spectrum = nlread(filename='spectrum.nc',object_id='id0')
Restore all MolecularEnergySpectrum objects
from the file spectrum.nc and select the first object.
molecular_energy_spectrums = nlread(
'spectrum.nc',
MolecularEnergySpectrum
)
molecular_energy_spectrum = molecular_energy_spectrums[0]