importing xyz file
Hello, I would like to visualize in chimera objects (not exactly atoms) from my XYZ file. I can import them ans see as scattered balls but I would like to see them connected to each other in order that they are appear in file. The distances are much larger than usual inter atoms interactions. Is it possible? -- best Michał Kadlof
Hello Michał, The XYZ format does not specify bonds directly. Normally if the points are atoms with reasonable bond lengths, Chimera can guess where the bonds are based on the elements and coordinates. If they are not atomic structures and the bonds are of arbitrary length, here are some possibilities of what you could do: (1) after reading in the XYZ file, add bonds manually yourself, for example, select two “atoms” (Ctrl-click, Shift-Ctrl-click) and then use command “bond sel”. Repeat. This could be tedious if you have a lot of bonds to add. You could also use atom names instead of selecting, for example “bond @c1,c2”. Although the XYZ file doesn’t contain atom names, “atoms” of the same “element” will be named in Chimera according to element with a sequential number appended (the first C is named C1, the second C is named C2, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/xyz.html> - OR - (2) convert XYZ file into some other format that specifies bonds, for example a PDB file with CONECT lines. <http://www.wwpdb.org/documentation/file-format-content/format33/v3.3.html> This would also take some effort to script a process (which could involve other people’s programs, say Babel to convert to PDB but then you would still need to add your CONECT lines), but once you had that done, it could be applied to a large file or multiple files. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco On Jan 13, 2016, at 6:28 AM, Michał Kadlof <m.kadlof@cent.uw.edu.pl> wrote:
Hello, I would like to visualize in chimera objects (not exactly atoms) from my XYZ file. I can import them ans see as scattered balls but I would like to see them connected to each other in order that they are appear in file. The distances are much larger than usual inter atoms interactions. Is it possible? -- best Michał Kadlof
Additional alternative formats are BILD objects and Chimera marker files, see: <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/filetypes.html#object> Elaine On Jan 13, 2016, at 9:58 AM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Hello Michał, The XYZ format does not specify bonds directly. Normally if the points are atoms with reasonable bond lengths, Chimera can guess where the bonds are based on the elements and coordinates. If they are not atomic structures and the bonds are of arbitrary length, here are some possibilities of what you could do:
(1) after reading in the XYZ file, add bonds manually yourself, for example, select two “atoms” (Ctrl-click, Shift-Ctrl-click) and then use command “bond sel”. Repeat. This could be tedious if you have a lot of bonds to add. You could also use atom names instead of selecting, for example “bond @c1,c2”. Although the XYZ file doesn’t contain atom names, “atoms” of the same “element” will be named in Chimera according to element with a sequential number appended (the first C is named C1, the second C is named C2, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/xyz.html>
- OR -
(2) convert XYZ file into some other format that specifies bonds, for example a PDB file with CONECT lines. <http://www.wwpdb.org/documentation/file-format-content/format33/v3.3.html> This would also take some effort to script a process (which could involve other people’s programs, say Babel to convert to PDB but then you would still need to add your CONECT lines), but once you had that done, it could be applied to a large file or multiple files.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 13, 2016, at 6:28 AM, Michał Kadlof <m.kadlof@cent.uw.edu.pl> wrote:
Hello, I would like to visualize in chimera objects (not exactly atoms) from my XYZ file. I can import them ans see as scattered balls but I would like to see them connected to each other in order that they are appear in file. The distances are much larger than usual inter atoms interactions. Is it possible? -- best Michał Kadlof
On Jan 13, 2016, at 9:58 AM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
(1) after reading in the XYZ file, add bonds manually yourself, for example, select two “atoms” (Ctrl-click, Shift-Ctrl-click) and then use command “bond sel”. Repeat. This could be tedious if you have a lot of bonds to add. You could also use atom names instead of selecting, for example “bond @c1,c2”. Although the XYZ file doesn’t contain atom names, “atoms” of the same “element” will be named in Chimera according to element with a sequential number appended (the first C is named C1, the second C is named C2, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/xyz.html <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/xyz.html>>
And the above could be combined into a script, e.g.: open myfile.xyz bond @c1,c2 bond @c1,c7 … That script file could then be opening with a single command in Chimera: “open myscript.cmd”. —Eric Eric Pettersen UCSF Computer Graphics Lab
Thank you for your advice. I decided to translate my XYZ structure into PDB file with CONNECT records but I observe strange behaviour. Chimera seems not rendering all of bonds. Some of them in dense place, are render as pseudobonds. Is it how it supposed to work? bond command tells me: Attempt to form duplicate covalent bond. I'm including screenshot, and my structure. It's obviously not a protein, but I would like to use some tools from chimera to work with it. Can you help me? -- Michał Kadlof ----- Oryginalna wiadomość ----- Od: "Eric Pettersen" <pett@cgl.ucsf.edu> Do: "chimera-users@cgl.ucsf.edu BB" <chimera-users@cgl.ucsf.edu> DW: "Michał Kadlof" <m.kadlof@cent.uw.edu.pl> Wysłane: środa, 13 styczeń 2016 19:03:32 Temat: Re: [Chimera-users] importing xyz file On Jan 13, 2016, at 9:58 AM, Elaine Meng < meng@cgl.ucsf.edu > wrote: (1) after reading in the XYZ file, add bonds manually yourself, for example, select two “atoms” (Ctrl-click, Shift-Ctrl-click) and then use command “bond sel”. Repeat. This could be tedious if you have a lot of bonds to add. You could also use atom names instead of selecting, for example “bond @c1,c2”. Although the XYZ file doesn’t contain atom names, “atoms” of the same “element” will be named in Chimera according to element with a sequential number appended (the first C is named C1, the second C is named C2, etc.). < http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/xyz.html > And the above could be combined into a script, e.g.: open myfile.xyz bond @c1,c2 bond @c1,c7 … That script file could then be opening with a single command in Chimera: “open myscript.cmd”. —Eric Eric Pettersen UCSF Computer Graphics Lab
Hi Michał, When Chimera reads a PDB file, it adheres to the implied conventions of the PDB — which is what is tripping you up here. The two conventions that are getting you are: (1) consecutive residues in ATOM records with no intervening TER card are connected, and (2) jumps in the residue numbering of consecutive residues along with separation in 3D space imply missing intervening structure. (1) will add extra bonds you didn’t explicitly put in your CONECT records. (2) will change some inter-residue bonds into “missing structure” pseudobonds. So if we fix your PDB file, Chimera will like it better. :-) The changes are: — Change ATOM records to HETATM records — Put all the atoms into a single residue — Change the residue name from GLY to UNK — Give the atoms unique names (I used C0 through C69) I have attached the edited version of your file. —Eric Eric Pettersen UCSF Computer Graphics Lab
On Mar 9, 2016, at 1:48 PM, Michał Kadlof <m.kadlof@cent.uw.edu.pl> wrote:
Thank you for your advice. I decided to translate my XYZ structure into PDB file with CONNECT records but I observe strange behaviour. Chimera seems not rendering all of bonds. Some of them in dense place, are render as pseudobonds. Is it how it supposed to work? bond command tells me: Attempt to form duplicate covalent bond.
I'm including screenshot, and my structure. It's obviously not a protein, but I would like to use some tools from chimera to work with it.
Can you help me?
-- Michał Kadlof
----- Oryginalna wiadomość ----- Od: "Eric Pettersen" <pett@cgl.ucsf.edu> Do: "chimera-users@cgl.ucsf.edu BB" <chimera-users@cgl.ucsf.edu> DW: "Michał Kadlof" <m.kadlof@cent.uw.edu.pl> Wysłane: środa, 13 styczeń 2016 19:03:32 Temat: Re: [Chimera-users] importing xyz file
On Jan 13, 2016, at 9:58 AM, Elaine Meng < meng@cgl.ucsf.edu > wrote:
(1) after reading in the XYZ file, add bonds manually yourself, for example, select two “atoms” (Ctrl-click, Shift-Ctrl-click) and then use command “bond sel”. Repeat. This could be tedious if you have a lot of bonds to add. You could also use atom names instead of selecting, for example “bond @c1,c2”. Although the XYZ file doesn’t contain atom names, “atoms” of the same “element” will be named in Chimera according to element with a sequential number appended (the first C is named C1, the second C is named C2, etc.). < http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/xyz.html >
And the above could be combined into a script, e.g.:
open myfile.xyz bond @c1,c2 bond @c1,c7 …
That script file could then be opening with a single command in Chimera: “open myscript.cmd”.
—Eric
Eric Pettersen UCSF Computer Graphics Lab
<Screenshot_2016-03-09_22-47-44.png><tmp.pdb>_______________________________________________ Chimera-users mailing list: Chimera-users@cgl.ucsf.edu Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
Attached is a Chimera script that you can open immediately after opening your XYZ file. It connects consecutive "atoms" in the last opened model. You can even use it on the command line like: chimera methane.xyz connectxyz.py Obviously something bad may happen if there is already connectivity within the model. Conrad On 1/13/2016 9:58 AM, Elaine Meng wrote:
Hello Michał, The XYZ format does not specify bonds directly. Normally if the points are atoms with reasonable bond lengths, Chimera can guess where the bonds are based on the elements and coordinates. If they are not atomic structures and the bonds are of arbitrary length, here are some possibilities of what you could do:
(1) after reading in the XYZ file, add bonds manually yourself, for example, select two “atoms” (Ctrl-click, Shift-Ctrl-click) and then use command “bond sel”. Repeat. This could be tedious if you have a lot of bonds to add. You could also use atom names instead of selecting, for example “bond @c1,c2”. Although the XYZ file doesn’t contain atom names, “atoms” of the same “element” will be named in Chimera according to element with a sequential number appended (the first C is named C1, the second C is named C2, etc.). <http://www.rbvi.ucsf.edu/chimera/docs/UsersGuide/xyz.html>
- OR -
(2) convert XYZ file into some other format that specifies bonds, for example a PDB file with CONECT lines. <http://www.wwpdb.org/documentation/file-format-content/format33/v3.3.html> This would also take some effort to script a process (which could involve other people’s programs, say Babel to convert to PDB but then you would still need to add your CONECT lines), but once you had that done, it could be applied to a large file or multiple files.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab Department of Pharmaceutical Chemistry University of California, San Francisco
On Jan 13, 2016, at 6:28 AM, Michał Kadlof <m.kadlof@cent.uw.edu.pl> wrote:
Hello, I would like to visualize in chimera objects (not exactly atoms) from my XYZ file. I can import them ans see as scattered balls but I would like to see them connected to each other in order that they are appear in file. The distances are much larger than usual inter atoms interactions. Is it possible? -- best Michał Kadlof
_______________________________________________ Chimera-users mailing list Chimera-users@cgl.ucsf.edu http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
participants (4)
-
Conrad Huang
-
Elaine Meng
-
Eric Pettersen
-
Michał Kadlof