/* (C) 2022 Cadence Design Systems, Inc. (Cadence) All rights reserved. TERMS FOR USE OF SAMPLE CODE The software below ("Sample Code") is provided to current licensees or subscribers of Cadence products or SaaS offerings (each a "Customer"). Customer is hereby permitted to use, copy, and modify the Sample Code, subject to these terms. Cadence claims no rights to Customer's modifications. Modification of Sample Code is at Customer's sole and exclusive risk. Sample Code may require Customer to have a then current license or subscription to the applicable Cadence offering. THE SAMPLE CODE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. OPENEYE DISCLAIMS ALL WARRANTIES, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. In no event shall Cadence be liable for any damages or liability in connection with the Sample Code or its use. */ using System; using OpenEye.OEChem; using OpenEye.OEGrid; using OpenEye.OEShape; public class ShapeProps { public static void Main(string [] args) { if (args.Length != 1) { OEChem.OEThrow.Usage("ShapeProps "); } oemolistream ifs = new oemolistream(args[0]); foreach (OEGraphMol mol in ifs.GetOEGraphMols()) { Console.WriteLine(" Title: "+mol.GetTitle()); Console.WriteLine(" Volume: "+OEShape.OECalcVolume(mol)); Console.WriteLine("Volume: (without H): "+ OEShape.OECalcVolume(mol, false)); float [] smult = new float[14]; OEShape.OECalcShapeMultipoles(mol, smult); Console.WriteLine(" Steric multipoles:"); Console.WriteLine(" monopole: "+smult[0]); Console.WriteLine(" quadrupoles: "+ smult[1]+" "+smult[2]+" "+smult[3]); Console.WriteLine(" octopoles:"); Console.WriteLine(" xxx: "+smult[4]+ " yyy: "+smult[5]+" zzz: "+smult[6]); Console.WriteLine(" xxy: "+smult[7]+ " xxz: "+smult[8]+" yyx: "+smult[9]); Console.WriteLine(" yyz: "+smult[10]+ " zzx: "+smult[11]+" zzy: "+smult[12]); Console.WriteLine(" xyz: "+smult[13]); Console.WriteLine(""); } } }