..oh, and prepend that entire command with

    set autobond off;

..to make sure it's off beforehand, and thus CIFs with bonds listed as

    _geom_bond_atom_site_label_1  bonded_atom_1
    _geom_bond_atom_site_label_2  bonded_atom_2

..will only use those explicit bonds, and predict none in addition.

Bob, if autobond is on and a .cif contains explicit bonds as above,
will it actually duplicate the bonds already present in the CIF, or
merely add those predicted which aren't in the .cif bond list?

Dave


2009/6/16 N David Brown <[email protected]>
>
> My hero, thanks Bob. Ironically this is the placeholder code I put in, but 
> your response gives me that guarantee I needed!
> For anyone else wanting to auto-predict bonds in a CIF when none are present, 
> here's the simple Jmol script required
>     load trajectory filename; var n = {*}.bondcount; if (n == 0); set 
> autobond on; load trajectory filename; end if;
>
> ::Note:: Both occurrences of 'filename' should changed to the path of your 
> CIF file. Note also that there are a variety of 'load' commands, of which 
> 'load trajectory' is a shortcut version, so try a more suitable load command 
> if you have any problems.
> Best,
> Dave
>
>
>
> 2009/6/16 Robert Hanson <[email protected]>
>>
>> easy!
>>
>> x = {*}.bondcount
>>
>> It's an average value, but will return 0 if there are no bonds.
>> If in JavaScript:
>>
>> var x = jmolEvaluate("{*}.bondcount")
>>
>>
>>
>> On Tue, Jun 16, 2009 at 10:16 AM, N David Brown <[email protected]> 
>> wrote:
>>>
>>> Is there a simple way to get the number of bonds in a structure? Other than 
>>> the atom property 'bondcount', I can't find a suitable property.
>>> I'm intending to test, after a CIF's been loaded, whether zero bonds are 
>>> present (i.e. the CIF didn't contain a bond list), and thereafter set 
>>> autobond ON and reload the file.
>>> Thanks,
>>> Dave
>>>
>>> ------------------------------------------------------------------------------
>>> Crystal Reports - New Free Runtime and 30 Day Trial
>>> Check out the new simplified licensing option that enables unlimited
>>> royalty-free distribution of the report engine for externally facing
>>> server and web deployment.
>>> http://p.sf.net/sfu/businessobjects
>>> _______________________________________________
>>> 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
>
>
>
> --
>
> - N David Brown



--

- N David Brown

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to