1
General Questions and Answers / How to create MPSH in new version
« on: August 11, 2010, 10:37 »
Dear all,
I am a little bit confuse with the new version. My aim is to project Hamiltonian in the scattering region.
In the old version I used this script:
######################################
from ATK.TwoProbe import *
# Restore initial density from old calculation
scf = restoreSelfConsistentCalculation("name.nc")
vnl_file = VNLFile('name.vnl')
atomic_configuration = vnl_file.readAtomicConfigurations()['name']
projected_hamiltonian_eigenstates = calculateProjectedHamiltonianEigenstates(
self_consistent_calculation = scf,
projection_atoms = (32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76),
quantum_numbers = [(72,73,74,75),Spin.Up]
)
vnl_file = VNLFile("name-MPSH.vnl")
vnl_file.addToSample(atomic_configuration,'name-MPSH')
for projected_hamiltonian_eigenstates_index,state in enumerate(projected_hamiltonian_eigenstates):
label = 'Projected Hamiltonian Eigenstates-0V'+' '+str(projected_hamiltonian_eigenstates_index)
vnl_file.addToSample(state, 'name-MPSH', label)
#############################################################################
So now in the new Nanolenguage :
instead to used readAtomicConfiguration I should use nlread ('name-file', object_id="gID000")[0]
That is Ok.
Now, how I should replace restartSelfConsistentCoalculations?
How to save my output file because the new version is not using .vnl files anymore?
Or with one word can you just write a small script from the beginning to the end, please?
Few more points that I noticed :
When I have Transmission spectra in old version was possible to place the mouse at some point of the screen and I will have X and Y coordinates. The same was valid for the Molecule Energy spectra. It was possible to see the number of Molecule orbital and the energy from the window. In the new version it is not possible. I believe that will be very useful and convenient to have these features back in the new version.
I am a little bit confuse with the new version. My aim is to project Hamiltonian in the scattering region.
In the old version I used this script:
######################################
from ATK.TwoProbe import *
# Restore initial density from old calculation
scf = restoreSelfConsistentCalculation("name.nc")
vnl_file = VNLFile('name.vnl')
atomic_configuration = vnl_file.readAtomicConfigurations()['name']
projected_hamiltonian_eigenstates = calculateProjectedHamiltonianEigenstates(
self_consistent_calculation = scf,
projection_atoms = (32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76),
quantum_numbers = [(72,73,74,75),Spin.Up]
)
vnl_file = VNLFile("name-MPSH.vnl")
vnl_file.addToSample(atomic_configuration,'name-MPSH')
for projected_hamiltonian_eigenstates_index,state in enumerate(projected_hamiltonian_eigenstates):
label = 'Projected Hamiltonian Eigenstates-0V'+' '+str(projected_hamiltonian_eigenstates_index)
vnl_file.addToSample(state, 'name-MPSH', label)
#############################################################################
So now in the new Nanolenguage :
instead to used readAtomicConfiguration I should use nlread ('name-file', object_id="gID000")[0]
That is Ok.
Now, how I should replace restartSelfConsistentCoalculations?
How to save my output file because the new version is not using .vnl files anymore?
Or with one word can you just write a small script from the beginning to the end, please?
Few more points that I noticed :
When I have Transmission spectra in old version was possible to place the mouse at some point of the screen and I will have X and Y coordinates. The same was valid for the Molecule Energy spectra. It was possible to see the number of Molecule orbital and the energy from the window. In the new version it is not possible. I believe that will be very useful and convenient to have these features back in the new version.