Thanks, Dean.
Minor point: Generally I would recommend "display..." instead of "delete
not..." That gives you more flexibility.
Bob
On Sun, Jul 17, 2011 at 9:29 PM, Dean Johnston <[email protected]>wrote:
> Simon,
>
> Here's what I've used. It obviously only works for molecular systems and
> can be somewhat slow for very large molecules/unit cells. Bob can probably
> figure out a more efficient way to do this, but it works for me. In these
> examples I've deleted any molecules that I don't want to see - you may want
> to just hide/display molecules instead.
>
> (1) I think this is equivalent to what Bob had suggested before - similar
> to Mercury's "include atoms in molecules where *Any* atom fits".
>
> load xxx.cif {333 777 1}; delete not within(molecule, unitcell);
>
>
> (2) Or (more complicated) - I think this is similar to Mercury's "include
> atoms in molecules whose *Centroids* fit".
>
> load xxx.cif {333 777 1};
> delete not within(molecule, unitcell);
> n = getProperty("moleculeInfo").size;
> for (var i=1; i<=n; i++)
> {
> select molecule=i;
> if (({selected}.fx < -0.001) || ({selected}.fx > 1.001) ||
> ({selected}.fy < -0.001) || ({selected}.fy > 1.001) || ({selected}.fz <
> -0.001) || ({selected}.fz > 1.001))
> { hide (hidden || {selected}); }
> };
> delete hidden;
>
> Dean
>
>
> ------------------------------------------------------------------------------
> AppSumo Presents a FREE Video for the SourceForge Community by Eric
> Ries, the creator of the Lean Startup Methodology on "Lean Startup
> Secrets Revealed." This video shows you how to validate your ideas,
> optimize your ideas and identify your business strategy.
> http://p.sf.net/sfu/appsumosfdev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
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
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users