omly: peacock tail feather (And then a miracle occurs...)
[personal profile] omly
I am not sure that anyone here has experience with Python, but I am having some code issues. I am trying to create a loop that will create several iterations of the process combining different variables. The relevant part looks like this:

bulkcell = []
for a in (4.55, 5.2, 0.10):
for c in (2.8, 3.05, 0.05):
bulk append (a, 0, 0),
(0, a, 0)
(0, 0, c)])
bulkcell = ([(a, 0, 0)
(0, a, 0)
(0, 0, c)])

bulk.SetUnitCell(bulkcell)

The problem is that when I look at the file that it creates it tells me that the cell dimensions are 0.1X0.1X0.05, meaning that it is taking what I was thinking of as the step as the input instead of the range of numbers that I thought that it would. Also it only does this once; there are no other permutations.

I have been trying to look up similar looping code examples and instruction, but for the most part I am find examples that are integer only for indexing purposes. Can anyone help?
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

omly: peacock tail feather (Default)
omly

January 2024

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Apr. 16th, 2026 03:30 am
Powered by Dreamwidth Studios