Re: [PyMOL] Record and load coordinates

2018-01-11 Thread David Hall
The transform matrix you’re using is the identity matrix, so it won’t have any effect. -David > On Jan 11, 2018, at 6:54 PM, Benjamin Bailly wrote: > > Hi Thomas, > > Thanks for your reply. > > So if I am correct, for my protein get_coords fetches a very large matrix of

Re: [PyMOL] Record and load coordinates

2018-01-11 Thread Benjamin Bailly
Hi Thomas, Thanks for your reply. So if I am correct, for my protein get_coords fetches a very large matrix of thousands and thousands of rows. This could prove very impractical if I want to stores those coordinates in a script. To circumvent this issue I tried the following but it did not seem

Re: [PyMOL] Record and load coordinates

2018-01-10 Thread Thomas Holder
Hi Ben, The coordinates argument must have a Nx3 shape, that means: len(coordinates) = number of atoms len(coordinates[0]) = 3 You can use numpy's reshape() function: import numpy coordinates = numpy.asfarray(coordinates).reshape((-1,3)) cmd.load_coords(coordinates, '%prot') I recommend to

[PyMOL] Record and load coordinates

2018-01-10 Thread Benjamin Bailly
Hi everyone, I have been scratching my head quite a bit on this one, I am sure there must be a simple solution but I can't seem to figure it out. In short, I would like to record the spacial coordinates of a protein so that when I run my script I can fetch it from the PDB and place it exactly