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)
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)
You'll have to write my_dist yourself...
- Noel
On 3 December 2010 16:59, JP wrote:
> Friday evening query: Using pybel/Openbabel: is there a way to get the
Friday evening query: Using pybel/Openbabel: is there a way to get the
largest physical length of a whole molecule? (basically the largest
pairwise distance between the atoms in the molecules)...
Many Thanks
JP
--
Increas