Sunteți pe pagina 1din 3

6/4/14 CueMol: Documents / QScriptFileIO

translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.co.jp&sl=ja&tl=en&u=http://cuemol.sourceforge.jp/ja/index.php%3FDocuments%2 1/3
Documents / QScriptFileIO
CueMol: Molecular Visualization Framework
Documents
I do file input and output QScript
You can input and output of a simple text file Perl-like can be used to QScript. I will introduce a case that was applied to the display of the molecular structure of this work in this page.
To load the secondary structure of the calculation in DSSP
Does not have the ability to calculate the secondary structure in CueMol itself at the moment. So, when displaying a ribbon model in PDB file secondary structure information is not contained,
Tutorial / Step3 of Documents / QScript you were introduced to the example you want to set manually from the output of the procheck in, but it's an example of assigning by analyzing automatically the output file of DSSP is here.
File
Download the following files, please put it in the same directory. Then, please open the fileio1.qs menu "File" from "Execute QScript ..." by invoking the CueMol.
PDB file: ECR_MODEL.pdb
DSSP output file: dssp.txt
QScript file: fileio1.qs
DSSP file
24 lines at the beginning in the header, the output file of DSSP is the information of each residue from line 25.
# RESIDUE AA STRUCTURE BP1 BP2 ACC NH -> O O -> HN NH -> O O -> HN TCO KAPPA ALPHA PHI PSI X-CA Y-CA Z-CA 1 1 L 0 0 105 0, 0.0 2, -0.2 0, 0.0 178, -0.0 0.000 360.0 360.0 360.0 148.0 1.9 27.4 55.8 2 2 T> - 0 0 75 1, -0.1 4, -2.4 177, -0.0 5, -0.3 -0.500 360.0-113.9 -86.9 164.2 0.6 27.5 52.2 3 3 AH> S + 0 0 69 1, -0.2 4, -2.2 2, -0.2 5, -0.2 0.923 118.8 49.9 -62.4 -41.6 -2.4 25.5 51.3 4 4 NH> S + 0 0 89 1, - 0.2 4, -2.7 2, -0.2 -1, -0.2 0.934 109.7 50.4 -63.2 -45.3 -0.2 23.3 49.1 5 5 QH> S + 0 0 23 1, -0.2 4, -2.2 2, -0.2 -1, -0.2 0.892 111.2 45.7 -67.0 -39.8 2.3 22.7 51.8
It is an excerpt from the line 24 or more. Information of secondary structure contains residues part number, STRUCTURE (25 th character) part of the RESIDUE (6-10 th character).
Description of the script
# Get $ pwd = sys.getScriptPath (the path name of the directory in which the script);
# Open the PDB file,
# I is substituted for $ mol to create object # molecule to a molecule object named "ecr".
$ Mol = readPDB ("$ pwd / ECR_MODEL.pdb", "ecr");
# Local variables are valid only in the following (scope) in {{}
# Declaration of local variables.
local $ line;
# Create an input stream to open the text file dssp.txt.
# And I have been assigned to the $ fin.
local $ fin = fistream ("$ pwd / dssp.txt");
# 24 lines of the first skip. (Expressed as log)
foreach $ i (1 .. 24) {
$ Line = $ fin.readline ();
$ Line.chomp ();
sys.println ($ line);
}
# Until the end of the line from line 25, information of each residue is on.
# Reads each line processing.
while ($ fin.ready ()) {
# From the input stream $ fin $ line = $ fin.readline writes row read ();
# 5 characters from the sixth character of the line (same as Perl) to count the position of the character in the 0-based residue number # substr
# Is converted from a string to an integer as integer () $ resid = integer ($ line.substr (5, 5));
# 17 from the character of the line to the secondary structure $ code 1 character store $ code = $ line.substr (16, 1);
# Sheet if helix, and E if $ code is H,
# Otherwise the coil conversion if ($ code == "H") and {
$ Code = "helix";
}
else if ($ code == "E") {
$ Code = "sheet";
}
else {
6/4/14 CueMol: Documents / QScriptFileIO
translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.co.jp&sl=ja&tl=en&u=http://cuemol.sourceforge.jp/ja/index.php%3FDocuments%2 2/3
else {
$ Code = "coil";
}
# Select $ mol.selectResid residue of the current ($ resid) ("_", $ resid, $ resid);
# Set $ mol.setProp the secondary properties of the current residue ("secondary", $ code);
}
}
# # file to be discarded local variable $ fin Upon exiting the scope of the above is closed.
$ Mol.select (se / resn BLK /);
... (Optional) ...
$ R_p.setProp ("sheet_tail.gamma", 4.0);
# Residue secondary property is selected $ mol.select (se / rprop secondary = helix /) part of the helix;
# Red coloring molvis.paint ($ r_p, color (1,0,0));
# Residue secondary property is selected $ mol.select (se / rprop secondary = sheet /) part of the sheet;
# Blue coloring molvis.paint ($ r_p, color (0,0,1));
... (Omitted) ...
Colored with a score of Verify3D
In fact, ECR_MODEL.pdb that are used above, is the model structure with comparative modeling the ecdysone receptor of insects from the glucocorticoid receptor in humans.
File
Download the following files, please put it in the same directory. Then, start the CueMol menu "File" from "Execute QScript ..."
PDB file: ECR_MODEL.pdb
Score of Verify3D: verify3d.txt
This is something that you copy and paste from the page that comes out when you click on the results pages that come out and submitting the ECR_MODEL.pdb website Verify3D, the "Display the raw average data" button.
QScript file: fileio2.qs
Description of the script
The main point
In order to analyze the text file of complex format, can be easily achieved by using a regular expression. (You can even substr In this case, it is. Uses a regular expression as an example) regular expression similar to Perl is available in QScript.
To assign a number to the atom read from the text, it should be assigned to the occupancy or temperature factor.
I can gradient coloring temperature factor in (or occupancy) as easily as in this example case simple, the trace renderer.
The description in the next section in the case of ribbon and renderers tube.
Minimum $ smin = 1.0e10 and maximum value of # score;; $ smax =-1.0e10; $ pwd = sys.getScriptPath (); $ mol = readPDB ("$ pwd / ECR_MODEL.pdb", "ecr") { local $ line; If many times assignment # also be used to create a $ re # regular expression object, the person who had made a regular expression object in advance # outside the loop, such as this high-speed.
If the Tube, the ribbon renderer
must be colored using "colored by the script" for the ribbon and renderers tube. Well, (associative array in practice; dict type in QScript) unique sequence without having to assign a value to the occupancy and temperature factors in addition to this case you can set the script to be colored by referring it to make.
The reason that it or use an associative array type dict without a simple list type list to an array, list type because it is implemented in a linked list, the slower time of O (N) it takes when you access the index is.
To do this, follow the script file. Please make sure to use the same as above verify3d.txt and PDB.
fileio3.qs
6/4/14 CueMol: Documents / QScriptFileIO
translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.co.jp&sl=ja&tl=en&u=http://cuemol.sourceforge.jp/ja/index.php%3FDocuments%2 3/3
Last-modified: Sun, 07 Aug 2005 02:25:53 JST (3223d)
This project is hosted in SourceForge
This Page IS powerd by 1.4.3 PukiWiki breaks
HTML convert time to 0.307 sec.

S-ar putea să vă placă și