Oops I thought you were looking for javascript...
In the commandline or in a Jmol script you can do

numModels = getProperty("modelInfo","modelCount");
if (numModels > 1) ...

Eran

On Thu, Oct 16, 2008 at 10:17 PM, Eran Hodis <[EMAIL PROTECTED]> wrote:

> Hi Eric,
> I use this function I wrote (and Bob helped me with at the time):
>
> function checkAnimation()
> {
> //this function checks whether a multimodel file is loaded
>  var checkAnim = jmolScriptWaitAsArray("getProperty modelInfo");
> checkAnim = checkAnim[0];
>  checkAnim = String(checkAnim);
> checkAnim = checkAnim.split("modelCount\t");
>  checkAnim = checkAnim[1];
> checkAnim = checkAnim.split(" ","1");
>  checkAnim = checkAnim[0];
> //checkAnim stores the number of models in the currently loaded file
>  if (checkAnim > 1) {
> //do something
>  }
>
> }
>
> Best,
> Eran
>
> On Thu, Oct 16, 2008 at 9:16 PM, Eric Martz <[EMAIL PROTECTED]>wrote:
>
>> I'd like a command script line
>>
>> if (number_of_models > 1) ...
>>
>> How do I query number_of_models in the currently loaded PDB file? I
>> have looked at the documentation but I didn't find how.
>>
>> Thanks, -Eric
>>
>> /* - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> Eric Martz, Professor Emeritus, Dept Microbiology
>> U Mass, Amherst -- http://www.umass.edu/molvis/martz
>>
>> Top Five 3D MolVis Technologies http://Top5.MolviZ.Org
>> 3D Wiki with Scene-Authoring Tools http://Proteopedia.Org
>> Biochem 3D Education Resources http://MolviZ.org
>> See 3D Molecules, Install Nothing! - http://firstglance.jmol.org
>> Protein Explorer - 3D Visualization: http://proteinexplorer.org
>> Workshops: http://workshops.proteinexplorer.org
>> World Index of Molecular Visualization Resources: http://molvisindex.org
>> ConSurf - Find Conserved Patches in Proteins: http://consurf.tau.ac.il
>> Atlas of Macromolecules: http://atlas.proteinexplorer.org
>> PDB Lite Macromolecule Finder: http://pdblite.org
>> Molecular Visualization EMail List (molvis-list):
>>       http://bioinformatics.org/mailman/listinfo/molvis-list
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - */
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to