That's great -- Please consider the environment before printing this e-mail.
Pieremanuele Canepa Room 104 Functional Material Group School of Physical Sciences, Ingram Building, University of Kent, Canterbury, Kent, CT2 7NH United Kingdom e-mail: [email protected] mobile: +44 (0) 7772-9756456 ----------------------------------------------------------- ________________________________________ From: Robert Hanson [[email protected]] Sent: Monday, October 18, 2010 4:09 PM To: P.Canepa; [email protected] Subject: internal coordinate (z-matrix) addition of an atom to a molecule Piero, Try this for now as a Jmol script. function zAdd(type, dist, a, ang, b, tor, c) { /* adds an atom x connected to A and distance DIST from A with angle ANG for x-A-B and dihedral TOR for x-A-B-C Note: If a or b or c is a coordinate, such as {1 2 1}, and we have fractional coordinates, then those will be ASSUMED to be fractional. Do not use fractional notation {1 2 1/1} for a, b, or c. Instead, if you must use cartesian coordinates, add ".fxyz" to that: zAdd("H", 1.0, {atomno=1}, 109.5, {atomno=2}, 60, {1.5 2.4 3.2}.fxyz) */ var vbc = c.xyz - b.xyz var vba = a.xyz - b.xyz var p = a.xyz - (vba/vba) * dist var mol = "1\n\n" + type + " " + p.x + " " + p.y + " " + p.z var p = a.xyz + cross(vbc, vba) set appendNew false load append "@mol" var newAtom = {*}[0] connect @a @newAtom rotate Selected molecular @a @p @ang @newAtom rotate Selected molecular @b @a @tor @newAtom } load caffeine.xyz zAdd("H",1,{O11}, 109.5, {C5}, 60, {n4}) On Mon, Oct 18, 2010 at 8:45 AM, P.Canepa <[email protected]<mailto:[email protected]>> wrote: Dear all, have you ever thought about the possibility to add an option to Jmol which adds extra atom following the z-matrix procedure? Thanks, Piero -- Please consider the environment before printing this e-mail. Pieremanuele Canepa Room 104 Functional Material Group School of Physical Sciences, Ingram Building, University of Kent, Canterbury, Kent, CT2 7NH United Kingdom -- Robert M. Hanson Professor of Chemistry St. Olaf College 1520 St. Olaf Ave. Northfield, MN 55057 http://www.stolaf.edu/people/hansonr phone: 507-786-3107 If nature does not answer first what we want, it is better to take what answer we get. -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

