Hello Perhaps one of you could assist me with this question. In the from_ins.py file, there is a function by the name of from_ins. I am passing a .RES file to this function, but am not passing any of the other optional arguments to it. When line 51 in the file is reached, an exception is thrown. Here is the line of code that blows up: b = record.tempFactor + record_next.tempFactor The exception correctly states that the record_next object has no attribute named 'tempFactor'. Perhaps I am doing something incorrectly, or perhaps there is a bug in the from_ins function itself. If any of you can offer some insight into this problem I would greatly appreciate it. Thank you. ------------------------------------------------------------------------ -------- Andrew J. Foelker Software Engineer Bruker AXS Inc. 5465 E. Cheryl Parkway Madison, WI 53711 Tel: +1 608-276-3812 [email protected] www.bruker-axs.com http://www.bruker-axs.com/ ------------------------------------------------------------------------ ----------
Hi Andrew,
exception is thrown. Here is the line of code that blows up:
b = record.tempFactor + record_next.tempFactor
The exception correctly states that the record_next object has no attribute named 'tempFactor'. Perhaps I am doing something incorrectly, or perhaps there is a bug in the from_ins function itself. If any of you can offer some insight into this problem I would greatly appreciate it. Thank you.
I think we need to fix from_ins.py. Could you send us a .res file that leads to the crash? Ralf
Hi Ralf The reason that I was receiving the exception was that the continuation lines in the .RES file were incorrect. Luc Bourhis noted that "if a line finishes with "=", then the next line must start with a whitespace for the continuation to be valid. There are no such whitespaces in your file." Passing the from_ins function a "clean" .RES file fixed the problem as I am now able to render the atoms. As a side question, how would I get bond data from the structure returned from the from_ins function so as to be able to render the bonds between the atoms? Thanks and Regards, Andrew Foelker -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ralf W. Grosse-Kunstleve Sent: Thursday, January 10, 2008 11:34 AM To: PHENIX user mailing list Subject: Re: [phenixbb] iotbx.shelx.from_ins Hi Andrew,
exception is thrown. Here is the line of code that blows up:
b = record.tempFactor + record_next.tempFactor
The exception correctly states that the record_next object has no attribute named 'tempFactor'. Perhaps I am doing something incorrectly, or perhaps there is a bug in the from_ins function itself. If any of you can offer some insight into this problem I would greatly appreciate it. Thank you.
I think we need to fix from_ins.py. Could you send us a .res file that leads to the crash? Ralf _______________________________________________ phenixbb mailing list [email protected] http://www.phenix-online.org/mailman/listinfo/phenixbb
The reason that I was receiving the exception was that the continuation lines in the .RES file were incorrect.
OK. It would still be good for us to produce a clear error message. Was it just the whitespace missing in the continuation line?
As a side question, how would I get bond data from the structure returned from the from_ins function so as to be able to render the bonds between the atoms?
Would distance-based determination work for you? (As opposed to user-defined bonds.) Look for structure.show_distances() in cctbx/cctbx/xray/structure.py to get a start. Let me know if you need more help. It is a fairly complex procedure because of comprehensive handling of special positions. The core data strucutre behind the distance calculations is the pair_asu_table, which is closely tied to the asu_mappings class. Ralf
Ralf Yes, the whitespace was missing from the continuation line. As for distance-based bond determination, yes, that is exactly what I would like to do. I am looking at the show_distances() method inside the structure class. The usage of some of the optional parameters is a bit unclear to me. Could you provide an example of how the show_distances() method should be used? Thanks, Andrew -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ralf W. Grosse-Kunstleve Sent: Thursday, January 10, 2008 12:03 PM To: [email protected] Subject: Re: [phenixbb] iotbx.shelx.from_ins
The reason that I was receiving the exception was that the continuation lines in the .RES file were incorrect.
OK. It would still be good for us to produce a clear error message. Was it just the whitespace missing in the continuation line?
As a side question, how would I get bond data from the structure returned from the from_ins function so as to be able to render the bonds between the atoms?
Would distance-based determination work for you? (As opposed to user-defined bonds.) Look for structure.show_distances() in cctbx/cctbx/xray/structure.py to get a start. Let me know if you need more help. It is a fairly complex procedure because of comprehensive handling of special positions. The core data strucutre behind the distance calculations is the pair_asu_table, which is closely tied to the asu_mappings class. Ralf _______________________________________________ phenixbb mailing list [email protected] http://www.phenix-online.org/mailman/listinfo/phenixbb
participants (2)
-
Foelker, Andrew
-
Ralf W. Grosse-Kunstleve