Author Topic: Mistake in Reference Manual - Atomic Compensation Charge  (Read 2660 times)

0 Members and 1 Guest are viewing this topic.

Offline Hassan

  • Regular QuantumATK user
  • **
  • Posts: 21
  • Country: ca
  • Reputation: 0
    • View Profile
In the manual page for AtomicCompensationCharge (http://quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.atomiccompensationcharge.html), you have the following code example:
Code
# Set up configuration
bulk_configuration = BulkConfiguration(
    bravais_lattice=FaceCenteredCubic(5.4306*Angstrom),
    elements=[Silicon, Silicon],
    fractional_coordinates=[[ 0.  ,  0.  ,  0.  ],
                            [ 0.25,  0.25,  0.25]]
    )

# Set a negative compensation charge on each atom, to compensate for p-doping
compensation_charge = AtomicCompensationCharge([[0, -0.0005], [1, -0.0005]])
bulk_configuration.setExternalPotential(compensation_charge)

# Calculator
numerical_accuracy_parameters = NumericalAccuracyParameters(
    k_point_sampling=(5, 5, 5),
    )
It is copied from the 13.8 Manual page (http://quantumwise.com/documents/manuals/ATK-13.8/ReferenceManual/ref.atomiccompensationcharge.html). The problem is that you have changed the functionality of the atomic_shifts argument in 14.0 onwards (why...I'm not sure). It accepts tags and charge tuples rather than atom index and charge tuples so if you tried to use the code example you get an error. It should read:
Code
bulk_configuration = BulkConfiguration(
    bravais_lattice=FaceCenteredCubic(5.4306*Angstrom),
    elements=[Silicon, Silicon],
    fractional_coordinates=[[ 0.  ,  0.  ,  0.  ],
                            [ 0.25,  0.25,  0.25]]
    )
bulk_configuration.addTags ('all_atoms', [0,1])

# Set a negative compensation charge on each atom, to compensate for p-doping
compensation_charge = AtomicCompensationCharge([('all_atoms', -0.0005)])
bulk_configuration.setExternalPotential(compensation_charge)

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Mistake in Reference Manual - Atomic Compensation Charge
« Reply #1 on: June 28, 2015, 00:25 »
Thanks for noticing - we'll fix it!

Why we changed, is a longer story, but basically we couldn't make the old scheme work properly in all scenarios involving the Script Generator, nlsave/nlread, etc.