Feature Requests item #1833203, was opened at 2007-11-16 09:21 Message generated for change (Comment added) made by hansonr You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1833203&group_id=23629
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Priority: 5 Private: No Submitted By: Rolf Huehne (rhuehne) >Assigned to: Bob Hanson (hansonr) Summary: substring function Initial Comment: A lot of information contained in PDB format files is available now in Jmol 11.3.44 for scripting purposes. But of course not every bit of information is parsed out by Jmol. Since the PDB format is a fixed-column format the most secure way to parse out a specific information would be a 'substring' function, e.g: het_ID = x.substr(12,3); het_name = x.substr(16,55); This would provide columns 12 to 14 as 'het_id' and columns 16 to 70 as 'het_name'. ---------------------------------------------------------------------- >Comment By: Bob Hanson (hansonr) Date: 2007-11-19 08:11 Message: Logged In: YES user_id=1082841 Originator: NO good point. I've added that to the documentation that will upload later today. Closing this request. ---------------------------------------------------------------------- Comment By: Rolf Huehne (rhuehne) Date: 2007-11-19 07:16 Message: Logged In: YES user_id=1344570 Originator: YES I just didn't recognize it in the documentation. Maybe it should be pointed out directly that the "item-selector [i][j]" resembles a substring function. And it might also help to organize the examples for it into a table similar to those for the other "item-selector" functions described above it. In the current form it is easily overlooked. ---------------------------------------------------------------------- Comment By: Bob Hanson (hansonr) Date: 2007-11-16 10:34 Message: Logged In: YES user_id=1082841 Originator: NO my favorite kind of feature request -- it's already there. het_ID = x[12][14] # het_ID will be columns 12,13,14 -- counting the first column as column 1. het_name = x[16][0] # het_name will be from character 16 through the end of the line I decided to stay away from the .substring() because the [] notation uses 1 for the first element (so we can use 0 for the last, -1 for the next to last, etc....), and that's hard enough, but to use a Java function ".substring()" and then change the numbering, that's where I drew the line. No one has commented on the 1-based system here; one could criticize that, of course. Bob ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=379136&aid=1833203&group_id=23629 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
