Re: [PyMOL] loading gro files

2011-08-18 Thread Tsjerk Wassenaar
Hey :) Here is an all Python solution to load a .gro file, including the box vectors. It simply converts to PDB format and calls cmd.read_pdbstr... It supports multimodel files. I'll probably add a mechanism to identify chains from breaks, as the .gro format does not use chain identifiers, and

Re: [PyMOL] loading gro files

2011-08-18 Thread Thomas Holder
To keep the original residue numbers from the gro file, you could also temporarily store additional numbering in the segment identifier, and after loading get it back from there: _pdbline= ATOM %5i %-3s %3s%2s%4i +\ %8.3f%8.3f%8.3f%6.2f%6.2f %4s%2s \n def pdbOut(atom,i=1):

Re: [PyMOL] loading gro files

2011-08-18 Thread Michael Lerner
On Thu, Aug 18, 2011 at 3:39 AM, Tsjerk Wassenaar tsje...@gmail.com wrote: Hey :) Here is an all Python solution to load a .gro file, including the box vectors. It simply converts to PDB format and calls cmd.read_pdbstr... It supports multimodel files. I'll probably add a mechanism to

Re: [PyMOL] loading gro files

2011-08-18 Thread Tsjerk Wassenaar
Hi Michael, Proteins are actually very easy, because of the fixed connectivity... I'll post a few scripts soon to coarse grain a protein in Pymol, and to fix/show the connectivity. I'll have to combine some things from scriptlets here and there, though. Cheers, Tsjerk On Thu, Aug 18, 2011 at