User a9d76a1173
17-09-2013 19:33:12
Following Marvin 5.11 based code shows explicit Hs?? How do you make Marvin View Table hide these. I wonder I am missing some jar file that is needed or my code doesn't do what I think it should.. Also, I need to make Marvin Table non editable??
MViewPane viewPane = new MViewPane();
viewPane.setBorderWidth(1);
viewPane.setBackground(Color.LIGHT_GRAY);
viewPane.setMolbg(Color.WHITE);
viewPane.setExplicitH(false);
this.setLayout(new GridLayout(1, 1));
this.add(viewPane);
TableSupport tableSupport = viewPane.getTableSupport();
final MDocSource docSource = createDocSource("/Users/lochana/Desktop/test.sdf");
tableSupport.start(docSource, "sdf");
ChemAxon 5433b8e56b
19-09-2013 07:24:17
Hi,
the setExplicitH method was deprecated in 5.4.0 and the functionality was removed in 5.5.0 releases, so I do not suggest to use it at all, because as its documentation also says it does nothing since 5.5.0.
You can do the followings:
- use the "importConv=-H" value with setParams method on the MViewPane class
- remove the explicit hydrogens from your structure by yourself, with the help of Hydrogenize.convertExplicitHToImplicit(MoleculeGraph) method.
- remove the hydrogens from the molecule by traversing its atoms by yourself, this method is suggested if you need some special logic.
The functionality was removed, because it was misleading to hide explicitly drawn hydrogen atoms, if an atom is present in the Molecule object, then that is drawn by the sketcher or the viewer.
Note that the hydrogens are implicitly there and visible on the molecule sketch, if implicit hydrogen visibility is set.
Regards,
Istvan
User a9d76a1173
20-09-2013 20:11:10
Thanks. Is there anyway to make table non-editable?
ChemAxon 2c555f5717
23-09-2013 14:19:43
Dear Lochana!
You can forbid editing like this:
viewPane.setEditable(MViewPane.VIEW_ONLY);
You can find more information here.
Regards:
Balázs