choderalab / yank

An open, extensible Python framework for GPU-accelerated alchemical free energy calculations.
http://getyank.org
MIT License
178 stars 70 forks source link

a error about antecamber #1289

Open kingljy0818 opened 2 years ago

kingljy0818 commented 2 years ago

A error was prompted in the following:

2022-09-08 11:27:09,197: Setting CUDA platform to use precision model 'mixed'. 2022-09-08 11:27:09,319: Single node: executing <function ExperimentBuilder._check_resume at 0x7fbfc14a4c20> 2022-09-08 11:27:09,320: Running _setup_molecules serially. Traceback (most recent call last): File "/home/anaconda3/bin/yank", line 10, in sys.exit(main()) File "/home/anaconda3/lib/python3.7/site-packages/yank/cli.py", line 73, in main dispatched = getattr(commands, command).dispatch(command_args) File "/home/anaconda3/lib/python3.7/site-packages/yank/commands/script.py", line 155, in dispatch yaml_builder.run_experiments(write_status=write_status) File "/home/anaconda3/lib/python3.7/site-packages/yank/experiment.py", line 737, in run_experiments self._setup_experiments() File "/home/anaconda3/lib/python3.7/site-packages/yank/experiment.py", line 2325, in _setup_experiments self._db.setup_all_systems() File "/home/anaconda3/lib/python3.7/site-packages/yank/pipeline.py", line 1385, in setup_all_systems send_results_to=None, group_size=1, sync_nodes=True) File "/home/anaconda3/lib/python3.7/site-packages/mpiplus/mpiplus.py", line 512, in distribute all_results = [task(job_args, *other_args, *kwargs) for job_args in distributed_args] File "/home/anaconda3/lib/python3.7/site-packages/mpiplus/mpiplus.py", line 512, in all_results = [task(job_args, other_args, **kwargs) for job_args in distributed_args] File "/home/anaconda3/lib/python3.7/site-packages/yank/pipeline.py", line 1697, in _setup_molecules gaff_version=gaff) File "/home/anaconda3/lib/python3.7/site-packages/openmoltools/amber.py", line 372, in run_antechamber raise Exception(msg) Exception: antechamber failed to produce output mol2 file command: antechamber -i in.mol2 -fi mol2 -o out.mol2 -fo mol2 -s 2 -at gaff -c bcc output:

Running: /home/anaconda3/bin/../bin/bondtype -j full -i ANTECHAMBER_BOND_TYPE.AC0 -o ANTECHAMBER_BOND_TYPE.AC -f ac

Running: /home/anaconda3/bin/../bin/atomtype -i ANTECHAMBER_AC.AC0 -o ANTECHAMBER_AC.AC -p gaff Total number of electrons: 241; net charge: 0 INFO: Number of electrons is odd: 241 Please check the total charge (-nc flag) and spin multiplicity (-m flag)

Running: /home/anaconda3/bin/../bin/sqm -O -i sqm.in -o sqm.out Error: cannot run "/home/anaconda3/bin/../bin/sqm -O -i sqm.in -o sqm.out" of bcc() in charge.c properly, exit-------------------------------------------------------------------------------- input mol2:

Molecule written by the XED library from Cresset

@MOLECULE ID7_4_PQ1:1|PQ1-4_Forge_Aligned_ID7_4_Charge_Modified|sdf|1|dock1 57 62 1 SMALL USER_CHARGES @ATOM ...


Could you help me to solve the error in the above. Many thanks.

jslim-furame commented 2 years ago

Total number of electrons: 241; net charge: 0 INFO: Number of electrons is odd: 241

The error occurs because the number of electrons is odd. Please check the charge of your ligand or the protonation states. Run the antechamber in your local computer and verify what is the problem. Consider adding hydrogens using Chimera or other well-known tools like Maestro. If the charge is wrong, specify "-nc" flag in your YANK yaml file.

kingljy0818 commented 2 years ago

