On 20/09/2010 09:41, hao wang wrote: > Can you teach me how to add hydrogen for each molecule by babel?(I > know how add this for only one molecule) I have many molecules. I want > to know a batch way.thankyou! > How to write the command line for this problem?
Normally, OpenBabel processes all the molecules that are in its input and puts the results in a single output file. The input molecules can be all in one file or can be in multiple files. So to add hydrogens to all the molecules in in1.smi, in2.smi and in3.smi and put the results in out.sdf : babel in1.smi in2.smi in3.smi out.sdf -h or you could use wildcard characters to specify multiple input files : babel *.smi out.sdf -h To put the output into separate files : babel *.mol H.mol -h -m So HA.mol HB.mol HC.mol would be produced if the input files were A.mol B.mol C.mol Do not try to over-write the input files. Chris ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ OpenBabel-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
