Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ekwan/cctk
Browse files Browse the repository at this point in the history
  • Loading branch information
corinwagen committed Aug 9, 2020
2 parents 4e6bb8d + 7d2386c commit 1d5fc05
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cctk/mol2_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def write_molecule_to_file(cls, filename, molecule, title=None, append=False):
assert isinstance(molecule, Molecule), "molecule is not a valid Molecule object!"

text = f"# {title}\n#\n#\n\n#\n#\n\n"
text += f"@<TRIPOS>MOLECULE\nMolecule Name\n{molecule.num_atoms()} {molecule.bonds.number_of_edges()}\nSMALL\nNO_CHARGES\n\n\n"
text += f"@<TRIPOS>MOLECULE\n{title}\n{molecule.num_atoms()} {molecule.bonds.number_of_edges()}\nSMALL\nNO_CHARGES\n\n\n"
text += "@<TRIPOS>ATOM\n"
for idx, z in enumerate(molecule.atomic_numbers, start=1):
v = molecule.get_vector(idx)
Expand Down
2 changes: 1 addition & 1 deletion docs/recipe_01.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Reading a Gaussian Output File

# following is equivalent to file.get_molecule()
ensemble = file.ensemble
molecule = file.molecules[-1]
molecule = ensemble.molecules[-1]

# get the molecular properties dictionary
properties_dict = ensemble.get_properties_dict(molecule)
Expand Down
2 changes: 1 addition & 1 deletion docs/recipe_03.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ Generating Non-Ground States
import cctk.quasiclassical as qc

# returns a new Molecule object and the energy above the ground state, sampled from the relevant Boltzmann distribution
perturbed_molecule, energy = qc.get_quasiclassical_perturbation(molecule, temp=350)
perturbed_molecule, energy = qc.get_quasiclassical_perturbation(molecule, temperature=350)


5 changes: 3 additions & 2 deletions docs/recipe_07.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ MOL2 Files
len(ensemble) == 597

# write one structure
filename2 = "my_filename.mol2"
cctk.MOL2File.write_molecule_to_file(filename2, molecule, title)
write_molecule_to_file(cls, filename, molecule, title=None):

# write multiple structures
cctk.MOL2File.write_ensemble_to_file(filename2, ensemble)
filename3 = "your_filename.mol2"
cctk.MOL2File.write_ensemble_to_file(filename3, ensemble)

- Setting ``print_status_messages`` to ``True`` will print progress to stdout.
- For large files that contain only conformers, set ``contains_conformers`` to ``True``.
Expand Down

0 comments on commit 1d5fc05

Please sign in to comment.