Author Topic: Changing Mass of Silicon  (Read 4138 times)

0 Members and 1 Guest are viewing this topic.

Offline Tiiger

  • New QuantumATK user
  • *
  • Posts: 1
  • Country: jp
  • Reputation: 0
    • View Profile
Changing Mass of Silicon
« on: October 23, 2019, 11:12 »
Hey, I want to calculate phonontransmission through the interface between Silicon and Heavy Silicon (Silicon Isoptope).

First I created an entire Si supercell, then plan to change the masses of the latter half silicons, using the method explained in the below tutorial (doping isotope into CNT by creating a new C14 class).

https://docs.quantumwise.com/tutorials/thermoelectrics_cnt_isotope/thermoelectrics_cnt_isotope.html

However, When I checked one of the latter half silicons, its elements' class and mass in fact remained unchanged (as you can see from the log file).

Is this a problem with a version of my ATK (Mine is 2018) or is there other errors in this code?

Thanks in advance!

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: Changing Mass of Silicon
« Reply #1 on: October 25, 2019, 12:12 »
That script in the tutorial does not work any longer for newer versions. I will report it to developers, so that they will provide a new solution.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: Changing Mass of Silicon
« Reply #2 on: January 9, 2020, 01:22 »
I designed an alternative way to do this, while we wait for the release of version R-2020.09 later this year, which will have proper support for isotopes in QuantumATK. Now, I haven't had time to test this fully or anything, but basically you need to redefine the atomicMasses() method in the DeviceConfiguration base class. This should be done before you create the configuration:
Code: python
import NLEngine

def customMasses(self):
    masses = NLEngine.elementsToAtomicMasses(self.elements())
    for i in self.indicesFromTags("HSi"):
        masses[i] = Heavysimass
    return masses*Units.atomic_mass_unit
    
DeviceConfiguration.atomicMasses = customMasses
Then you define the device_configuration as usual, and finally you need to add the tag "HSi" to all atoms you want to have the different mass. Like so (not 100% ready code, but I think you get the idea; you still need to define Z_mid and the heavy mass and so on, like before):
Code: python
heavy_atoms = numpy.where(device_configuration.cartesianCoordinates()[:,2] > Z_mid)[0]
device_configuration.addTags("HSi", heavy_atoms)
Note that your case is a bit different than the example in the future, in that your right electrode also needs to consist of "heavy atoms". Using the tag approach, this is automatically taken care of, whereas in your script, if it had worked technically (e.g. if you used an older version of the code), you actually only replaced the atoms inside the central region. Hope it work, like I said, I didn't test it properly.