This is a read-only mirror of pymolwiki.org

Difference between revisions of "Copy"

From PyMOL Wiki
Jump to navigation Jump to search
 
Line 1: Line 1:
 
 
'''copy''' creates a new object that is an identical copy of an existing object
 
'''copy''' creates a new object that is an identical copy of an existing object
  
Line 5: Line 4:
 
<source lang="python">
 
<source lang="python">
 
copy target, source
 
copy target, source
copy target = source        # (DEPRECATED)
 
 
</source>
 
</source>
  
Line 14: Line 12:
  
 
===SEE ALSO===
 
===SEE ALSO===
[[Create|create]]
+
* [[Create|create]]
  
 
===User Comments/Examples===
 
===User Comments/Examples===
[[Category:Commands|Copy]]
 
 
 
  
 
<source lang="python">
 
<source lang="python">
Line 27: Line 22:
 
cmd.copy("trna%s" %x, "trna")
 
cmd.copy("trna%s" %x, "trna")
 
</source>
 
</source>
 +
 +
[[Category:Commands|Copy]]

Revision as of 19:03, 14 November 2013

copy creates a new object that is an identical copy of an existing object

USAGE

copy target, source

PYMOL API

cmd.copy(string target,string source)

SEE ALSO

User Comments/Examples

## will copy the object "trna" into six new objects with a number suffic
s = range(6)
for x in s:
	cmd.copy("trna%s" %x, "trna")