- Posts: 4
Bug report insane.py
- buuhuu
- Topic Author
- Offline
- Fresh Boarder
Less
More
8 years 4 months ago #5310
by buuhuu
Bug report insane.py was created by buuhuu
There is a small mistake in the provided insane.py script in the download section.
When is comes to asymmetry in membranes in line 108 and 109 it is written:
lo_lipd = math.sqrt(options["-a"].value)
up_lipd = options["-au"].value or lo_lipd
i suppose it should be:
lo_lipd = math.sqrt(options["-a"].value)
up_lipd = math.sqrt(options["-au"].value) or lo_lipd
Maybe someone else was wondering why his asymmetrical membrane did look crappy.
Best
Eric
When is comes to asymmetry in membranes in line 108 and 109 it is written:
lo_lipd = math.sqrt(options["-a"].value)
up_lipd = options["-au"].value or lo_lipd
i suppose it should be:
lo_lipd = math.sqrt(options["-a"].value)
up_lipd = math.sqrt(options["-au"].value) or lo_lipd
Maybe someone else was wondering why his asymmetrical membrane did look crappy.
Best
Eric
Please Log in or Create an account to join the conversation.
- tsjerk
- Offline
- Expert Boarder
Less
More
- Posts: 103
8 years 4 months ago #5311
by tsjerk
Replied by tsjerk on topic Bug report insane.py
Hi Eric,
Thanks for reporting this. Silly mistake.
Cheers,
Tsjerk
Thanks for reporting this. Silly mistake.
Cheers,
Tsjerk
Please Log in or Create an account to join the conversation.
- cneale
- Offline
- Junior Boarder
Less
More
- Posts: 22
8 years 3 weeks ago #5463
by cneale
Replied by cneale on topic Bug report insane.py
The version of insane.py that I just downloaded yesterday from
www.cgmartini.nl/index.php/tools2/proteins-and-bilayers
does not have this fix included. You might consider including a note on the download page that known bug-fixes are not necessarily included in the distribution and the user should search this list (with a link to
www.cgmartini.nl/index.php/forum
). You might also consider defining a keyword that you could direct the user to search and then when a bug is found the developer could reply to the thread including that keyword to make searching easier?
Please Log in or Create an account to join the conversation.
- cneale
- Offline
- Junior Boarder
Less
More
- Posts: 22
8 years 3 weeks ago #5464
by cneale
Replied by cneale on topic Bug report insane.py
Actually, with that code change I get an error in insane.py , so I am presuming that the code is good to go as it is...
$ ./insane.py -o cg.gro -p cg.top -l POPC:1 -x 10 -y 10 -z 10
Traceback (most recent call last):
File "./insane.py", line 831, in <module>
up_lipd = math.sqrt(options["-au"].value) or lo_lipd
TypeError: a float is required
Note, the code seems to work fine when I don't make the change noted in this thread (at least for symmetric bilayers, I didn't try asymmetric).
$ ./insane.py -o cg.gro -p cg.top -l POPC:1 -x 10 -y 10 -z 10
Traceback (most recent call last):
File "./insane.py", line 831, in <module>
up_lipd = math.sqrt(options["-au"].value) or lo_lipd
TypeError: a float is required
Note, the code seems to work fine when I don't make the change noted in this thread (at least for symmetric bilayers, I didn't try asymmetric).
Please Log in or Create an account to join the conversation.
- flaviyan
- Offline
- Senior Boarder
Less
More
- Posts: 54
8 years 3 weeks ago #5467
by flaviyan
Replied by flaviyan on topic Bug report insane.py
cneale,
The expression is
up_lipd = math.sqrt(options["-au"].value or lo_lipd)
where the 'or' statement evaluates options["-au"].value and if its not True takes the argument lo_lipid.
The expression is
up_lipd = math.sqrt(options["-au"].value or lo_lipd)
where the 'or' statement evaluates options["-au"].value and if its not True takes the argument lo_lipid.
Please Log in or Create an account to join the conversation.
- cneale
- Offline
- Junior Boarder
Less
More
- Posts: 22
8 years 3 weeks ago #5474
by cneale
Replied by cneale on topic Bug report insane.py
confirmed this new code does not throw an error. Thank you.
Please Log in or Create an account to join the conversation.
Time to create page: 0.169 seconds