Replies: 0 comments 6 replies
-
Hi @riCatwik , pyiron internally uses https://github.com/dgehringer/sqsgenerator from @dgehringer to generate SQS structures. If I understand your example correctly then you can use the input syntax discussed in: But I agree it is not directly clear how to use it in pyiron. @dgehringer can you help us here? Best, Jan |
Beta Was this translation helpful? Give feedback.
-
I know the answer and I can post it as soon as I can make my atomistics class run again (currently I’m suffering from the fact that my installation is not compatible) |
Beta Was this translation helpful? Give feedback.
-
Thank you very much, @samwaseda, for your answer. I followed your instruction and did the following: 1. Structure generationfrom pyiron import Project
pr = Project(path="sqs") n_repeat = 3
structure = pr.create.structure.bulk(name="InSb",
crystalstructure="zincblende",
a=6.479,
cubic=True)
structure = structure.repeat(n_repeat)
len(structure) 2. SQS generation on sublatticejob_sqs = pr.create.job.SQSJob(job_name="sqs_job",
delete_existing_job=True)
job_sqs.input.mole_fractions = {"Sb": 0.5, "As": 0.5}
job_sqs.input.iterations = 1e6 ## default:1000000 or 1e6
job_sqs.structure = structure[structure.select_index("Sb")]
job_sqs.run() Print the first resulting SQS sub-structurestructure_sublattice_sqs = job_sqs.list_structures()[0]
structure_sublattice_sqs 3. Retrieve chemical symbols and merge sublattice with main structurechem_symbols = structure.get_chemical_symbols()
chem_symbols[structure.select_index("Sb")] = structure_sublattice_sqs.get_chemical_symbols()
print(chem_symbols)
# Set the chemical symbols in the structure
structure_sqs = structure
structure_sqs.set_chemical_symbols(chem_symbols)
# Print the updated structure
structure_sqs But, unfortunately, SQS structure symbols do not reflects in the main structure. from pyiron_atomistics import ase_to_pyiron
from ase import Atoms
# Define the crystal structure
atoms = Atoms('In2Sb2As2',
scaled_positions=[(0, 0, 0), (0.5, 0.5, 0), (0.5, 0, 0.5), (0, 0.5, 0.5)],
cell=[6.479, 6.479, 6.479],
pbc=True)
# Convert the ase Atoms object to a pyiron Atoms object
structure = ase_to_pyiron(atoms)
# Define the chemical symbols array with a data type of <U3
chem_symbols = np.array(['In', 'Sb', 'As', 'In', 'Sb', 'As'], dtype='<U3')
# Set the chemical symbols in the structure
structure.set_chemical_symbols(chem_symbols)
# Print the updated structure
print(structure) So, I suppose there is something wrong with this line in structure_sqs.set_chemical_symbols(chem_symbols) I could not catch where it's going wrong. I also checked the data type of Could you please help me to resolve this? Thank you very much once again. Best, |
Beta Was this translation helpful? Give feedback.
-
Dear all Pyiron developers, users and enthusiasts,
I am new here. This is my first problem with Pyiron, but I am stuck at the very beginning.$InSb_xAs_{1-x}$ alloy.
I would like to generate a ternary
Atom positions of primitive zincblende InSb ($a=6.479 \unicode{x212B}$ ) are:
I want an SQS structure in the following way:
Here I would like to
The general command for SQS generation is "job.input.mole_fractions = {'A': 0.8, 'B':0.2}" but I am unsure how to do it for my specific purpose as I don't want to change the positions of In atoms.
Could someone please help me to solve this?
Looking forward to hearing from you.
Thank you very much.
Regards,
Ritwik
Beta Was this translation helpful? Give feedback.
All reactions