1'''
2Various morphing workflows
3
4(c) 2013 Schrodinger, Inc.
5(c) 2011 Thomas Holder
6(c) 2009 DeLano Scientific LLC.
7'''
8
9import pymol
10cmd = __import__("sys").modules["pymol.cmd"]
11
12def morph(name, sele1, sele2=None, state1=-1, state2=-1, refinement=3,
13        steps=30, method='rigimol', match='align', quiet=1, _self=cmd):
14    '''
15DESCRIPTION
16
17    Creates an interpolated trajectory between two or multiple conformations.
18    If the two input objects are not the same, match them based on sequence
19    alignment.
20
21    This command supports two methods: rigimol and linear. RigiMOL is an
22    incentive feature and only available to official PyMOL sponsors. Linear
23    morphing is quick and robust but likely to produce distorted intermediates.
24
25ARGUMENTS
26
27    name = string: name of object to create
28
29    sele1 = string: atom selection of first conformation
30
31    sele2 = string: atom selection of second conformation {default: <sele1>}
32
33    state1 = int: sele1 state {default: 1}. If state1=0 and sele1 has N
34    states, create N morphings between all consecutive states and back from
35    state N to 1 (so the morph will have N*steps states). If state2=0, create
36    N-1 morphings and stop at last state.
37
38    state2 = int: sele2 state {default: 2 if sele1=sele2, else 1}
39
40    refinement = int: number of sculpting refinement cycles to clean
41    distorted intermediates {default: 3}
42
43    steps = int: number of states for sele2 object {default: 30}
44
45    method = string: rigimol or linear {default: rigimol}
46
47EXAMPLE
48
49    fetch 1akeA 4akeA, async=0
50    align 1akeA, 4akeA
51    morph mout, 1akeA, 4akeA
52    '''
53    raise pymol.IncentiveOnlyException()
54
55# vi: ts=4:sw=4:smarttab:expandtab
56