Showing posts with label cheminformatics. Show all posts
Showing posts with label cheminformatics. Show all posts
Tuesday, January 30, 2018
Count SDF entries in a file
This is something I find myself doing a lot, so thought I'd share. There's a quick and easy way to count the number of entries in an SDF when you're on the command line:
Monday, February 18, 2013
OpenBabel: Convert SDF to SMILES and keep the data!
This seems like it should be the default option when converting from an SDF to a SMILES file - keep the damned data! Well, in openbabel (at least the version I'm running) this is not the default. If you want to keep the SD data you have to specify each tag as part of the '--append' argument.
e.g.
> babel test1.sdf --append "cLogD7.4 cLogP model_score1 model_score2 some_other_property" test1.smiIn order to end up with a tab delimited file (my favourite) then you have to prefix the argument to 'append' with the desired character. I used "Ctrl-v <tab>" to get a tab in my string. Seems odd that tabs wouldn't be the default delimiter since there's still a tab used to separate the SMILES string from the molecule name in the standard conversion.
Subscribe to:
Posts (Atom)