QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: sergio on September 29, 2013, 10:24

Title: Objects in the nc file disappear
Post by: sergio on September 29, 2013, 10:24
Hi,

It is very strange that when I try to add the optical spectrum to a converged nc file all the the objects in the nc file disappear and nc file shows nothing. 
Could you please explain the reason?
Thanks,
Title: Re: Objects in the nc file disappear
Post by: Anders Blom on September 29, 2013, 22:40
Is this a repeated problem? Can we run your script to check, or does the calculation take very long time? Try saving the spectrum to a different file. Is the original file really empty (zero size) afterwards, or it just appears empty in VNL? Which VNL version? Is the NC file large, can you share it?
Title: Re: Objects in the nc file disappear
Post by: sergio on September 30, 2013, 22:22
Hi,

This is the first time that I have encountered with such a problem. Calculation time is short. I can save the spectrum to a different file but in the original nc file all the objects (including BulkConfiguration) become disappearing. So I need to re-run the py file to get a new nc file and to add the spectrum. The size of the nc file is not zero but sufficiently large without objects. I am using the 12.8.

Thanks for your interest,
 

 
Title: Re: Objects in the nc file disappear
Post by: Anders Blom on September 30, 2013, 22:38
If calculation time is short you can send me the script and I can test it.
Title: Re: Objects in the nc file disappear
Post by: sergio on October 1, 2013, 13:36
Hi Anders,

In order to test the problem I need to send the nc file but it is too large. Actually I have already re-run the py file and got a new nc file and added the spectrum without any problem. But here the problem is related to the vanishing or disappearing of objects in the nc file after trying to add optical spectrum. The interesting point is that the emerging nc file is sufficiently large without involving any object. Actually I have applied to the following script, keeping the default parameters in the optical spectrum:

nc_file="C:/Users/file.nc"
bulk_configuration = nlread(nc_file,BulkConfiguration,object_id='gID000')[0]

optical_spectrum = OpticalSpectrum(
    configuration=bulk_configuration,
    kpoints=MonkhorstPackGrid(11,11,11),
    energies=numpy.linspace(0,5,101)*eV,
    broadening=0.1*eV,
    bands_below_fermi_level=4,
    bands_above_fermi_level=4,
    )
nlsave(nc_file, optical_spectrum)

Title: Re: Objects in the nc file disappear
Post by: Anders Blom on October 1, 2013, 13:53
You mentioned it was reproducible so it would be interesting to have a complete workflow that shows the problem, starting with the script that generates "file.nc". Maybe the problem is in that file... I'm not sure how to proceed investigating this right now. I tested by just taking a configuration and using your code, and all works fine.