Re: [PyMOL] morphing

2012-01-26 Thread Thomas Holder

Hi Hasan,

if your structures are identical in sequence (same number of atoms), the 
direct way for morphing would be to load them into the same object in 
two states and then call rigimol.morph, like this:


from epymol import rigimol
cmd.extend('morph', rigimol.morph)

load conf1.pdb, inobj, 1
load conf2.pdb, inobj, 2
morph inobj, outobj, refinement=5

If the sequence is different or one of the structures have missing 
atoms, you need to match them before creating the two-state object. I 
have a script that does this, see attachment. It provides a morpheasy 
command.


import morpheasy
load conf1.pdb
load conf2.pdb
morpheasy conf1, conf2

Hope that helps.

Cheers,
  Thomas

Hasan Demirci wrote, On 01/25/12 22:37:

Hi,
 
In the past I was using rigimol to morph my structures.

I used to follow the path

pymol -qc prepare.pml

pymol -qc rigimol.pml

pymol domains.pml

pymol -qc refine.py

pymol view.pml

 

I lost my old pml files and in the current pymolv1.5 as far as I can see 
rigimol (or any of the pml files) doesn't exist anymore.
I have two structures and they are dramatically different from one 
another due to a mutation.
I would be grateful if you can help me with the morphing and refinement 
scripts in pymolv1.5 (both windows 64 and/or linux 64 version is fine).

With my very best regards.
 
Hasan-


--
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen
'''
Simplified morphing workflow

(c) 2011 Thomas Holder

License: BSD-2-Clause
'''

from pymol import cmd

def morpheasy(source, target, source_state=0, target_state=0, name=None,
		refinement=5, quiet=1):
	'''
DESCRIPTION

Morph source to target, based on sequence alignment
	'''
	try:
		from epymol import rigimol
	except ImportError:
		print 'No epymol available, please use a Incentive PyMOL build'
		return

	# arguments
	source_state = int(source_state)
	target_state = int(target_state)
	source_state = int(source_state if source_state  0 else cmd.get('state', source))
	target_state = int(target_state if target_state  0 else cmd.get('state', target))
	refinement = int(refinement)
	quiet = int(quiet)

	# temporary objects
	# IMPORTANT: cmd.get_raw_alignment does not work with underscore object names!
	alnobj = cmd.get_unused_name('_aln')
	so_obj = cmd.get_unused_name('source') # see above
	ta_obj = cmd.get_unused_name('target') # see above
	so_sel = cmd.get_unused_name('_source_sel')
	ta_sel = cmd.get_unused_name('_target_sel')
	cmd.create(so_obj, source, source_state, 1)
	cmd.create(ta_obj, target, target_state, 1)

	# align sequence
	cmd.align(ta_obj, so_obj, object=alnobj, cycles=0, transform=0,
			mobile_state=1, target_state=1)
	cmd.select(so_sel, '%s and %s' % (so_obj, alnobj))
	cmd.select(ta_sel, '%s and %s' % (ta_obj, alnobj))
	alnmap = dict(cmd.get_raw_alignment(alnobj))
	alnmap.update(dict((v,k) for (k,v) in alnmap.iteritems()))

	# copy source atom identifiers to temporary target
	idmap = dict()
	cmd.iterate(so_sel, 'idmap[model,index] = (segi,chain,resi,resn,name)',
			space={'idmap': idmap})
	cmd.alter(ta_sel, '(segi,chain,resi,resn,name) = idmap[alnmap[model,index]]',
			space={'idmap': idmap, 'alnmap': alnmap})

	# remove unaligned
	cmd.remove('%s and not %s' % (so_obj, so_sel))
	cmd.remove('%s and not %s' % (ta_obj, ta_sel))
	assert cmd.count_atoms(so_obj) == cmd.count_atoms(ta_obj)
	cmd.sort(so_obj)
	cmd.sort(ta_obj)

	# append target to source as 2-state morph-in object
	cmd.create(so_obj, ta_obj, 1, 2)

	# morph
	if name is None:
		name = cmd.get_unused_name('morph')
	rigimol.morph(so_obj, name, refinement=refinement, async=0)

	# clean up
	for obj in [alnobj, so_obj, so_sel, ta_obj, ta_sel]:
		cmd.delete(obj)

	return name

cmd.extend('morpheasy', morpheasy)
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

[PyMOL] Set values for dihedral angles

2012-01-26 Thread James Starlight
Dear PyMol users!


I'm looking for the possible way to change some backbone didedral values in
my peptide and dont perturbe the secondary structure of the rest of the
peptide.


E.g I have alpha-helix with sequence   x-S-T-G-xI want to make
turn motif in the STG tripeptide only by  changing dihedral of this amino
acids. When I've tried make it by means of DYNOPLOT plugin the rest of the
alpha helix was distorded.

Is there any possible ways to make this conversion ?


James
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Set values for dihedral angles

2012-01-26 Thread Thomas Holder
Hi James,

the modeling capabilities of PyMOL are rather limited, there are 
probably more powerful tools for such tasks.

Without guaranty that the result will be reasonable, try this:

# lock all but the STG tripeptide
protect not pepseq STG

# activate sculpting
sculpt_activate all
set sculpting

# switch to edit mode
edit_mode

Now drag atoms with the mouse or pick bonds and use commands like torsion.

Hope that helps.

Cheers,
   Thomas

James Starlight wrote, On 01/26/12 13:45:
 Dear PyMol users!
 
 I'm looking for the possible way to change some backbone didedral values 
 in my peptide and dont perturbe the secondary structure of the rest of 
 the peptide.
 
 E.g I have alpha-helix with sequence   x-S-T-G-xI want to 
 make turn motif in the STG tripeptide only by  changing dihedral of this 
 amino acids. When I've tried make it by means of DYNOPLOT plugin the 
 rest of the alpha helix was distorded.
 
 Is there any possible ways to make this conversion ?
 
 James

