OpenChemistry / avogadrolibs

Avogadro libraries provide 3D rendering, visualization, analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
https://two.avogadro.cc/
BSD 3-Clause "New" or "Revised" License
442 stars 168 forks source link

in Save Molecule dialog box display all-formats by default #1118

Closed drew-parsons closed 2 years ago

drew-parsons commented 2 years ago

The Save Molecule dialog box is to some extent able to use the file extension to guess the requested file formal, e.g. .xyz, tmol, gau, without having to select the specific format from the drop-down list.

When a dialog box has this kind of "wildcard" capability, it's common for the default setting of the drop-down lists to show or to have an "All known formats" entry. For instance the LibreOffice Save As dialog has "All Formats". The Gimp Export As dialog has "Show All Files" together with "Select File Type (by extension)".

At the moment Avogadro's Save Molecule is set to the first entry, "All FilesACES input format". So files with other input formats are filtered out and not displayed. This means if you're editing a .xyz file, to save over the old file you have to scroll all the way to the bottom of the formats drop-down list till you get to the XYZ formats.

It would be nicer for the user if "All known formats" were the default setting (or the top of the drop-down list). Then if you want to write over an existing file, it would already be listed, you only need to click on it and save.

That's assuming the current setting is not simply a bug and it should already be "All Files" following by "ACES input format" instead of "All FilesACES input format".

ghutchis commented 2 years ago

I think you mean the "Export Molecule" dialog, but yes:

That's assuming the current setting is not simply a bug and it should already be "All Files" following by "ACES input format" instead of "All FilesACES input format".

That's the bug, yes.

ghutchis commented 2 years ago

Could you try https://github.com/OpenChemistry/avogadrolibs/pull/1133 - it should print something like the following when run from the terminal:

 generate export  "All files (*);;ACES input format (*.acesin);;ADF cartesian input format (*.adf);;ASCII format (*.ascii);;Accelrys/MSI Quanta CSR format (*.csr);;Alchemy format (*.alc);;AutoDock PDBQT format (*.pdbqt);;Ball and Stick format (*.bs);;CAChe MolStruct format (*.cac *.cache);;CML Reaction format (*.cmlr);;CSD CSSR format (*.cssr);;Cacao Cartesian format (*.caccrt);;Cacao Internal format (*.cacint);;Canonical SMILES format (*.can);;Chem3D Cartesian 1 format (*.c3d1);;Chem3D Cartesian 2 format (*.c3d2);;ChemDoodle JSON (*.cdjson);;ChemDraw CDXML format (*.cdxml);;ChemDraw Connection Table format (*.ct);;ChemKin format (*.ck);;Chemical JSON (*.cjson);;Chemical Markup Language (*.cml);;Chemical Resource Kit 3D format (*.crk3d);;Chemical Resource Kit diagram(2D) (*.crk2d);;Chemtool format (*.cht);;Compare molecules using InChI (*.k);;Confab report format (*.confabreport);;Copy raw text (*.copy);;Crystallographic Information File (*.cif);;Culgi object file format (*.cof);;DALTON input format (*.dalmol);;DCD (*.dcd);;DL-POLY CONFIG (CONFIG);;DMol3 coordinates format (*.outmol *.dmol);;Dock 3.5 Box format (*.box);;Extended XYZ cartesian coordinates format (*.exyz);;FASTA format (*.fa *.fasta *.fsa);;FHIaims XYZ format (*.fhiaims);;FPS text fingerprint format (Dalke) (*.fps);;Fastsearch format (*.fs);;Feature format (*.feat);;Fenske-Hall Z-Matrix format (*.fh);;Fingerprint format (*.fpt);;Free Form Fractional format (*.fract);;GAMESS Input (*.gamin *.inp);;GAMESS-UK Input (*.gukin);;GAMESS-UK Output (*.gukout);;GRO format (*.gro);;GROMOS96 format (*.gr96);;Gaussian Input (*.gjf *.gjc *.gau *.com);;Gaussian Z-Matrix Input (*.gzmat);;Gaussian cube format (*.cub *.cube);;Ghemical format (*.gpr);;HyperChem HIN format (*.hin);;InChI format (*.inchi);;InChIKey (*.inchikey);;Jaguar input format (*.jin);;LAMMPS (*.lmpdat *.dump);;LPMD format (*.lpmd);;M.F. Sanner's MSMS input format (*.msms);;MCDL format (*.mcdl);;MDFF format (*.POSFF *.CONTFF *.MDFF);;MDL (*.sdf);;MDL MOL format (*.sdf);;MDL RXN format (*.rxn);;MOPAC Cartesian format (*.mopcrt *.mpc *.mop);;MOPAC Internal (*.mopin);;MPQC simplified input format (*.mpqcin);;MSI BGF format (*.bgf);;MacroModel format (*.mmod *.mmd);;Macromolecular Crystallographic Info (*.mmcif *.mcif);;MolPrint2D format (*.mpd);;Molden format (*.molden *.molf *.mold);;Molpro input format (*.mp);;Multilevel Neighborhoods of Atoms (MNA) (*.mna);;NWChem input format (*.nw);;ORCA input format (*.orcainp);;Open Babel molecule report (*.molreport);;Open Babel report format (*.report);;OpenDX cube format for APBS (*.dx);;Outputs nothing (*.nul);;PCModel Format (*.pcm);;PNG 2D depiction (*.png);;POSCAR (POSCAR);;POV-Ray input format (*.pov);;PQR format (*.pqr);;Painter format (*.paint);;Parallel Quantum Solutions format (*.pqs);;Point cloud on VDW surface (*.pointcloud);;Protein Data Bank format (*.pdb);;PubChem JSON (*.pcjson);;Q-Chem input format (*.qcin);;RInChI (*.rinchi);;Reaction SMILES format (*.rsmi);;Read and write raw text (*.text);;SMILES FIX format (*.fix);;SMILES format (*.smi *.smiles);;STL 3D-printing format (*.stl);;SVG 2D depiction (*.svg);;Sybyl Mol2 format (*.mol2);;TRR (*.trr);;The LAMMPS data format (*.lmpdat);;Thermo format (*.therm *.tdd);;Tinker XYZ format (*.txyz);;Title format (*.txt);;TurboMole Coordinate format (*.tmol);;Turbomole (*.coord);;UniChem XYZ format (*.unixyz);;VASP format (*.VASP CONTCAR POSCAR);;ViewMol format (*.vmol);;XED format (*.xed);;XYZ (*.xyz);;XYZ cartesian coordinates format (*.xyz);;YASARA.org YOB format (*.yob);;ZINDO input format (*.zin);;ZYX (*.zyx);;"

I'm particularly curious about the first entry.

I suspect it might be a translation issue.