On Dec 3, 2010, at 6:13 PM, Noel O'Boyle wrote:
> Could it be easier?
> 
> dist = []
> for atom in mol:
>  for atom_b in mol:
>    dist.append(my_dist(atom.coords, atom_b.coords))
> print max(dist)

Sure can:

  print max(my_dist(atom_a.coords, atom_b.coords) for atom_a in mol for atom_b 
in mol)

That is, if by "easier" you mean "shorter."



                                Andrew
                                [email protected]



------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: New IBM DB2 features make compatibility easy. 
Learn about native support for PL/SQL, new data types, scalar functions, 
improved concurrency, built-in packages, OCI, SQL*Plus, data movement tools, 
best practices and more - all designed to run applications on both DB2 and 
Oracle platforms. http://p.sf.net/sfu/oracle-sfdev2dev
_______________________________________________
OpenBabel-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to