Thank you for your response. I have checked the charge of the ligand with a positive charge, and added the netcharge = 1 in my YANK yaml file, but I got another error in the following:

Traceback (most recent call last): File "/home/anaconda3/bin/yank", line 10, in sys.exit(main()) File "/home/anaconda3/lib/python3.7/site-packages/yank/cli.py", line 73, in main dispatched = getattr(commands, command).dispatch(command_args) File "/home/anaconda3/lib/python3.7/site-packages/yank/commands/script.py", line 147, in dispatch yaml_builder = ExperimentBuilder(script=yaml_path, job_id=job_id, n_jobs=n_jobs) File "/home/anaconda3/lib/python3.7/site-packages/yank/experiment.py", line 591, in init self.parse(script) File "/home/anaconda3/lib/python3.7/site-packages/yank/experiment.py", line 646, in parse yaml_content = yaml.load(f, Loader=YankLoader) File "/home/anaconda3/lib/python3.7/site-packages/yaml/init.py", line 114, in load return loader.get_single_data() File "/home/anaconda3/lib/python3.7/site-packages/yaml/constructor.py", line 49, in get_single_data node = self.get_single_node() File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 36, in get_single_node document = self.compose_document() File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 55, in compose_document node = self.compose_node(None, None) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 133, in compose_mapping_node item_value = self.compose_node(node, item_key) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 84, in compose_node node = self.compose_mapping_node(anchor) File "/home/anaconda3/lib/python3.7/site-packages/yaml/composer.py", line 127, in compose_mapping_node while not self.check_event(MappingEndEvent): File "/home/anaconda3/lib/python3.7/site-packages/yaml/parser.py", line 98, in check_event self.current_event = self.state() File "/home/anaconda3/lib/python3.7/site-packages/yaml/parser.py", line 428, in parse_block_mapping_key if self.check_token(KeyToken): File "/home/anaconda3/lib/python3.7/site-packages/yaml/scanner.py", line 115, in check_token while self.need_more_tokens(): File "/home/anaconda3/lib/python3.7/site-packages/yaml/scanner.py", line 152, in need_more_tokens self.stale_possible_simple_keys() File "/home/anaconda3/lib/python3.7/site-packages/yaml/scanner.py", line 292, in stale_possible_simple_keys "could not find expected ':'", self.get_mark()) yaml.scanner.ScannerError: while scanning a simple key in "PQ1_P1-3pp0b-explicit.yaml", line 25, column 7 could not find expected ':' in "PQ1_P1-3pp0b-explicit.yaml", line 27, column 1


I still need your help to solve this problem, many thanks.

andrrizzi commented 2 years ago

Hi @kingljy0818. This looks like a simple YAML syntax error in your script. Some extra : character somewhere?

jslim-furame commented 2 years ago

Simply, bcc -nc 1

Its syntax follows antechamber.

2022년 9월 8일 (목) 21:02, kingljy0818 @.***>님이 작성:

Thank you for your response. I have checked the charge of the ligand with a positive charge, would ask you how to specify the '-nc' flag in my YANK yaml file?

— Reply to this email directly, view it on GitHub https://github.com/choderalab/yank/issues/1289#issuecomment-1240622957, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXZQ6SHMDMUSM3Q662D7W3V5HIVJANCNFSM6AAAAAAQHKKXBA . You are receiving this because you commented.Message ID: @.***>

kingljy0818 commented 2 years ago

Simply, bcc -nc 1 Its syntax follows antechamber. 2022년 9월 8일 (목) 21:02, kingljy0818 @.>님이 작성: Thank you for your response. I have checked the charge of the ligand with a positive charge, would ask you how to specify the '-nc' flag in my YANK yaml file? — Reply to this email directly, view it on GitHub <#1289 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXZQ6SHMDMUSM3Q662D7W3V5HIVJANCNFSM6AAAAAAQHKKXBA . You are receiving this because you commented.Message ID: @.>

Thank you so much. The error was solved as followed your suggestion.