-- 
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


[PyMOL] Access to pymolwiki

2012-01-26 Thread Troels Emtekær Linnet
I am not able to reach the site?

Is it down?

Troels Emtekær Linnet
--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Access to pymolwiki

2012-01-26 Thread Jason Vertrees
Hi Troels,

I can get to it. Still having problems?

Cheers,

-- Jason

2012/1/26 Troels Emtekær Linnet tlin...@gmail.com:
 I am not able to reach the site?

 Is it down?

 Troels Emtekær Linnet


 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrodinger, LLC

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Set values for dihedral angles

2012-01-26 Thread Jed Goldstone
James-

I think you need to seriously consider using software that's actually 
designed to compute and refine protein models, such as Modeller. There 
are forcefield and structural constraints that PyMol is just not 
designed to do, and your results may not have the scientific validity 
you require.

Jed

Thomas Holder wrote:
 Hi James,
 
 the modeling capabilities of PyMOL are rather limited, there are 
 probably more powerful tools for such tasks.
 
 Without guaranty that the result will be reasonable, try this:
 
 # lock all but the STG tripeptide
 protect not pepseq STG
 
 # activate sculpting
 sculpt_activate all
 set sculpting
 
 # switch to edit mode
 edit_mode
 
 Now drag atoms with the mouse or pick bonds and use commands like torsion.
 
 Hope that helps.
 
 Cheers,
Thomas
 
 James Starlight wrote, On 01/26/12 13:45:
 Dear PyMol users!

 I'm looking for the possible way to change some backbone didedral values 
 in my peptide and dont perturbe the secondary structure of the rest of 
 the peptide.

 E.g I have alpha-helix with sequence   x-S-T-G-xI want to 
 make turn motif in the STG tripeptide only by  changing dihedral of this 
 amino acids. When I've tried make it by means of DYNOPLOT plugin the 
 rest of the alpha helix was distorded.

 Is there any possible ways to make this conversion ?

 James
 

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Set values for dihedral angles

2012-01-26 Thread James Starlight
Dear Thomas, Jed!

Firstly, thanks for the advise in further days I'll try Modeller software!

But also I've tried to use above advises in PyMol and in general I was
satisfy with the results.

I have just only several questions


1- What exactly is the Sculpping ? As I've understood its something like
real-time minimisation of the edited structure. Is what cases this might be
better than rigid rotation\edition of the selected bonds/ angles by
mouse-mode editing ? :)

2- I'm looking for the possible way to set the values for psi and phi
dihedral-angles.

As I understood the commands like torsion or set dihedrals need in the
definition of the edited angles. Is there more trivial way to set values
for the pre-defined backbone dihedrals like

set phi value, sele, 120

?
:)

Something like this I can do via DynoPlot plugin where I can move point on
the graph wich correspond to the pair of psi-phy angles but I need in more
accuracy way to define the exactly values of this dihedrals.


Thanks again,


James

2012/1/26 Jed Goldstone jedg...@gmail.com

 James-

 I think you need to seriously consider using software that's actually
 designed to compute and refine protein models, such as Modeller. There
 are forcefield and structural constraints that PyMol is just not
 designed to do, and your results may not have the scientific validity
 you require.

 Jed

 Thomas Holder wrote:
  Hi James,
 
  the modeling capabilities of PyMOL are rather limited, there are
  probably more powerful tools for such tasks.
 
  Without guaranty that the result will be reasonable, try this:
 
  # lock all but the STG tripeptide
  protect not pepseq STG
 
  # activate sculpting
  sculpt_activate all
  set sculpting
 
  # switch to edit mode
  edit_mode
 
  Now drag atoms with the mouse or pick bonds and use commands like
 torsion.
 
  Hope that helps.
 
  Cheers,
 Thomas
 
  James Starlight wrote, On 01/26/12 13:45:
  Dear PyMol users!
 
  I'm looking for the possible way to change some backbone didedral values
  in my peptide and dont perturbe the secondary structure of the rest of
  the peptide.
 
  E.g I have alpha-helix with sequence   x-S-T-G-xI want to
  make turn motif in the STG tripeptide only by  changing dihedral of this
  amino acids. When I've tried make it by means of DYNOPLOT plugin the
  rest of the alpha helix was distorded.
 
  Is there any possible ways to make this conversion ?
 
  James
 


 --
 Keep Your Developer Skills Current with LearnDevNow!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-d2d
 ___
 PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
 Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
 Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] Access to pymolwiki

2012-01-26 Thread Troels Emtekær Linnet
No. :-)

Works as a charm now.

It was a temporary thing for 10 minutes.
Maybe my internet solution from the uni was a little strange.

/T



2012/1/27 Jason Vertrees jason.vertr...@schrodinger.com

 Hi Troels,

 I can get to it. Still having problems?

 Cheers,

 -- Jason

 2012/1/26 Troels Emtekær Linnet tlin...@gmail.com:
  I am not able to reach the site?
 
  Is it down?
 
  Troels Emtekær Linnet
 
 
 
 --
  Keep Your Developer Skills Current with LearnDevNow!
  The most comprehensive online learning library for Microsoft developers
  is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
  Metro Style Apps, more. Free future releases when you subscribe now!
  http://p.sf.net/sfu/learndevnow-d2d
  ___
  PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
  Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
  Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net



 --
 Jason Vertrees, PhD
 PyMOL Product Manager
 Schrodinger, LLC

 (e) jason.vertr...@schrodinger.com
 (o) +1 (603) 374-7120

--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net